NaN fix by Csaba/Jester - prefer atan2(x,y) to atan(a/y).
This commit is contained in:
parent
fd043ed56e
commit
1a05695ff5
1 changed files with 1 additions and 1 deletions
|
@ -514,7 +514,7 @@ void FGAICarrier::UpdateWind( double dt) {
|
|||
+ (rel_wind_speed_from_north_kts * rel_wind_speed_from_north_kts));
|
||||
|
||||
//calculate the relative wind direction
|
||||
rel_wind_from_deg = atan(rel_wind_speed_from_east_kts/rel_wind_speed_from_north_kts)
|
||||
rel_wind_from_deg = atan2(rel_wind_speed_from_east_kts, rel_wind_speed_from_north_kts)
|
||||
* SG_RADIANS_TO_DEGREES;
|
||||
|
||||
// rationalise the output
|
||||
|
|
Loading…
Add table
Reference in a new issue