Skip to content

Commit 099f726

Browse files
committed
[FS9] Set ground elevation at own aircraft position
1 parent 29a9b20 commit 099f726

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/plugins/simulator/fscommon/fsuipcimpl.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ namespace BlackSimPlugin::FsCommon
501501
CCoordinateGeodetic position = situation.getPosition();
502502
CLatitude lat(latitudeRaw * latCorrectionFactor, CAngleUnit::deg());
503503
CLongitude lon(longitudeRaw * lonCorrectionFactor, CAngleUnit::deg());
504-
CAltitude groundAltitude(groundAltitudeRaw / 256.0, CLengthUnit::m());
504+
CAltitude groundAltitude(groundAltitudeRaw / 256.0, CAltitude::MeanSeaLevel, CLengthUnit::m());
505505
position.setLatitude(lat);
506506
position.setLongitude(lon);
507507
position.setGeodeticHeight(groundAltitude);
@@ -531,6 +531,7 @@ namespace BlackSimPlugin::FsCommon
531531
situation.setPressureAltitude(pressureAltitude);
532532
situation.setVelocity({velocityWorld[0], velocityWorld[1], velocityWorld[2], CSpeedUnit::ft_s(), rotationVelocityBody[0],
533533
rotationVelocityBody[1], rotationVelocityBody[2], CAngleUnit::rad(), CTimeUnit::s()});
534+
situation.setGroundElevation(groundAltitude, CAircraftSituation::FromProvider);
534535
aircraft.setSituation(situation);
535536
aircraft.setCG(altitude - groundAltitude); // calculate the CG
536537
} // situation

0 commit comments

Comments
 (0)