Further thinking, this could be done in code, as long as:
a) You could create a virtual Com port which you can point the GPS Software to
b) You have a way of getting Vehicle Speed/Direction INTO the computer
Now the following is just pseudocode dribble, but it might help someone who can work out how to achieve the 2 points above:
Code:
Variable Descriptions:
X=Coordinate (the further north you go = the lower the x coordinate; is this how GPS coordinates work? If not, then some of the calculations below might need changing)
Y=Coordinate
V=Velocity (MS)
D=Direction (0-359 degrees)
Timer=500Ms (User Settable)
Sample Pseudocode:
===============
Main.Initialize
'Get starting coordinates. If no lock is present, read last known coordinates from file
If Not ReadGPSNMEAString() Then
ReadLastCoordinatesFromfile()
EndIf
End Main.Initialize
Event Timer.Tick
If ReadGPSNMEAString() Then 'GPS Lock exists
'Bypass coordinate calculations
TransmitNewGPSData()
WriteCoodinatesToFile() 'Always write last coordinates to file - incase user shuts down at this point
Else 'No Lock exists
'Process last known Speed/Direction values
Select Case D '(Direction)
Case 0:
X=X-(V*(1000/Timer))
Case 90:
Y=Y+(V*(1000/Timer))
Case 180:
X=X+(V*(1000/Timer))
Case 270:
Y=Y-(V*(1000/Timer))
Case Else:
DeltaX=Sin(D) * (V*(1000/Timer))
DeltaY=Cos(D) * (V*(1000/Timer))
X=X-DeltaX
Y=Y-DeltaY
End Select
'Send new coordinates to fake com port
TransmitNewGPSData()
WriteCoordinatesToFile() 'Always write last coordinates to file - incase user shuts down at this point
'Get New Speed/Direction coordinates (this is assumed to be the vehicle's direction for until the next timer tick)
V=GetVehicleSpeed()
D=GetDirection
End If
End Event
Procedure ReadGPSNMEAString()
'Get X & Y Coordinates
'Calculate velocity and Direction
End Procedure
Bookmarks