Signal K data parsing - Printable Version +- OpenMarine (https://forum.openmarine.net) +-- Forum: OpenPlotter (https://forum.openmarine.net/forumdisplay.php?fid=1) +--- Forum: General discussion (https://forum.openmarine.net/forumdisplay.php?fid=2) +--- Thread: Signal K data parsing (/showthread.php?tid=3097) |
Signal K data parsing - Techstyle - 2020-11-18 I am running OP2.5, have a GPS puck set up and have OpenCPN setup to send APB and RMB data back to signal K. I see many Signal K phrases parsed from the NMEA0183 RMB sentence (items 2, 6-12 from the list below), but I dont see one for Steer direction (item 3). this component is also not parsed from APB. what decides which parts of which sentences are parsed and How would I go about extracting that data? RMB - Recommended Minimum Navigation Information[url=https://opencpn.org/wiki/dokuwiki/doku.php?id=opencpn:opencpn_user_manual:advanced_features:nmea_sentences#rmb_-_recommended_minimum_navigation_information][/url] To be sent by a navigation receiver when a destination waypoint is active. '' 14 1 2 3 4 5 6 7 8 9 10 11 12 13| 15 | | | | | | | | | | | | | | | $--RMB,A,x.x,a,c--c,c--c,llll.ll,a,yyyyy.yy,a,x.x,x.x,x.x,A,m,*hh<CR><LF>'' Field Number:
ultimately, I would also like to calculate tidal drift using COG and GPS speed, vs heading and boat speed to be able to correct for the drift (corrected bearing to waypoint) Thanks Jason RE: Signal K data parsing - tkurki - 2020-11-18 https://github.com/SignalK/nmea0183-signalk/tree/master/hooks https://github.com/SignalK/signalk-derived-data RE: Signal K data parsing - Techstyle - 2020-11-19 (2020-11-18, 10:43 PM)tkurki Wrote: https://github.com/SignalK/nmea0183-signalk/tree/master/hooksThanks! So I took a look at the nmea0183-signalk APB.js file and saw that 'direction' was already used in another phrase Code: const direction = parts[3].trim().toUpperCase() === 'L' ? 1 : -1 but this would set L = 1 and R = -1, interesting but I might need L and R Code: // Direction to Steer I couldn't find a phrase for steer direction in the SignalK Documentation so I created one - not sure if this is OK? Code: { and as such I have these two phrases ...direction and ...dirnum (direction number - not great) in signal K I have attached the "APB.js" as a text file, just needs renaming, if anybody else wants to use it or make it available elsewhere? I will work on adding the other items into Derived data RE: Signal K data parsing - Hakan - 2020-11-21 It may be I don't understand your goals with this but bear in mind you still have the origin "Direction to steer" flag in your changed APB. That's a negative XTE ('navigation.courseRhumbline.crossTrackError') value if direction is right and positive if left. RE: Signal K data parsing - Techstyle - 2020-11-22 Thanks, didn’t think of that. I want to set up a simple page that has a sail gauge and then shows you how many degrees you need to steer right or left so I intend to setup two parameters that are steerErrorLeft and steerErrorRight and then have them displayed to the left and right of the page a keep the helmsman on course during racing. I could have done that by checking if the XTE was positive or negative RE: Signal K data parsing - Techstyle - 2020-12-14 (2020-11-21, 10:18 AM)Hakan Wrote: It may be I don't understand your goals with this but bear in mind you still have the origin "Direction to steer" flag in your changed APB. That's a negative XTE ('navigation.courseRhumbline.crossTrackError') value if direction is right and positive if left. isn't 'navigation.courseRhumbline.crossTrackError' a distance and not an angle? Are you saying that if the direction of the vector from your location the the Rhumbline is to the left, the vector will be positive and if the direction is right then the vector will be negative? |