1
0
Fork 0

More magvar fixes relating to vor/ils.

This commit is contained in:
curt 2000-05-12 14:09:52 +00:00
parent 51898e3a14
commit 63df45998f
2 changed files with 23 additions and 6 deletions

View file

@ -303,8 +303,13 @@ int FGAutopilot::run() {
} else if ( heading_mode == FG_HEADING_NAV1 ) { } else if ( heading_mode == FG_HEADING_NAV1 ) {
double tgt_radial; double tgt_radial;
double cur_radial; double cur_radial;
if ( current_radiostack->get_nav1_loc() ) {
// localizers radials are "true"
tgt_radial = current_radiostack->get_nav1_radial();
} else {
tgt_radial = current_radiostack->get_nav1_radial() tgt_radial = current_radiostack->get_nav1_radial()
+ FGBFI::getMagVar(); + FGBFI::getMagVar();
}
cur_radial = current_radiostack->get_nav1_heading(); cur_radial = current_radiostack->get_nav1_heading();
cout << "target rad (true) = " << tgt_radial cout << "target rad (true) = " << tgt_radial
<< " current rad (true) = " << cur_radial << " current rad (true) = " << cur_radial

View file

@ -349,8 +349,14 @@ double FGSteam::get_HackVOR1_deg () {
double r; double r;
if ( current_radiostack->get_nav1_inrange() ) { if ( current_radiostack->get_nav1_inrange() ) {
if ( current_radiostack->get_nav1_loc() ) {
// localizer doesn't need magvar offset
r = current_radiostack->get_nav1_heading()
- current_radiostack->get_nav1_radial();
} else {
r = current_radiostack->get_nav1_heading() - FGBFI::getMagVar() r = current_radiostack->get_nav1_heading() - FGBFI::getMagVar()
- current_radiostack->get_nav1_radial(); - current_radiostack->get_nav1_radial();
}
// cout << "Radial = " << current_radiostack->get_nav1_radial() // cout << "Radial = " << current_radiostack->get_nav1_radial()
// << " Bearing = " << current_radiostack->get_nav1_heading() // << " Bearing = " << current_radiostack->get_nav1_heading()
// << endl; // << endl;
@ -372,8 +378,14 @@ double FGSteam::get_HackVOR2_deg () {
double r; double r;
if ( current_radiostack->get_nav2_inrange() ) { if ( current_radiostack->get_nav2_inrange() ) {
if ( current_radiostack->get_nav2_loc() ) {
// localizer doesn't need magvar offset
r = current_radiostack->get_nav2_heading()
- current_radiostack->get_nav2_radial();
} else {
r = current_radiostack->get_nav2_heading() - FGBFI::getMagVar() r = current_radiostack->get_nav2_heading() - FGBFI::getMagVar()
- current_radiostack->get_nav2_radial(); - current_radiostack->get_nav2_radial();
}
// cout << "Radial = " << current_radiostack->get_nav1_radial() // cout << "Radial = " << current_radiostack->get_nav1_radial()
// << " Bearing = " << current_radiostack->get_nav1_heading() << endl; // << " Bearing = " << current_radiostack->get_nav1_heading() << endl;