gps_tracker GPS Position Logging Program

Latitude and longitude are recorded as measurements.

A script task runs periodically:
  • Task ensures the GPS is on
  • Task reads the position for the GPS and stores it into global variables
Two measurements are associated with scripts:
  • One reads the latitude from the global variable
  • The other reads the longitude from the global variable
  • The measurements need to be scheduled right after the script task

A Sat/XLink setup is associated with this module: gps_tracker_setup.txt


Appened m_latitude and m_longitude to transmission.

gps_tracker.convert_to_decimal_degrees(degrees, minutes, seconds)

converts degrees minutes seconds into degrees with decimal places

Task has two functions:
  • Make sure the GPS stays on all the time
  • Read the position from the GPS and store it in globals

Task should be scheduled to run periodically, every 5 minutes.

It should happen 30 seconds before the latitude and longitude meas.


Parses Satlink’s STATUS GPS looking for the latitude and longitude.

Example reply when no locati on:

GPS Sync in progress    GPS tracking satellites
Clock has NOT been synced to GPS.
Signal Quality (SatID/Signal CNo): 1/46 3/46 6/43 11/38 17/45 18/36 19/40 22/42 24/37 28/43 at 2018/08/14 15:12:26

And with location:

GPS Sync in progress    GPS acquiring almanac
Last sync to GPS was at 2018/08/14 15:12:48
Last sync is valid till 2018/09/13 15:12:48
GPS was powered for 00::00:01:04 before it acquired satellite lock
Lat N 38o 59' 50.01" Long W 77o 25' 24.46" Alt 134.6m(441.5ft)
Signal Quality (SatID/Signal CNo): 1/44 3/45 6/41 11/34 17/45 18/35 19/39 22/41 24/34 28/41 at 2018/08/14 15:12:41

We want this line:

Lat N 38o 59' 50.01" Long W 77o 25' 24.46" Alt 134.6m(441.5ft)

Gets the current STATUS GPS and parses the location from it.

Returns:latitude, longitude
Return type:float, float

Associate with a measurement to have it log latitude. The measurement should be setup as manual entry.

Please note that this returns a result of zero until the task gps_keep_on_and_read_position is run


Like meas_latitude, but for longitude


Verifies that gps_read_position works

gps_tracker.version_needs_check = True

In order to assure that both latitude and longitude are read at the same time, we will have a Satlink task read the GPS status and store the latitude and longitude globally.