Open lsoltero opened 3 years ago
It seems that the library returns SI units for everithing including headings and angles. Lat/Lon are in deg which makes sense. COG is in radians.... looking at the code in RMC we see
SOG=atof(NMEA0183Msg.Field(6))*knToms; TrueCOG=atof(NMEA0183Msg.Field(7))*degToRad;
so it would seem that WindAngle should also be in radians... but its in degrees. Here is the code
bool NMEA0183ParseMWV_nc(const tNMEA0183Msg &NMEA0183Msg,double &WindAngle, tNMEA0183WindReference &Reference, double &WindSpeed) { bool result=( NMEA0183Msg.FieldCount()>=4 );
if ( result ) { WindAngle=atof(NMEA0183Msg.Field(0));
it would be nice if the definitions in NMEA0183Messages.h would list the units of the arguments in the commets as is done in the NMEA2000 library.
Yes, thats my mistake. I should have been more carefull with units. Also on N2k flow is in l/h and fluid capacity in l, which are not SI units.
There is no way to change them anymore to keep compatibility.
It seems that the library returns SI units for everithing including headings and angles. Lat/Lon are in deg which makes sense. COG is in radians.... looking at the code in RMC we see
so it would seem that WindAngle should also be in radians... but its in degrees. Here is the code
bool NMEA0183ParseMWV_nc(const tNMEA0183Msg &NMEA0183Msg,double &WindAngle, tNMEA0183WindReference &Reference, double &WindSpeed) { bool result=( NMEA0183Msg.FieldCount()>=4 );
if ( result ) { WindAngle=atof(NMEA0183Msg.Field(0));
it would be nice if the definitions in NMEA0183Messages.h would list the units of the arguments in the commets as is done in the NMEA2000 library.