Live Tracking Improvements

There are a few clunky things about live tracking that can be improved.

firmware

Synchronize reporting with the GPS clock so broadcast intervals are on the 20 second mark exactly.

map

Show the percentage of missing reports over the last ten periods.

Show the average speed between the most recent successful reports.

Extrapolate where missing reports might be expected based in speed and heading last observed.

table

Elide reports when not in motion.

Tally missing reports for a given locale.

live

✔︎ Refresh the map data within the app without reloading leaflet or even previous reports.

✔︎ Refresh automatically within seconds of when we can reasonably expect new reports to have arrived.

.

Now adjusting when I fetch for new data allowing five seconds to travel to my server. Expected lag is 5 seconds. I have seen lag running from 2.5 to 3.5 seconds so 5 seemed a safe number. Phase is how my sampling time deviates from the browsers sense of real time.

Uploaded image

Lag hovers around 5 seconds except when I grab the t-beam antenna forcing a dropped payload. Lag then gets large and my servo searches for the next payload.

Overall performance is good. Green line shows my map is consistently 5 seconds behind when there is smooth data flowing. Blue line shows tbeam is running a little slower than 20 seconds between transmissions.