I added track handling as part of the http API to the Node server InfluxDb plugin.
it creates a /track endpoint under self vessel, but I don't see why the same API could not be used for any vessel.
The endpoint accepts two query parameters, timespan and resolution, each in in xxxY format, where xxx is a Number and Y one of
- s (seconds)
- m (minutes)
- h (hours)
- d (days)
- w (weeks)
Duration expression is a direct copy from InfluxDb's duration, just omitting ms and us.
The response is a GeoJSON MultiLineString with proper mime type application/vnd.geo+json.
The big difference here is that this is real API endpoint as opposed to just adding stuff to the Signal K full document and the equivalent RESTish paths. I don't think it makes sense to include this data in the full response, as the data is different in nature (historical time series) versus latest values.
Per the current implementation the track is just a MultiLineString: a list of position lists. There is no time data in the response. I am not aware of any standard way to represent tracks with time information. I think it would be a good idea to define either a separate mime type (application/json comes to mind) or an optional query string that would allow you to retrieve the same MultiLineString plus the corresponding timestamp data in two top level properties:
{
timestamp: [ [...], [...],...]
geojson: {...MultiLineString data... }
}
I added track handling as part of the http API to the Node server InfluxDb plugin.
it creates a
/trackendpoint under self vessel, but I don't see why the same API could not be used for any vessel.The endpoint accepts two query parameters,
timespanandresolution, each in in xxxY format, wherexxxis a Number andYone ofDuration expression is a direct copy from InfluxDb's duration, just omitting ms and us.
The response is a GeoJSON MultiLineString with proper mime type
application/vnd.geo+json.The big difference here is that this is real API endpoint as opposed to just adding stuff to the Signal K full document and the equivalent RESTish paths. I don't think it makes sense to include this data in the full response, as the data is different in nature (historical time series) versus latest values.
Per the current implementation the track is just a MultiLineString: a list of position lists. There is no time data in the response. I am not aware of any standard way to represent tracks with time information. I think it would be a good idea to define either a separate mime type (application/json comes to mind) or an optional query string that would allow you to retrieve the same MultiLineString plus the corresponding timestamp data in two top level properties: