A hardware tracker sends the truck's position even when the driver's phone is off. You will be able to tie a tracker to a truck and see its positions on the customer's live map.
Before you start #
- You need the owner or manager role to register a tracker. The tracker (or the small program that forwards its messages) signs in as a driver login and sends to Pop Dispatch over your public address.
- Each tracker has a device id, a short name printed on it or set in its settings (up to 64 characters).
Steps #
- Choose the truck's id from the Trucks list.
- Register the tracker with the truck: send the device id and the truck id to Register a hardware tracker on a truck (
POST /gps/trackers). Registering the same device id again moves it to another truck. - Point the tracker at Pop Dispatch. It sends either an NMEA RMC sentence to
/gps/nmeaor an OsmAnd query to/gps/osmand. Add thedevice_idfield to each message. - Pop Dispatch decodes each message, stores the position with the source marked as hardware, moves the truck and, when a driver on shift uses that truck, moves the driver's position too.
- While that driver has a tow call or a taxi trip open, each position also joins the trail of that job. The customer's map draws the trail.
- Open
GET /gps/trackersto list the registered trackers and their trucks.
What stays private #
The customer page shows a position only while the job is open and the last position is under 15 minutes old. A customer page drops every tracker position when the job ends.
Technical details
POST /gps/nmeatakessentenceanddevice_id.POST /gps/osmandtakesqueryanddevice_id. The answer holdslat,lng,speed_knotsandstored.storedis false for an unregistered device id; the message is still decoded.- Each stored message adds a row to
position_history(sourcehardware) and a numbered sequence for the device, and updates the truck's last position. - Job trails are kept in
job_position_trailand follow the GPS retention period in the privacy settings.
If something goes wrong #
storedis false: register the device id first.No such truck.(404): the truck id belongs to a vehicle outside your own fleet.- A tracker position shows on the map but not on the customer page: the truck's driver is off shift or has no open job.