Main Content

jsbsimToFixedWing

Class: Aero.FixedWing
Namespace: Aero

Construct aircraft from JSBSim aircraft configuration file

Since R2024a

Syntax

aircraft = jsbsimToFixedWing(aircraft,aircraftxml)
[aircraft,state] = jsbsimToFixedWing(aircraft,aircraftxml)
[aircraft,state] = jsbsimToFixedWing(___,'JSBSimRoot'=jsbsimroot)

Description

aircraft = jsbsimToFixedWing(aircraft,aircraftxml) returns a modified aircraft, aircraft, constructed from the fields of a JSBSim aircraft configuration XML file, aircraftxml.

[aircraft,state] = jsbsimToFixedWing(aircraft,aircraftxml) returns an Aero.FixedWing.State object array in addition to the modified fixed-wing aircraft.

[aircraft,state] = jsbsimToFixedWing(___,'JSBSimRoot'=jsbsimroot) returns the modified fixed-wing aircraft with the root folder of the JSBSim installation.

Input Arguments

expand all

Aero.FixedWing aircraft, specified as a scalar. To construct an empty aircraft, use Aero.FixedWing(0).

JSBSim aircraft configuration XML file, specified as a character vector or string. The custom JSBSim aircraft configuration XML file must use the format defined in the JSBSim Reference Manual.

Data Types: char | string

Root folder of JSBSim installation, specified as a character vector or string. jsbsimToFixedWing uses the JSBSim root folder to reference engine XML files when reading propulsion definitions.

Data Types: char | string

Output Arguments

expand all

Aero.FixedWing object, returned as a scalar. The method defines the aircraft derived from aircraftxml.

Aero.FixedWing.State object derived from aircraftxml, returned as a scalar.

Examples

expand all

Create a Cessna 172 Skyhawk aircraft based on an imported JSBSim C172r aircraft configuration file.

Download the contents of the JSBSim aircraft folder aircraft/c172r from JSBSim aircraft and save the contents to a working folder.

Create an Aero.FixedWing aircraft.

aircraft = Aero.FixedWing();

Modify the fixed-wing aircraft object with the fields of the JSBSim aircraft configuration XML file, c172r.xml. Return the modified aircraft and the Aero.FixedWing.State object.

[aircraft, state] = jsbsimToFixedWing(aircraft, "c172r\c172r.xml")

Version History

Introduced in R2024a

See Also

|

External Websites