From c3ec11ca13471680af68d782bc5743810639854e Mon Sep 17 00:00:00 2001 From: curt Date: Mon, 29 Oct 2001 17:28:00 +0000 Subject: [PATCH] Fix a screwup I introduced with radians to degree conversion in passing data between JSBSim and FlightGear. --- src/FDM/JSBSim.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/FDM/JSBSim.cxx b/src/FDM/JSBSim.cxx index 0c617a5fe..5d2225067 100644 --- a/src/FDM/JSBSim.cxx +++ b/src/FDM/JSBSim.cxx @@ -391,8 +391,8 @@ bool FGJSBsim::copy_from_JSBsim() { _set_Mach_number( Translation->GetMach() ); // Positions - _updatePosition( Position->GetLatitude() * SGD_DEGREES_TO_RADIANS, - Position->GetLongitude() * SGD_DEGREES_TO_RADIANS, + _updatePosition( Position->GetLatitude(), + Position->GetLongitude(), Position->Geth() ); _set_Altitude_AGL( Position->GetDistanceAGL() ); @@ -470,7 +470,7 @@ void FGJSBsim::set_Latitude(double lat) { &sea_level_radius_meters, &lat_geoc ); _set_Sea_level_radius( sea_level_radius_meters * SG_METER_TO_FEET ); fgic->SetSeaLevelRadiusFtIC( sea_level_radius_meters * SG_METER_TO_FEET ); - fgic->SetLatitudeRadIC( lat_geoc * SGD_RADIANS_TO_DEGREES ); + fgic->SetLatitudeRadIC( lat_geoc ); needTrim=true; } @@ -478,7 +478,7 @@ void FGJSBsim::set_Longitude(double lon) { SG_LOG(SG_FLIGHT,SG_INFO,"FGJSBsim::set_Longitude: " << lon ); - fgic->SetLongitudeRadIC(lon * SGD_RADIANS_TO_DEGREES ); + fgic->SetLongitudeRadIC( lon ); needTrim=true; } @@ -495,7 +495,7 @@ void FGJSBsim::set_Altitude(double alt) { &sea_level_radius_meters, &lat_geoc); _set_Sea_level_radius( sea_level_radius_meters * SG_METER_TO_FEET ); fgic->SetSeaLevelRadiusFtIC( sea_level_radius_meters * SG_METER_TO_FEET ); - fgic->SetLatitudeRadIC( lat_geoc * SGD_RADIANS_TO_DEGREES ); + fgic->SetLatitudeRadIC( lat_geoc ); fgic->SetAltitudeFtIC(alt); needTrim=true; } -- 2.39.5