-
-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: Add NMEA stream handling to Course API. #1750
base: master
Are you sure you want to change the base?
Conversation
Set / clear destination from NMEA stream data.
Fixes issue of corrupted nextPoint value when emitting v1 course delta.
Setting this param causes the stream input to be ignored until the endpoint is called again without specifying `force`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did I understand the idea here correctly: we don't touch the 0183 and N2K parsers and instead make course API act on the sk messages they produce?
Short answer is yes. After considering a number of approaches I landed on this approach for the following reasons:
|
Provide the ability for the Course API to set the destination based on the data received from NMEA connections.
Delta messages with a source.type of NMEA0183 or NMEA2000 containing path values for
navigation.courseRhumbline.nextPoint.position
ORnavigation.courseGreatCircle.nextPoint.position
will trigger invoke the course
setDestination()
method.Source priorities:
The following priorities are applied when determining whether a destination will be set from an NMEA delta:
nextPoint.position
data will be usedApproach:
A subscription has been added to the Course API for the paths
navigation.courseRhumbline.nextPoint.position
ORnavigation.courseGreatCircle.nextPoint.position
to listen for deltas generated by NMEA data connections and set / clear the destination using API methods.Clearing a destination using an API request, when an NMEA source still has an active destination, requires
clearDestination(true)
to forceapi only
mode, which will cause delta messages to be ignored until:clearDestination()
tis called ORDELETE ./course/commandSource
HTTP request is made.