Skip to content

Commit 065f874

Browse files
BUGFIX: Wind in NE sector has accidentally been mapped to zero.
1 parent 92e670d commit 065f874

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Output_Formatter/NMEA_format.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ void format_PLARW ( float wind_north, float wind_east, char windtype, char * &p)
331331

332332
float direction;
333333
// report WHERE the wind the comes from, instead of our wind speed vector, so negative sign
334-
if( (wind_east < 0.1f) && wind_north < 0.1f)
334+
if( ( SQR(wind_east) + SQR( wind_north)) < SQR( NEGLECTABLE_WIND)) // avoid circling of neglectable wind
335335
direction = 0.0f;
336336
else
337337
direction = ATAN2( -wind_east, -wind_north);

0 commit comments

Comments
 (0)