1
0
Fork 0

Fix the property /radios/nav[*]/radials/actual-deg to show the radial

that the aircraft is on.
This commit is contained in:
david 2003-07-03 17:10:32 +00:00
parent a1968ecb95
commit 9eef30ff6e
2 changed files with 22 additions and 1 deletions

View file

@ -722,3 +722,24 @@ FGNavCom::get_nav_from_flag () const
return false;
}
}
/**
* Return the current radial.
*
* FIXME: the variable 'nav_radial' does not contain the current
* radial, while the variable 'nav_heading' contains the reciprocal of
* the current radial.
*/
double
FGNavCom::get_nav_radial () const
{
if (nav_inrange && nav_serviceable->getBoolValue()) {
double radial = nav_heading + 180;
if (radial >= 360)
radial -= 360;
return radial;
} else {
return 0.0;
}
}

View file

@ -213,7 +213,7 @@ public:
inline double get_nav_gs_dist_signed() const { return nav_gs_dist_signed; }
inline double get_nav_elev() const { return nav_elev; }
inline double get_nav_heading() const { return nav_heading; }
inline double get_nav_radial() const { return nav_radial; }
inline double get_nav_radial() const;
inline double get_nav_target_gs() const { return nav_target_gs; }
inline double get_nav_magvar() const { return nav_magvar; }
double get_nav_heading_needle_deflection() const;