WEB开发网
开发学院手机开发Windows Mobile 开发 在 WM 平台上开发 GPS 导航系统 阅读

在 WM 平台上开发 GPS 导航系统

 2010-02-21 22:52:00 来源:WEB开发网   
核心提示:5 '***67 Public Class NmeaInterpreter89 ' Raised when the current location has changed1011 Public Event PositionReceived(ByVal latitude As String, _12 B

5 '*******************************************************

6

7 Public Class NmeaInterpreter

8

9 ' Raised when the current location has changed

10

11 Public Event PositionReceived(ByVal latitude As String, _

12 ByVal longitude As String)

13 Public Event DateTimeChanged(ByVal dateTime As DateTime)

14 Public Event BearingReceived(ByVal bearing As Double)

15 Public Event SpeedReceived(ByVal speed As Double)

16 Public Event SpeedLimitReached()

17 Public Event FixObtained()

18 Public Event FixLost()

19 Public Event SatelliteReceived(ByVal pseudoRandomCode As Integer, _

20 ByVal azimuth As Integer, _

21 ByVal elevation As Integer, _

22 ByVal signalToNoiseRatio As Integer)

23 ' Processes information from the GPS receiver

24 Public Function Parse(ByVal sentence As String) As Boolean

25 ' Discard the sentence if its checksum does not match our calculated

26 ' checksum

27 If Not IsValid(sentence) Then Return False

28 ' Look at the first word to decide where to go next

29 Select Case GetWords(sentence)(0)

30 Case "$GPRMC" ' A "Recommended Minimum" sentence was found!

31 Return ParseGPRMC(sentence)

32 Case "$GPGSV" ' A "Satellites in View" message was found

33 Return ParseGPGSV(sentence)

34 Case Else

35 ' Indicate that the sentence was not recognized

36 Return False

37 End Select

38 End Function

39 ' Divides a sentence into individual words

40 Public Function GetWords(ByVal sentence As String) As String()

41 Return sentence.Split(","c)

42 End Function

43 ' Interprets a $GPRMC message

44 Public Function ParseGPRMC(ByVal sentence As String) As Boolean

上一页  12 13 14 15 16 17 18 19 20 21 22  下一页

Tags:WM 平台 开发

编辑录入:coldstar [复制链接] [打 印]
赞助商链接