📄 frmgpsboy.frm
字号:
VERSION 5.00
Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "MSCOMM32.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
Begin VB.Form frmGPSBoy
BorderStyle = 1 'Fixed Single
Caption = "GPSBoy by Joshua Trupin"
ClientHeight = 6345
ClientLeft = 45
ClientTop = 615
ClientWidth = 9885
Icon = "frmGPSBoy.frx":0000
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 423
ScaleMode = 3 'Pixel
ScaleWidth = 659
Begin VB.PictureBox picSpeed
Appearance = 0 'Flat
AutoRedraw = -1 'True
BackColor = &H80000005&
ForeColor = &H80000008&
Height = 1695
Left = 6120
ScaleHeight = 111
ScaleMode = 3 'Pixel
ScaleWidth = 23
TabIndex = 23
Top = 2640
Width = 375
End
Begin VB.PictureBox picAlt
Appearance = 0 'Flat
AutoRedraw = -1 'True
BackColor = &H80000005&
ForeColor = &H80000008&
Height = 1695
Left = 3720
ScaleHeight = 111
ScaleMode = 3 'Pixel
ScaleWidth = 111
TabIndex = 19
Top = 2640
Width = 1695
End
Begin VB.PictureBox picBearings
Appearance = 0 'Flat
AutoRedraw = -1 'True
BackColor = &H80000005&
ForeColor = &H80000008&
Height = 1695
Left = 1920
ScaleHeight = 360
ScaleMode = 0 'User
ScaleWidth = 360
TabIndex = 17
Top = 2640
Width = 1695
End
Begin VB.PictureBox picCompass
Appearance = 0 'Flat
AutoRedraw = -1 'True
BackColor = &H80000005&
ForeColor = &H80000008&
Height = 1695
Left = 120
ScaleHeight = 360
ScaleMode = 0 'User
ScaleWidth = 360
TabIndex = 15
Top = 2640
Width = 1695
End
Begin MSComDlg.CommonDialog CmnDlg
Left = 5520
Top = 240
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.ListBox lstSats
Height = 2940
Left = 6960
TabIndex = 10
Top = 240
Width = 2775
End
Begin VB.CommandButton btnMap
Caption = "Map"
Height = 495
Left = 4200
TabIndex = 8
Top = 120
Width = 1095
End
Begin VB.Timer Timer1
Interval = 1000
Left = 5880
Top = 120
End
Begin MSCommLib.MSComm MSComm1
Left = 6240
Top = 120
_ExtentX = 1005
_ExtentY = 1005
_Version = 393216
DTREnable = -1 'True
BaudRate = 4800
End
Begin VB.TextBox txtDisplay
Height = 735
Left = 120
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 2
Top = 720
Width = 6735
End
Begin VB.CommandButton btnStop
Caption = "Stop"
Height = 495
Left = 2160
TabIndex = 1
Top = 120
Width = 1935
End
Begin VB.CommandButton btnGo
Caption = "Go"
Height = 495
Left = 120
TabIndex = 0
Top = 120
Width = 1935
End
Begin VB.Label Label9
Caption = "100"
Height = 255
Left = 6600
TabIndex = 26
Top = 2640
Width = 375
End
Begin VB.Label Label8
Caption = "0"
Height = 255
Left = 6600
TabIndex = 25
Top = 4080
Width = 255
End
Begin VB.Label Label7
Caption = "Speed"
Height = 255
Left = 6120
TabIndex = 24
Top = 4320
Width = 615
End
Begin VB.Label Label6
Caption = "100"
Height = 255
Left = 5520
TabIndex = 22
Top = 4080
Width = 375
End
Begin VB.Label Label5
Caption = "300"
Height = 255
Left = 5520
TabIndex = 21
Top = 2640
Width = 375
End
Begin VB.Label Label4
Caption = "Altitude"
Height = 255
Left = 3720
TabIndex = 20
Top = 4320
Width = 1455
End
Begin VB.Label lblDirection
Caption = "Direction"
Height = 255
Left = 1920
TabIndex = 18
Top = 4320
Width = 1455
End
Begin VB.Label Label3
Caption = "Satellites"
Height = 255
Left = 120
TabIndex = 16
Top = 4320
Width = 1575
End
Begin VB.Label Label2
Caption = "Satellites:"
Height = 255
Left = 6960
TabIndex = 14
Top = 0
Width = 855
End
Begin VB.Label lblTrack
Caption = "Track:"
BeginProperty Font
Name = "Arial"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3360
TabIndex = 13
Top = 2280
Width = 2775
End
Begin VB.Label lblStatus
BeginProperty Font
Name = "Arial"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 4080
TabIndex = 12
Top = 2040
Width = 2175
End
Begin VB.Label Label1
Caption = "Status:"
BeginProperty Font
Name = "Arial"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3360
TabIndex = 11
Top = 2040
Width = 735
End
Begin VB.Label lblAlt
Caption = "Alt (m):"
BeginProperty Font
Name = "Arial"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3360
TabIndex = 9
Top = 1800
Width = 3255
End
Begin VB.Label lblSpeed
Caption = "Speed (mph):"
BeginProperty Font
Name = "Arial"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3360
TabIndex = 7
Top = 1560
Width = 3495
End
Begin VB.Label lblDate
Caption = "Date:"
BeginProperty Font
Name = "Arial"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 6
Top = 2280
Width = 3135
End
Begin VB.Label lblUTC
Caption = "Time:"
BeginProperty Font
Name = "Arial"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 5
Top = 2040
Width = 2415
End
Begin VB.Label lblLong
Caption = "Long:"
BeginProperty Font
Name = "Arial"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 120
TabIndex = 4
Top = 1800
Width = 3135
End
Begin VB.Label lblLat
Caption = "Lat:"
BeginProperty Font
Name = "Arial"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 120
TabIndex = 3
Top = 1560
Width = 3135
End
Begin VB.Menu mnuFileTop
Caption = "&File"
Begin VB.Menu mnuFileEmulate
Caption = "&Emulate"
Shortcut = ^E
End
Begin VB.Menu mnuFileExit
Caption = "&Exit"
Shortcut = ^X
End
End
End
Attribute VB_Name = "frmGPSBoy"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, _
ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, _
ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, _
ByVal ySrc As Long, ByVal dwRop As Long) As Long
Dim allsats(12) As Integer
Dim elev(12) As Integer
Dim azim(12) As Integer
Dim sigstr(12) As Integer
Dim flag
Dim strUnparsed As String
Dim strCurrent As String
Dim FOut As Object
Dim fs As Object
Dim curlat, curlng
Dim maxspd
Private Sub btnGo_Click()
maxspd = 0
curlat = 33.386
curlng = -111.55
If mnuFileEmulate.Checked Then
CmnDlg.DialogTitle = "Open a saved GPS log"
CmnDlg.FileName = "gpsout.txt"
CmnDlg.ShowOpen
Set FOut = fs.OpenTextFile(CmnDlg.FileName, 1) ' open for reading
End If
If Not mnuFileEmulate.Checked Then
CmnDlg.DialogTitle = "Open a saved GPS log"
CmnDlg.FileName = "gpsout.txt"
CmnDlg.ShowOpen
Set FOut = fs.CreateTextFile(CmnDlg.FileName, 2) ' open for writing
If MSComm1.PortOpen = False Then
MSComm1.CommPort = 1
MSComm1.Settings = "4800,N,8,1"
MSComm1.PortOpen = True
'Turn off GPRMC msgs
'MSComm1.Output = "$PRWIILOG,RMC,V,,," & vbCrLf
'Turn on GPRMC msgs
'MSComm1.Output = "$PRWIILOG,RMC,A,,," & vbCrLf
' Turn on GPMRC msgs every 2 seconds
MSComm1.Output = "$PRWIILOG,RMC,A,T,2,0" & vbCrLf
' Turn on GPGGA msgs every 2 seconds
MSComm1.Output = "$PRWIILOG,GGA,A,T,2,0" & vbCrLf
' Turn off PRWIZCH messages
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -