JSBSim Aerospace 6-DOF Flight Dynamics (.xml)
@modelscript/jsbsim (languages/jsbsim) provides zero-regex XML parsing, non-linear 6-DOF rigid-body flight dynamics integration, cruise trim stabilization, linear DAE lowering, and Modelica 3.x projection for JSBSim Flight Dynamics Model (FDM) fixed-wing and rotorcraft aircraft configurations.
Supported Extensions & Standards
| Extension | Format | Description |
|---|---|---|
.xml | JSBSim FDM XML | Aircraft configuration schema encoding metrics, mass balance, propulsion, landing gear, and aerodynamic tables |
Key Capabilities
1. Six-Degree-of-Freedom (6-DOF) Non-Linear Equations of Motion
- Integrates the full non-linear Newtonian equations of motion for a rigid aircraft in atmospheric flight:
- Translational Accelerations in Body Frame:
- Rotational Accelerations in Principal Axes:
- Euler Angle Kinematics:
- Geodetic Altitude Rate of Climb:
- Translational Accelerations in Body Frame:
2. Aerodynamics & Steady Cruise Trim
- Models lift (
), drag ( ), side force ( ), and moments ( ) as functions of dynamic pressure , angle of attack , and sideslip : - Computes automatic cruise trim equilibrium where aerodynamic lift cancels aircraft gross weight (
): ensuring stable horizontal flight without pitch oscillation or kinetic energy loss.
3. Direct DAE Lowering
- Lowers state variables (
) and aero force equations into @modelscript/runtime'sDAEBuilderlinear memory arena. - Enables co-simulation between aerodynamic airframes, onboard flight control computers (
@modelscript/simulink), and satellite navigation systems (@modelscript/ccsds).
4. Bidirectional Modelica 3.x Projection
- Projects JSBSim aircraft into
Modelica.Mechanics.MultiBody6-DOF airframes with aerodynamic force elements.
Pre-Flight Diagnostics
The JSBSim linter validates aircraft geometry, mass distributions, and inertia tensors:
10 rules7 error3 warning Run with msx jsbsim lint
| Code | Rule | Severity | Message |
|---|---|---|---|
M8901 | missing-aircraft-name | error | JSBSim <fdm_config> element is missing required 'name' attribute. |
M8902 | non-positive-reference-area | error | Wing reference area (<val>) must be strictly positive. |
M8903 | non-positive-wingspan-chord | error | Wing metric '<param>' (<val>) must be strictly positive. |
M8904 | non-positive-empty-weight | error | Aircraft empty weight (<val>) must be strictly positive. |
M8905 | invalid-inertia-tensor | error | Moments of inertia tensor is invalid: <reason>. |
M8906 | missing-aerodynamics-section | error | Aircraft model does not define any aerodynamic force/moment coefficients in <aerodynamics>. |
M8907 | missing-landing-gear | warning | Aircraft model defines no landing gear bogies in <ground_reactions>; ground interaction is disabled. |
M8908 | negative-engine-thrust | error | Engine '<engineName>' specifies negative maximum thrust (<val>). |
M8909 | undefined-fcs-input | warning | FCS channel '<channelName>' references input property '<inputProperty>' not bound in flight control. |
M8910 | unrealistic-cg-location | warning | Center of gravity (<cgX>) is significantly far from aerodynamic center (<aeroX>); aircraft may have extreme pitch instability. |
Generated from languages/jsbsim/src/errors.ts. All languages →
CLI Usage
bash
# Inspect aircraft metrics, mass balance, engines, and aero coefficients
msx jsbsim inspect Cessna172Skyhawk.xml
# Run pre-flight linting and inertia tensor validation
msx jsbsim lint Cessna172Skyhawk.xml
# Simulate 6-DOF flight dynamics with automatic cruise trim
msx jsbsim simulate Cessna172Skyhawk.xml --duration=15.0 --speed=180.0 --altitude=5000.0
# Lower 6-DOF flight dynamics equations to ModelScript linear DAE arena
msx jsbsim to-dae Cessna172Skyhawk.xml
# Project into Modelica 3.x 6-DOF flight mechanics model
msx jsbsim to-modelica Cessna172Skyhawk.xml -o FlightMechanics.mo
