Skip to content

AGL in JSBSIM for Unreal goes to 0 when height over 11000 ft #1105

Answered by gallonmate
nmfarras asked this question in Q&A
Discussion options

You must be logged in to vote

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

FVector LineCheckEnd = StartEngineLocation - (AircraftState.AltitudeASLFt * FEET_TO_METER + 0.05 * GeoReferencingSystem->GetGeographicEllipsoidMaxRadius()) * Up;

Open your JSBSimMovementComponent.cpp file and change that to FEET_TO_CENTIMETER, then compile. AGL will now work correctly at any altitude.

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@nmfarras
Comment options

Answer selected by nmfarras
Comment options

You must be logged in to vote
4 replies
@seanmcleod
Comment options

@gallonmate
Comment options

@seanmcleod
Comment options

@gallonmate
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants