Really fix bug 146 - angle units confusiuon.
This commit is contained in:
parent
6266491aea
commit
a363da9274
1 changed files with 3 additions and 1 deletions
|
@ -26,6 +26,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <simgear/compiler.h>
|
#include <simgear/compiler.h>
|
||||||
|
#include <simgear/sg_inlines.h>
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -245,7 +246,8 @@ float get_climb_rate( void )
|
||||||
float get_view_direction( void )
|
float get_view_direction( void )
|
||||||
{
|
{
|
||||||
double view_off = 360.0 - globals->get_current_view()->getHeadingOffset_deg();
|
double view_off = 360.0 - globals->get_current_view()->getHeadingOffset_deg();
|
||||||
double view = SGMiscd::normalizeAngle2(fgGetDouble("/orientation/heading-deg") + view_off);
|
double view = fgGetDouble("/orientation/heading-deg") + view_off;
|
||||||
|
SG_NORMALIZE_RANGE(view, 0.0, 360.0);
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue