GooPs can receive data from other applications via a TCP/IP socket. GooPs listens on port 51234 for messages containing NMEA data. If the message is a raw NMEA sentence GooPs will append it to the local vehicle’s data. If the NMEA string is prepended with an ID and host name. GooPs will treat it
as a remote vehicle. GooPs will automatically add any remote vehicle that hasn’t already been manually added.
The format is:
<id>@<host>:<nmea sentence>
Example:
joe@joescar:$GPRMC,130043,A,3731.5300,N,12221.2400,W,1.0,0.0,082507,0.0,E,A*01
- here is no requirement on the id and host names, they are only used to identify the vehicle in the user interface.
- The socket must be closed and reopened for each message.
- A message can contain multiple NMEA sentences separated by an ascii carriage return/line feed (cr/lf)
- You can save bandwidth by only sending GPRMC, GPGGA, and GPVTG sentences. All others are ignored.
- Unless you need altitude data you can just send $GPRMC sentences.
- Currently only status, timestamp, latitude, longitude, altitude, speed, and heading fields are used)
$GPRMC format:
$GPRMC,hhmmss.ss,st,ddmm.mmmm,ns,dddmm.mmmm,ew,spd,crs,date,mvd,mvcs
hhmmss.ss in UTC (coordinated universal time zone). UTC used be known as GMT.
st Status A = Valid, V = Invalid
ddmm.mmmm latitude of the GPS position fix
ns N/S Indicator S N = North, S = South
dddmm.mmmm longitude of the GPS position fix
ew E/W Indicator E E = East, W = West
spd Speed over ground in Knots
crs Course over ground 0.00 Degrees
date UTC Date 211200 DDMMYY
mvd Magnetic variation Degrees
mv Magnetic variation E = East, W = West
cs Checksum *25
Terminator CR/LF
$GPGGA format:
($GPGGA is only necessary if you need altitude data)
$GPGGA,hhmmss.ss,ddmm.mmmm,n,dddmm.mmmm,e,q,ss,y.y,a.a,z,g.g,z,t.t,iiics
hhmmss.ss in UTC (coordinated universal time zone). UTC used be known as GMT.
ddmm.mmmm,N latitude of the GPS position fix
dddmm.mmmm,W longitude of the GPS position fix
q quality of the GPS fix (1 = fix, but no differential correction)
ss number of satellites being used
y.y horizontal dillution of precision
a.a,M GPS antenna altitude in meters
g.g,M geoidal separation in meters
t.t age of the deferrential correction data
iiii deferential station’s ID
cs Checksum *25
Terminator CR/LF
Algorithm for using the GooPs external API:
For each position received
Format the position data into an NMEA sentence as described above.
Calculate and append the NMEA checksum.
Prepend a name and host to the NMEA sentence.
Create and open the the socket (the destination is port 51234).
Send the sentence.
Close the socket.