You will be able to send positions from a driver's phone in batches, rely on tracking running only while the driver is on a shift or a trip, read the last known position of every active asset, and see where a track has gaps. The map screen arrives with the web console; the list at /fleet/live is available now.

Before you start #
- The
dispatch_fleetlicense flag is on. Every Pop Dispatch license includes Fleet, and the trial runs for 30 days. - The driver or asset exists. The driver's profile is marked on shift, or a trip is running.
- Each device has a stable
device_id, and each position has aseqnumber that rises with every position that device sends.
Steps #
- Send
POST /fleet/positionswithdevice_id, exactly one ofasset_idorperson_id, andfixes, a list of 1 to 1000 positions. Addtrip_idand asourceofphone(default),http_trackerorhardware. - Give each fix
seq,lat,lngandrecorded_at. You can addaccuracy_m,speed_cm_sandheading_deg. - Read the answer:
accepted,duplicates, arejectedlist with a reason for each, andtracking, which says whether the subject is on shift and whether a trip is active. - Send the same batch again if the connection dropped. Positions with a
device_idandseqPop Dispatch already holds are counted asduplicatesand stored once. - Read the last known position of every active asset with
GET /fleet/live. - Read a track with
GET /fleet/assets/:id/positions, with optionalfromandto. The default is the last 24 hours.
Tracking only during a shift or a trip #
A position is stored only while the driver is on a shift or a trip is running for the driver or asset. At any other time the fix is rejected with the message "Tracking runs only during a shift or a trip." The tracking block in every answer reports the current state, so the driver app can show the driver that tracking is on or off at that moment. The Fleet screens for this arrive with the web console.
A fix is also rejected when the position is outside the range of Earth (a latitude beyond 90 or a longitude beyond 180) or when the device or sequence number is missing ("A position needs a device and a sequence number.").
Gaps #
A gap is a stretch longer than 5 minutes between two stored positions. A phone that lost signal leaves a gap, and the track response returns the number of gaps. A gap marks missing positions. Pop Dispatch draws no line across it as if the vehicle had been seen there.
Distance from positions #
The track response includes estimated_distance_m, worked out along the track from fixes whose accuracy is 100 m or better. It is an estimate for the screen. It never writes the odometer, so the odometer and the cost reports keep using meter readings.
Technical details
- Uniqueness is on tenant,
device_idandseq, so a repeat is dropped by the database. - The newest fix in a batch updates the last known position of the asset or driver profile, only when it is newer than the one stored.
- Live reads list active operator assets that have a stored position, with
unit_no,label,lat,lngandlast_ping_at. - A track answer holds up to 5000 positions for the period.
- A trip's
gps_distance_mis stored as given and shown as an estimate.
If something goes wrong #
feature_not_licensed(403),licence_read_only(403): uploads stop until the flag or license is restored.validation_failed(422): both or neither ofasset_idandperson_idwere sent,sourceis unknown,fixesis empty or above 1000, ordevice_idis missing.not_found(404): the asset, person or trip does not exist.- Every fix is in
rejectedwith the tracking message: start the trip or put the driver on shift, then send the batch again. The rejected positions were not stored.