openSenseMap-API
openSenseMap-API copied to clipboard
Implement concept of "tracks" for mobile boxes
From a discussion between @noerw @mpfeil and @ubergesundheit
Currently, the route /boxes/:boxId/locations returns all locations ever recorded for a box. The response is used for draw the locations of the box on the map.
Opening a graph of a sensor displays the last recorded 48 hours.
There is a visual connection between the locations on the map and the graph. (with colors, on mouseover, ...)
Several Problems:
- If there are many locations, displaying will be cluttered and slow
- Only the last recorded 48 hours will be colored?
We need a concept of "tracks" for mobile boxes to organize and unclutter measurements.
- Tracks are saved in the box as an array of timestamps (optional with a name)
- A route (for example
/boxes/:boxId/tracks/start) starts a new track and saves the start timestamp in thetracksfield of a box. - Starting a new track ends the previous track (by saving a new timestamp in the
tracksarray) - Measurements can then be queried through limiting the timestamp to a tracks start and the next tracks start timestamp
Later:
- Routes for track management
- Renaming
- Deleting
Anything I forgot @noerw @mpfeil ?
This feature should fall back gracefully when no track is ever created by the user. This would be useful for continuously running devices. Options that come to mind:
- (currently implemented) limit the shown trajectory to the same time interval as for measurements (currently 48h)
- autodetect tracks by finding gaps of more than 30minutes in the location history
- autodetect tracks based on some spatiotemporal filter (distance per hour?)
also: :100:
we should also include @robarto to this discussion