#103: fix units logic
This commit is contained in:
parent
6a2c623ea0
commit
5e41c64dd3
|
@ -531,11 +531,12 @@ private:
|
||||||
|
|
||||||
if (shouldSend && NMEA0183Reference == NMEA0183Wind_Apparent)
|
if (shouldSend && NMEA0183Reference == NMEA0183Wind_Apparent)
|
||||||
{
|
{
|
||||||
|
double wa = formatCourse(WindAngle);
|
||||||
if (!NMEA0183Msg.Init("VWR", talkerId))
|
if (!NMEA0183Msg.Init("VWR", talkerId))
|
||||||
return;
|
return;
|
||||||
if (!NMEA0183Msg.AddUInt32Field((abs(WindAngle) > 180 ) ? 360-abs(WindAngle) : abs(WindAngle) ))
|
if (!NMEA0183Msg.AddDoubleField(( wa > 180 ) ? 360-wa : wa))
|
||||||
return;
|
return;
|
||||||
if (!NMEA0183Msg.AddStrField((WindAngle >= 0 && WindAngle <= 180) ? 'R' : 'L'))
|
if (!NMEA0183Msg.AddStrField(( wa >= 0 && wa <= 180) ? 'R' : 'L'))
|
||||||
return;
|
return;
|
||||||
if (!NMEA0183Msg.AddDoubleField(formatKnots(WindSpeed)))
|
if (!NMEA0183Msg.AddDoubleField(formatKnots(WindSpeed)))
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue