Pass ground elevation at aircraft position to external FDM, not ground
elevation at view point.
This commit is contained in:
parent
c7df5f3639
commit
a677ddac5d
1 changed files with 6 additions and 1 deletions
|
@ -120,7 +120,12 @@ static void global2raw( FGRawCtrls *raw ) {
|
|||
raw->master_alt = node->getChild("master-alt")->getBoolValue();
|
||||
raw->master_avionics = node->getChild("master-avionics")->getBoolValue();
|
||||
|
||||
raw->hground = fgGetDouble( "/environment/ground-elevation-m" );
|
||||
// cur_fdm_state->get_ground_elev_ft() is what we want ... this
|
||||
// reports the altitude of the aircraft.
|
||||
// "/environment/ground-elevation-m" reports the ground elevation
|
||||
// of the current view point which could change substantially if
|
||||
// the user is switching views.
|
||||
raw->hground = cur_fdm_state->get_ground_elev_ft() * SG_FEET_TO_METER;
|
||||
raw->magvar = fgGetDouble("/environment/magnetic-variation-deg");
|
||||
raw->speedup = fgGetInt("/sim/speed-up");
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue