Workaround for terrain altitude problem. Helps but doesn't work 100%
This commit is contained in:
parent
3ca8643632
commit
eb5a3ceee5
1 changed files with 4 additions and 8 deletions
|
@ -244,15 +244,14 @@ FGJSBsim::update( int multiloop ) {
|
||||||
copy_to_JSBsim();
|
copy_to_JSBsim();
|
||||||
|
|
||||||
trimmed->setBoolValue(false);
|
trimmed->setBoolValue(false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ( needTrim ) {
|
if ( needTrim ) {
|
||||||
if ( startup_trim->getBoolValue() ) {
|
if ( startup_trim->getBoolValue() ) {
|
||||||
SG_LOG(SG_FLIGHT, SG_INFO,
|
SG_LOG(SG_FLIGHT, SG_INFO,
|
||||||
"Ready to trim, terrain altitude is: "
|
"Ready to trim, terrain altitude is: "
|
||||||
<< scenery.get_cur_elev() * SG_METER_TO_FEET );
|
<< scenery.get_cur_elev() * SG_METER_TO_FEET );
|
||||||
SG_LOG( SG_FLIGHT, SG_INFO, "position = "
|
|
||||||
<< fgGetDouble("/position/longitude-deg") << ", "
|
|
||||||
<< fgGetDouble("/position/latitude-deg") );
|
|
||||||
fgic->SetTerrainAltitudeFtIC( scenery.get_cur_elev() * SG_METER_TO_FEET );
|
fgic->SetTerrainAltitudeFtIC( scenery.get_cur_elev() * SG_METER_TO_FEET );
|
||||||
do_trim();
|
do_trim();
|
||||||
} else {
|
} else {
|
||||||
|
@ -561,9 +560,6 @@ void FGJSBsim::set_Altitude(double alt) {
|
||||||
fgic->SetTerrainAltitudeFtIC( scenery.get_cur_elev() * SG_METER_TO_FEET );
|
fgic->SetTerrainAltitudeFtIC( scenery.get_cur_elev() * SG_METER_TO_FEET );
|
||||||
SG_LOG(SG_FLIGHT, SG_INFO,
|
SG_LOG(SG_FLIGHT, SG_INFO,
|
||||||
"Terrain altitude: " << scenery.get_cur_elev() * SG_METER_TO_FEET );
|
"Terrain altitude: " << scenery.get_cur_elev() * SG_METER_TO_FEET );
|
||||||
SG_LOG( SG_FLIGHT, SG_INFO, "position = "
|
|
||||||
<< fgGetDouble("/position/longitude-deg") << ", "
|
|
||||||
<< fgGetDouble("/position/latitude-deg") );
|
|
||||||
fgic->SetLatitudeRadIC( lat_geoc );
|
fgic->SetLatitudeRadIC( lat_geoc );
|
||||||
fgic->SetAltitudeFtIC(alt);
|
fgic->SetAltitudeFtIC(alt);
|
||||||
needTrim=true;
|
needTrim=true;
|
||||||
|
@ -672,8 +668,8 @@ void FGJSBsim::set_Density(double rho) {
|
||||||
void FGJSBsim::set_Velocities_Local_Airmass (double wnorth,
|
void FGJSBsim::set_Velocities_Local_Airmass (double wnorth,
|
||||||
double weast,
|
double weast,
|
||||||
double wdown ) {
|
double wdown ) {
|
||||||
SG_LOG(SG_FLIGHT,SG_DEBUG, "FGJSBsim::set_Velocities_Local_Airmass: "
|
//SG_LOG(SG_FLIGHT,SG_INFO, "FGJSBsim::set_Velocities_Local_Airmass: "
|
||||||
<< wnorth << ", " << weast << ", " << wdown );
|
// << wnorth << ", " << weast << ", " << wdown );
|
||||||
|
|
||||||
_set_Velocities_Local_Airmass( wnorth, weast, wdown );
|
_set_Velocities_Local_Airmass( wnorth, weast, wdown );
|
||||||
fgic->SetWindNEDFpsIC( wnorth, weast, wdown );
|
fgic->SetWindNEDFpsIC( wnorth, weast, wdown );
|
||||||
|
|
Loading…
Add table
Reference in a new issue