Skip to content

Track API #363

@tkurki

Description

@tkurki

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... }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions