SignalK / specification

Signal K is a JSON-based format for storing and sharing marine data from different sources (e.g. nmea 0183, 2000, seatalk, etc)
Other
91 stars 68 forks source link

Refine the use of courseGreatCircle & courseRhumbline #636

Closed panaaj closed 2 years ago

panaaj commented 2 years ago

Currently the spec defines course which is then applied to create the following paths:

Both of these paths duplicate all attributes contained in the course definition including "non-calculated" values like nextPoint.position, previousPoint.position, activeRoute, etc.

My proposal is that the "non-calculated" values are moved to a navigation.course path with only the calculated values remaining in the respectivecourseGreatCircle and courseRhumbline paths.

"course": {
    "activeRoute":
    {
       "href":...,
      "startTime":...,
      ...
    },
    "nextPoint": {
      "href":...,
      "type":...,
      "position":"position": {"latitude":..,"longitude":...},
      "arrivalCircle":...
     },
     "previousPoint":{ 
       "href":...,
       "type":...,
       "position": {"latitude":..,"longitude":...}
     }
},
"courseGreatCircle": {
     "crossTrackError":...,
     "bearingTrackTrue": ...,
     "bearingTrackMagnetic": ..,
     "distance": ...,
     "bearingTrue":...,
     "bearingMagnetic":...,
     "velocityMadeGood": ...,
     "timeToGo": ...,
     "estimatedTimeOfArrival":...
},
"courseRhumbline": {
     "crossTrackError":...,
     "bearingTrackTrue": ...,
     "bearingTrackMagnetic": ..,
     "distance": ...,
     "bearingTrue":...,
     "bearingMagnetic":...,
     "velocityMadeGood": ...,
     "timeToGo": ...,
     "estimatedTimeOfArrival":...
}