AGL in JSBSIM for Unreal goes to 0 when height over 11000 ft #1105
-
Hi I try to implement some feature that need AGL value as the reference. I notice that when the value goes above around 11000 ft, the AGL automatically become 0. I turn the debugging feature but the trace line seems touching the ground. Any idea what's wrong with it? I try with the default model on UEReferenceApp too and the result more or less similar Below 11000 ft: any insight? I may need the AGL can still be read around 25000 ft if possible |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Yes there is bug with unit conversion. The code uses meters, instead of Unreal's centimeters. Open your JSBSimMovementComponent.cpp file and change that to |
Beta Was this translation helpful? Give feedback.
-
@gallonmate will you submit a pull request with this change? |
Beta Was this translation helpful? Give feedback.
Yes there is bug with unit conversion. The code uses meters, instead of Unreal's centimeters.
The original code here on line137 says
FEET_TO_METER
jsbsim/UnrealEngine/Plugins/JSBSimFlightDynamicsModel/Source/JSBSimFlightDynamicsModel/Private/JSBSimMovementComponent.cpp
Line 137 in 2a5985c
Open your JSBSimMovementComponent.cpp file and change that to
FEET_TO_CENTIMETER
, then compile. AGL will now work correctly at any altitude.