Ref T259, Ref T243 improved utility function to store elevations in multiple providers

This commit is contained in:
Klaus Basan
2018-03-23 02:26:29 +01:00
parent 1203c58a23
commit 4248c1b689
4 changed files with 13 additions and 10 deletions

View File

@@ -485,12 +485,9 @@ namespace BlackSimPlugin
}
// CElevationPlane: deg, deg, feet
CElevationPlane elevation(remoteAircraftData.latitude, remoteAircraftData.longitude, remoteAircraftData.elevation);
CElevationPlane elevation(remoteAircraftData.latitudeDeg, remoteAircraftData.longitudeDeg, remoteAircraftData.elevationFt);
elevation.setSinglePointRadius();
// set it in the remote aircraft provider and in elevation provider
this->updateAircraftGroundElevation(simObject.getCallsign(), elevation);
this->rememberGroundElevation(elevation);
this->rememberElevationAndCG(simObject.getCallsign(), elevation, CLength(remoteAircraftData.cgToGroundFt, CLengthUnit::ft()));
}
void CSimulatorFsxCommon::updateOwnAircraftFromSimulator(const DataDefinitionClientAreaSb &sbDataArea)

View File

@@ -923,11 +923,7 @@ namespace BlackSimPlugin
CElevationPlane elevation(CLatitude(latitudeDeg, CAngleUnit::deg()), CLongitude(longitudeDeg, CAngleUnit::deg()), CAltitude(elevationMeters, CLengthUnit::m()));
elevation.setSinglePointRadius();
this->rememberGroundElevation(elevation);
this->insertCG(CLength(modelVerticalOffsetMeters, CLengthUnit::m()), callsign);
// set it in the remote aircraft provider
this->updateAircraftGroundElevation(cs, elevation);
this->rememberElevationAndCG(callsign, elevation, CLength(modelVerticalOffsetMeters, CLengthUnit::m()));
}
BlackCore::ISimulator *CSimulatorXPlaneFactory::create(const CSimulatorPluginInfo &info,