Hi! We see you’re using an ad-blocker. We’re fine with that and won’t stop you visiting the site.
But as we’re losing ad-revenue from this then why not make a donation towards website running costs?. Or you could disable your ad-blocker for this site. We think you’ll find our adverts are not overbearing!
Joined: 23/02/2003 18:04:16 Posts: 44 Location: United Kingdom
Posted: Thu Oct 16, 2003 9:55 am Post subject: iPaq + GPS +Phone based tracking system...
I have some ideas to create a system where an iPaq sends out the latest co-ords from a GPS receiver (either BT or connected) via SMS/email using a connected GPRS/dialup cellphone.
On the other end will be a server accepting sms's with these co'ords which will auto plot them onto a map for a user to see.
I have the backend system working, but have absolutely no idea how to go about getting the ipaq to sms/email out the co-ords.
Joined: 11/07/2002 14:36:40 Posts: 23848 Location: Hampshire, UK
Posted: Thu Oct 16, 2003 10:02 am Post subject:
You may be re-inventing the wheel here, there are other products which do just this, TrakM8 is one example but there are others. Basically they are a GPS Receiver and GSM Cellphone in a single balck box, GPS Co-Ords can be sent to a PC or interrogated via SMS Text messaging etc _________________ Darren Griffin
Joined: 23/02/2003 18:04:16 Posts: 44 Location: United Kingdom
Posted: Thu Oct 16, 2003 10:12 am Post subject:
Thanks Darren.
I already know about the single box affairs, but since I already have a cell phone, an ipaq and a gps I don't really want to buy anymore kit that should already be capable of doing the job.
It should be possible on the hardware I currently have. It should even be possible when the ipaq is running tomtom, maybe an app can get the co-ords from the log file ?
Joined: 11/07/2002 14:36:40 Posts: 23848 Location: Hampshire, UK
Posted: Thu Oct 16, 2003 10:19 am Post subject:
Understood For a start I imagine you would need the TomTom SDK to allow you to extract the position information whilst TTNav is running. From there it would be a case of writing an app in VisualCE to send the data via SMS.
One of our team, Lutz may be able to point you in the write direction in this regard, I'll point him to this thread, programming is waaaay out of my field of expertise _________________ Darren Griffin
Joined: 02/11/2002 22:41:59 Posts: 11878 Location: Massachusetts, USA
Posted: Thu Oct 16, 2003 2:30 pm Post subject:
This is relatively easy to achieve as long as you do NOT use TomTom GPS - only one program at a time can listen to the "serial port" -whichever you use.
I would craft a eVB (embedded Visual Basic) program that
- listens to the NMEA stream on the GPS com port (i've done that already for a GPS logger and could show you the code)
- triggered by a timer formats an AT command for sending an SMS (this is pretty standardized but your phone manufacturer should also be able to give yiou the details)
Getting the data from the TomTom log file may be the more difficult solution - not sure they let you peek into the file while TomTom is running, and then you would always have to parse the whole file - not exactly fast... _________________ Lutz
which looks very interesting. it relies on a constant connection between the phone and the ipaq ala GPRS but looks interesting. I am having play with it now.
Joined: 02/11/2002 22:41:59 Posts: 11878 Location: Massachusetts, USA
Posted: Thu Oct 16, 2003 6:37 pm Post subject:
Just as Darren said- there are plenty of tools out there.
Anyhow, here's some of the code. You need the comm control and a timer (once a second). THe Plotbearings function is where you do something with the data - in your case you could create another comm control to send th AT command to the mobile
===========================
Private Sub Form_OKClick()
MSComm1.PortOpen = False
App.End
End Sub
Private Sub Timer1_Timer()
On Error Resume Next
strUnparsed = strUnparsed & MSComm1.Input
ParseInput
End Sub
Sub ParseInput()
Dim crpos
If Len(strUnparsed) = 0 Then Exit Sub
crpos = InStr(1, strUnparsed, vbCr)
Do While crpos > 0
strCurrent = Mid(strUnparsed, 1, crpos - 1)
strUnparsed = Mid(strUnparsed, crpos + 2)
'If InStr(1, strCurrent, "$GPRMC") Then ParseRMC strCurrent
If InStr(1, strCurrent, "$GPGSV") Then ParseGSV strCurrent
'If InStr(1, strCurrent, "$GPGGA") Then ParseGGA strCurrent
crpos = InStr(1, strUnparsed, vbCr)
Loop
End Sub
Sub ParseRMC(inrmc As String)
' $GPRMC,031736,V,4043.3101,N,07317.5308,W,0.000,0.0,120800,14.1,W*52
Dim rmcdata(12) As String
Dim token, tokenpos, oldtokenpos
Dim outrmc
token = ","
tokenpos = 0
oldtokenpos = 1
outrmc = inrmc
For n = 1 To 11
tokenpos = InStr(oldtokenpos + 1, outrmc, token)
curstr = Mid(outrmc, oldtokenpos + 1, tokenpos - oldtokenpos - 1)
If n = 2 Then
If Len(curstr) > 0 Then lblUTC = Mid(curstr, 1, 2) & ":" & Mid(curstr, 3, 2) & ":" & Mid(curstr, 5, 2) & " GMT"
End If
If n = 3 Then
If (Mid(curstr, 1, 1) = "V") Then
lblStatus.ForeColor = RGB(255, 0, 0)
lblStatus.Caption = "AWAITING FIX"
ElseIf (Mid(curstr, 1, 1) = "A") Then
lblStatus.ForeColor = RGB(0, 128, 0)
lblStatus.Caption = "SATS OK"
End If
End If
If n = 4 Then
lblLat.Caption = (curstr / 100)
curlat = curstr / 100
End If
If n = 5 Then lblLat.Caption = lblLat.Caption & curstr
If n = 6 Then
lblLong.Caption = (curstr / 100)
curlng = -(curstr / 100)
End If
If n = 7 Then lblLong.Caption = lblLong.Caption & curstr
If n = 8 Then
If (curstr * 1.151) > maxspd Then
maxspd = (curstr * 1.151)
End If
spdstrg = (Int(100 * curstr * 1.151) / 100) & " MPH"
lblSpeed.Caption = spdstrg
lblMaxMPH.Caption = Int(100 * maxspd) / 100
End If
If n = 9 Then
' lblTrack = "Track: " & curstr
PlotBearings picBearings, 0# + curstr
End If
If n = 10 Then
lblDate = Mid(curstr, 1, 2) & "-" & Mid(curstr, 3, 2) & "-" & Mid(curstr, 5, 2)
End If
oldtokenpos = tokenpos
Next
' lblLat, lblLong
' ** 1) UTC Time
' ** 2) Status, V = Navigation receiver warning
' ** 3) Latitude
' ** 4) N or S
' ** 5) Longitude
' ** 6) E or W
' ** 7) Speed over ground, knots
' ** 8) Track made good, degrees true
' ** 9) Date, ddmmyy
' ** 10) Magnetic Variation, degrees
' ** 11) E or W
' ** 12) Checksum
End Sub
Sub ParseGGA(ingga As String)
' $GPGGA,120757,5152.985,N,00205.733,W,1,06,2.5,121.9,M,49.4,M,,*52
Dim hDC, hWnd
Dim ggadata(12) As String
token = ","
tokenpos = 0
oldtokenpos = 1
outgga = ingga
For n = 1 To 11
tokenpos = InStr(oldtokenpos + 1, outgga, token)
curstr = Mid(outgga, oldtokenpos + 1, tokenpos - oldtokenpos - 1)
If n = 2 Then
If Len(curstr) > 0 Then lblUTC = Mid(curstr, 1, 2) & ":" & Mid(curstr, 3, 2) & ":" & Right(curstr, 2) & " GMT"
End If
If n = 3 Then
lblLat.Caption = (curstr / 100)
curlat = curstr / 100
End If
If n = 4 Then lblLat.Caption = lblLat.Caption & " " & curstr
If n = 5 Then
lblLong.Caption = (curstr / 100)
curlng = -(curstr / 100)
End If
If n = 6 Then
lblLong.Caption = lblLong.Caption & " " & curstr
End If
If n = 10 Then
altft = (curstr * 39.36) / 12
If altft > maxalt Then
maxalt = altft
lblMaxAlt.Caption = Mid(altft, 1, 6)
End If
'1 time of fix (hhmmss),
'2 latitude,
'3 N/S,
'4 longitude,
'5 E/W,
'6 Fix quality (0=invalid, 1=GPS fix, 2=DGPS fix),
'7 number of satellites being tracked,
'8 horizontal dilution of position,
'9 altitude above sea level,
'10 M (meters),
'11 height of geoid (mean sea level) above WGS84 ellipsoid,
'12 time in seconds since last DGPS update,
'13 DGPS station ID number,
'14 checksum
End Sub
Sub ParseGSV(ingsv As String)
'$GPGSV,2,2,08,05,31,055,29,11,14,290,,15,13,221,28,23,13,152,*7B
'$GPGSV,t,m,n,ii,ee,aaa,ss,ii,ee,aaa,ss,ii,ee,aaa,ss,ii,ee,aaa,ss*C
't number of messages 1 .. 4
'm message number 1 .. 4
'n total number of satellites in view
'For each visible satellite (four groups per message)
'ii satellite PRN number
'ee elevation (degrees) 0 .. 90
'aaa azimuth (degrees True) 0 .. 359
'ss SNR (dB) 0 .. 99
'CC checksum
'Debug.Print ingsv
On Error Resume Next
token = ","
tokenpos = 0
oldtokenpos = 1
Posted: Today Post subject: Pocket GPS Advertising
We see you’re using an ad-blocker. We’re fine with that and won’t stop you visiting the site.
Have you considered making a donation towards website running costs?. Or you could disable your ad-blocker for this site. We think you’ll find our adverts are not overbearing!
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
Or you could disable your ad-blocker for this site. We think you’ll find our adverts are not overbearing!
Hi! We see you’re using an ad-blocker. We’re fine with that and won’t stop you visiting the site.
But as we’re losing ad-revenue from this then why not make a donation towards website running costs?. Or you could disable your ad-blocker for this site. We think you’ll find our adverts are not overbearing!