+ All Categories
Home > Documents > Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM...

Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM...

Date post: 27-Jul-2018
Category:
Upload: vuongnhan
View: 223 times
Download: 1 times
Share this document with a friend
57
Agostino De Marco 7 April 2014
Transcript
Page 1: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Agostino De Marco 7 April 2014

What is JSBSim

JSBSim is a high fidelity 6 DoF flight dynamics and control software library written in the C++ programming language Simulation features bull Vehicle agnostic (completely data-driven) bull Standard or EGM96 gravitational model bull Geodetic (WGS-84) and geocentric position bull Standard or custom table-driven atmosphere bull MIL-F-8785C Turbulence model bull Mass properties update continuously bull Selectable integrators (explicit integration)

What is JSBSim

bull Flight dynamics and control SW library bull ~50000 lines of C++ code bull ~80 C++ classes bull In development since 1997 bull Data driven bull XML configuration files

httpwwwjsbsimorg

Goals of JSBSim

bull To make simulation ndash of aerospace vehicles in particular ndash more accessible

bull Ease of use and easy to learn (targeted at upper level college students)

bull Minimize input required to model a vehicle and a scenario

bull Provide for quick and easy analysis debugging

JSBSim most notable uses

bull FlightGear wwwflightgearorg bull Outerra wwwouterraorg bull BoozSimulator (Paparazzi)

wikipaparazziuavorgwikiBoozSimulator bull OpenEaagles wwwopeneaaglesorg

A team of main developers and a large base of users

JSBSim users in the world

Who is a JSBSim Developer

bull Developers ndash Add or modify C++ code ndash Integrate JSBSim into new simulation architectures ndash Compile the code ndash Interact with the code using the API ndash Use models (XML files) for testing new features

Who is a JSBSim User

bull Users ndash Do not write C++ code ndash Do not use compilers ndash Write or use XML models ndash Interact with the simulation using properties and

XML files ndash Run the simulation to produce data ndash Analyze the data resulting from the runs ndash Unix command skills useful

JSBSim lsquorunning modesrsquo

bull JSBSim can be run by itself as a standalone application (batch mode) and told to connect to FlightGear via socket subsequently directing FlightGear what to display

bull The JSBSim executable for batch mode runs has a reset capability bull Reset integrator past states bull Reset flight control component past states bull Reconfigure aircraft settings in scripts bull Trim aircraft

bull Scripted runs are possible where the aircraft configuration file is loaded once but multiple runs are made such as for a set of Monte Carlo runs

JSBSim in batch mode

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

Developer directories

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

User Directories

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

Files Needed by Users

bull Model files (vehicle engine systems aero etc)

bull Script files bull Data logging files bull Data plotting files bull Shell scripts for running monte carlo analyses

Tools Needed

bull Bash shell (cygwin or linux) bull Gnuplot bull Prep_plot

bull Optional (pick one)

ndash Microsoft Visual C++ 20102012 Express (free devel)

ndash Notepad++ (free userdevel) ndash Matlab (non-free users post-processing)

User Workflow

bull Setup scenario (edit model scripts etc) ndash Run simulation ndash Auto-generate plots (eg Matlab) ndash Analyze plots ndash Modify input conditions parameters ndash Rerun

bull When ready make runs for the record bull Plot data bull Archive CSV data with input files and run

information in zip file to reduce storage reqmts bull Present results

Analysis Computerized Model CM and Traceability

bull Must be able to recreate runs bull For any run must know

ndash Vehicle configuration ndash Dispersions ndash Environment setup ndash Other inputs and assumptions etc

bull Save all run data note executable version used and archive input data files wdata

Key Concepts in JSBSim

bull XML bull Properties bull Functions

What is XML

bull eXtensible Markup Language bull A way of encoding data bull Range of tools technology and code already

available ndash Schema ndash Transforms ndash Editors ndash Parsers (JSBSim uses the eXpat library)

bull See ndash W3 Schools (httpwwww3schoolscomxml) ndash XMLorg (httpwwwxmlorg)

XML Elements

Format ltelementgt content ltelementgt Example ltfunctiongt ltproductgt ltcosgt 0707 ltcosgt ltvaluegt aeroqbar-area ltvaluegt ltproductgt ltfunctiongt

XML Attributes

Format ltelement attribute=ldquovaluerdquogt content ltelementgt

Example ltixx dispersion=ldquo700rdquo type=ldquouniformrdquo unit=ldquoSLUGFT2rdquogt 140099 ltixxgt

Early JSBSim Data Specification ltCOEFFICIENT NAME=CLalpha TYPE=VECTORgt Lift_due_to_alpha 8 velocitiesmach-norm aeroqbar-psf | metricsSw-sqft | aeroalpha-rad 000 450 040 380 060 360 105 450 140 400 280 250 600 110 900 100 ltCOEFFICIENTgt

Current JSBSim Data Spec ltfunction name=aeroforceCLDfgt ltdescriptiongt Delta lift due to flap deflection ltdescriptiongt ltproductgt ltpgt aerofunctionground-effect-factor-lift ltpgt ltpgt aeroqbar-area ltpgt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 025 200 030 300 035 lttableDatagt lttablegt ltproductgt ltfunctiongt

Properties A Property is used like a Variable

bull Property names are defined in a hierarchical style ndash attitudephi-rad ndash velocitiesu-fps

bull A property can have read andor read-write access

bull There are native and created properties bull [Programmatically a property may be bound

to a program variable or a function ndash this is a concern mostly for developers]

Aircraft FDM catalog

bull Exports a lsquocatalogrsquo of JSBSim internal properties related to the selected aircraft (Cessna 172)

bull Properties are nothing but variablevalue pairs handled during simulations

bull Each property value is lsquoexposedrsquo to the user ie can be grabbed and used for specific purposes

User files

Vehicle configuration file

Vehicle configuration file

ltfdm_configgt ltfileheadergt hellip ltfileheadergt lt-- 0 or 1 instance --gt ltmetricsgt hellip ltmetricsgt lt-- 1 instance --gt ltmass_balancegt hellip ltmass_balancegt lt-- 1 instance --gt ltground_reactionsgt hellip ltground_reactionsgt lt-- 1 instance --gt ltexternal_reactionsgt hellip ltexternal_reactionsgt lt-- 0 or 1 instance --gt ltbuoyant_forcesgt hellip ltbuoyant_forcesgt lt-- 0 or 1 instance --gt ltpropulsiongt hellip ltpropulsiongt lt-- 0 or 1 instance --gt ltsystemgt hellip ltsystemgt lt-- 0 to n instances --gt ltautopilotgt hellip ltautopilotgt lt-- 0 or 1 instance --gt ltflight_controlgt hellip ltflight_controlgt lt-- 0 or 1 instance --gt ltaerodynamicsgt hellip ltaerodynamicsgt lt-- 1 instance --gt ltinputgt hellip ltinputgt lt-- 0 or 1 instance --gt ltoutputgt hellip ltoutputgt lt-- 0 to n instances --gt ltfdm_configgt

Vehicle configuration

Geometry Masses

Vehicle configuration Propulsion configuration files

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 2: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

What is JSBSim

JSBSim is a high fidelity 6 DoF flight dynamics and control software library written in the C++ programming language Simulation features bull Vehicle agnostic (completely data-driven) bull Standard or EGM96 gravitational model bull Geodetic (WGS-84) and geocentric position bull Standard or custom table-driven atmosphere bull MIL-F-8785C Turbulence model bull Mass properties update continuously bull Selectable integrators (explicit integration)

What is JSBSim

bull Flight dynamics and control SW library bull ~50000 lines of C++ code bull ~80 C++ classes bull In development since 1997 bull Data driven bull XML configuration files

httpwwwjsbsimorg

Goals of JSBSim

bull To make simulation ndash of aerospace vehicles in particular ndash more accessible

bull Ease of use and easy to learn (targeted at upper level college students)

bull Minimize input required to model a vehicle and a scenario

bull Provide for quick and easy analysis debugging

JSBSim most notable uses

bull FlightGear wwwflightgearorg bull Outerra wwwouterraorg bull BoozSimulator (Paparazzi)

wikipaparazziuavorgwikiBoozSimulator bull OpenEaagles wwwopeneaaglesorg

A team of main developers and a large base of users

JSBSim users in the world

Who is a JSBSim Developer

bull Developers ndash Add or modify C++ code ndash Integrate JSBSim into new simulation architectures ndash Compile the code ndash Interact with the code using the API ndash Use models (XML files) for testing new features

Who is a JSBSim User

bull Users ndash Do not write C++ code ndash Do not use compilers ndash Write or use XML models ndash Interact with the simulation using properties and

XML files ndash Run the simulation to produce data ndash Analyze the data resulting from the runs ndash Unix command skills useful

JSBSim lsquorunning modesrsquo

bull JSBSim can be run by itself as a standalone application (batch mode) and told to connect to FlightGear via socket subsequently directing FlightGear what to display

bull The JSBSim executable for batch mode runs has a reset capability bull Reset integrator past states bull Reset flight control component past states bull Reconfigure aircraft settings in scripts bull Trim aircraft

bull Scripted runs are possible where the aircraft configuration file is loaded once but multiple runs are made such as for a set of Monte Carlo runs

JSBSim in batch mode

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

Developer directories

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

User Directories

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

Files Needed by Users

bull Model files (vehicle engine systems aero etc)

bull Script files bull Data logging files bull Data plotting files bull Shell scripts for running monte carlo analyses

Tools Needed

bull Bash shell (cygwin or linux) bull Gnuplot bull Prep_plot

bull Optional (pick one)

ndash Microsoft Visual C++ 20102012 Express (free devel)

ndash Notepad++ (free userdevel) ndash Matlab (non-free users post-processing)

User Workflow

bull Setup scenario (edit model scripts etc) ndash Run simulation ndash Auto-generate plots (eg Matlab) ndash Analyze plots ndash Modify input conditions parameters ndash Rerun

bull When ready make runs for the record bull Plot data bull Archive CSV data with input files and run

information in zip file to reduce storage reqmts bull Present results

Analysis Computerized Model CM and Traceability

bull Must be able to recreate runs bull For any run must know

ndash Vehicle configuration ndash Dispersions ndash Environment setup ndash Other inputs and assumptions etc

bull Save all run data note executable version used and archive input data files wdata

Key Concepts in JSBSim

bull XML bull Properties bull Functions

What is XML

bull eXtensible Markup Language bull A way of encoding data bull Range of tools technology and code already

available ndash Schema ndash Transforms ndash Editors ndash Parsers (JSBSim uses the eXpat library)

bull See ndash W3 Schools (httpwwww3schoolscomxml) ndash XMLorg (httpwwwxmlorg)

XML Elements

Format ltelementgt content ltelementgt Example ltfunctiongt ltproductgt ltcosgt 0707 ltcosgt ltvaluegt aeroqbar-area ltvaluegt ltproductgt ltfunctiongt

XML Attributes

Format ltelement attribute=ldquovaluerdquogt content ltelementgt

Example ltixx dispersion=ldquo700rdquo type=ldquouniformrdquo unit=ldquoSLUGFT2rdquogt 140099 ltixxgt

Early JSBSim Data Specification ltCOEFFICIENT NAME=CLalpha TYPE=VECTORgt Lift_due_to_alpha 8 velocitiesmach-norm aeroqbar-psf | metricsSw-sqft | aeroalpha-rad 000 450 040 380 060 360 105 450 140 400 280 250 600 110 900 100 ltCOEFFICIENTgt

Current JSBSim Data Spec ltfunction name=aeroforceCLDfgt ltdescriptiongt Delta lift due to flap deflection ltdescriptiongt ltproductgt ltpgt aerofunctionground-effect-factor-lift ltpgt ltpgt aeroqbar-area ltpgt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 025 200 030 300 035 lttableDatagt lttablegt ltproductgt ltfunctiongt

Properties A Property is used like a Variable

bull Property names are defined in a hierarchical style ndash attitudephi-rad ndash velocitiesu-fps

bull A property can have read andor read-write access

bull There are native and created properties bull [Programmatically a property may be bound

to a program variable or a function ndash this is a concern mostly for developers]

Aircraft FDM catalog

bull Exports a lsquocatalogrsquo of JSBSim internal properties related to the selected aircraft (Cessna 172)

bull Properties are nothing but variablevalue pairs handled during simulations

bull Each property value is lsquoexposedrsquo to the user ie can be grabbed and used for specific purposes

User files

Vehicle configuration file

Vehicle configuration file

ltfdm_configgt ltfileheadergt hellip ltfileheadergt lt-- 0 or 1 instance --gt ltmetricsgt hellip ltmetricsgt lt-- 1 instance --gt ltmass_balancegt hellip ltmass_balancegt lt-- 1 instance --gt ltground_reactionsgt hellip ltground_reactionsgt lt-- 1 instance --gt ltexternal_reactionsgt hellip ltexternal_reactionsgt lt-- 0 or 1 instance --gt ltbuoyant_forcesgt hellip ltbuoyant_forcesgt lt-- 0 or 1 instance --gt ltpropulsiongt hellip ltpropulsiongt lt-- 0 or 1 instance --gt ltsystemgt hellip ltsystemgt lt-- 0 to n instances --gt ltautopilotgt hellip ltautopilotgt lt-- 0 or 1 instance --gt ltflight_controlgt hellip ltflight_controlgt lt-- 0 or 1 instance --gt ltaerodynamicsgt hellip ltaerodynamicsgt lt-- 1 instance --gt ltinputgt hellip ltinputgt lt-- 0 or 1 instance --gt ltoutputgt hellip ltoutputgt lt-- 0 to n instances --gt ltfdm_configgt

Vehicle configuration

Geometry Masses

Vehicle configuration Propulsion configuration files

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 3: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

What is JSBSim

bull Flight dynamics and control SW library bull ~50000 lines of C++ code bull ~80 C++ classes bull In development since 1997 bull Data driven bull XML configuration files

httpwwwjsbsimorg

Goals of JSBSim

bull To make simulation ndash of aerospace vehicles in particular ndash more accessible

bull Ease of use and easy to learn (targeted at upper level college students)

bull Minimize input required to model a vehicle and a scenario

bull Provide for quick and easy analysis debugging

JSBSim most notable uses

bull FlightGear wwwflightgearorg bull Outerra wwwouterraorg bull BoozSimulator (Paparazzi)

wikipaparazziuavorgwikiBoozSimulator bull OpenEaagles wwwopeneaaglesorg

A team of main developers and a large base of users

JSBSim users in the world

Who is a JSBSim Developer

bull Developers ndash Add or modify C++ code ndash Integrate JSBSim into new simulation architectures ndash Compile the code ndash Interact with the code using the API ndash Use models (XML files) for testing new features

Who is a JSBSim User

bull Users ndash Do not write C++ code ndash Do not use compilers ndash Write or use XML models ndash Interact with the simulation using properties and

XML files ndash Run the simulation to produce data ndash Analyze the data resulting from the runs ndash Unix command skills useful

JSBSim lsquorunning modesrsquo

bull JSBSim can be run by itself as a standalone application (batch mode) and told to connect to FlightGear via socket subsequently directing FlightGear what to display

bull The JSBSim executable for batch mode runs has a reset capability bull Reset integrator past states bull Reset flight control component past states bull Reconfigure aircraft settings in scripts bull Trim aircraft

bull Scripted runs are possible where the aircraft configuration file is loaded once but multiple runs are made such as for a set of Monte Carlo runs

JSBSim in batch mode

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

Developer directories

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

User Directories

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

Files Needed by Users

bull Model files (vehicle engine systems aero etc)

bull Script files bull Data logging files bull Data plotting files bull Shell scripts for running monte carlo analyses

Tools Needed

bull Bash shell (cygwin or linux) bull Gnuplot bull Prep_plot

bull Optional (pick one)

ndash Microsoft Visual C++ 20102012 Express (free devel)

ndash Notepad++ (free userdevel) ndash Matlab (non-free users post-processing)

User Workflow

bull Setup scenario (edit model scripts etc) ndash Run simulation ndash Auto-generate plots (eg Matlab) ndash Analyze plots ndash Modify input conditions parameters ndash Rerun

bull When ready make runs for the record bull Plot data bull Archive CSV data with input files and run

information in zip file to reduce storage reqmts bull Present results

Analysis Computerized Model CM and Traceability

bull Must be able to recreate runs bull For any run must know

ndash Vehicle configuration ndash Dispersions ndash Environment setup ndash Other inputs and assumptions etc

bull Save all run data note executable version used and archive input data files wdata

Key Concepts in JSBSim

bull XML bull Properties bull Functions

What is XML

bull eXtensible Markup Language bull A way of encoding data bull Range of tools technology and code already

available ndash Schema ndash Transforms ndash Editors ndash Parsers (JSBSim uses the eXpat library)

bull See ndash W3 Schools (httpwwww3schoolscomxml) ndash XMLorg (httpwwwxmlorg)

XML Elements

Format ltelementgt content ltelementgt Example ltfunctiongt ltproductgt ltcosgt 0707 ltcosgt ltvaluegt aeroqbar-area ltvaluegt ltproductgt ltfunctiongt

XML Attributes

Format ltelement attribute=ldquovaluerdquogt content ltelementgt

Example ltixx dispersion=ldquo700rdquo type=ldquouniformrdquo unit=ldquoSLUGFT2rdquogt 140099 ltixxgt

Early JSBSim Data Specification ltCOEFFICIENT NAME=CLalpha TYPE=VECTORgt Lift_due_to_alpha 8 velocitiesmach-norm aeroqbar-psf | metricsSw-sqft | aeroalpha-rad 000 450 040 380 060 360 105 450 140 400 280 250 600 110 900 100 ltCOEFFICIENTgt

Current JSBSim Data Spec ltfunction name=aeroforceCLDfgt ltdescriptiongt Delta lift due to flap deflection ltdescriptiongt ltproductgt ltpgt aerofunctionground-effect-factor-lift ltpgt ltpgt aeroqbar-area ltpgt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 025 200 030 300 035 lttableDatagt lttablegt ltproductgt ltfunctiongt

Properties A Property is used like a Variable

bull Property names are defined in a hierarchical style ndash attitudephi-rad ndash velocitiesu-fps

bull A property can have read andor read-write access

bull There are native and created properties bull [Programmatically a property may be bound

to a program variable or a function ndash this is a concern mostly for developers]

Aircraft FDM catalog

bull Exports a lsquocatalogrsquo of JSBSim internal properties related to the selected aircraft (Cessna 172)

bull Properties are nothing but variablevalue pairs handled during simulations

bull Each property value is lsquoexposedrsquo to the user ie can be grabbed and used for specific purposes

User files

Vehicle configuration file

Vehicle configuration file

ltfdm_configgt ltfileheadergt hellip ltfileheadergt lt-- 0 or 1 instance --gt ltmetricsgt hellip ltmetricsgt lt-- 1 instance --gt ltmass_balancegt hellip ltmass_balancegt lt-- 1 instance --gt ltground_reactionsgt hellip ltground_reactionsgt lt-- 1 instance --gt ltexternal_reactionsgt hellip ltexternal_reactionsgt lt-- 0 or 1 instance --gt ltbuoyant_forcesgt hellip ltbuoyant_forcesgt lt-- 0 or 1 instance --gt ltpropulsiongt hellip ltpropulsiongt lt-- 0 or 1 instance --gt ltsystemgt hellip ltsystemgt lt-- 0 to n instances --gt ltautopilotgt hellip ltautopilotgt lt-- 0 or 1 instance --gt ltflight_controlgt hellip ltflight_controlgt lt-- 0 or 1 instance --gt ltaerodynamicsgt hellip ltaerodynamicsgt lt-- 1 instance --gt ltinputgt hellip ltinputgt lt-- 0 or 1 instance --gt ltoutputgt hellip ltoutputgt lt-- 0 to n instances --gt ltfdm_configgt

Vehicle configuration

Geometry Masses

Vehicle configuration Propulsion configuration files

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 4: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Goals of JSBSim

bull To make simulation ndash of aerospace vehicles in particular ndash more accessible

bull Ease of use and easy to learn (targeted at upper level college students)

bull Minimize input required to model a vehicle and a scenario

bull Provide for quick and easy analysis debugging

JSBSim most notable uses

bull FlightGear wwwflightgearorg bull Outerra wwwouterraorg bull BoozSimulator (Paparazzi)

wikipaparazziuavorgwikiBoozSimulator bull OpenEaagles wwwopeneaaglesorg

A team of main developers and a large base of users

JSBSim users in the world

Who is a JSBSim Developer

bull Developers ndash Add or modify C++ code ndash Integrate JSBSim into new simulation architectures ndash Compile the code ndash Interact with the code using the API ndash Use models (XML files) for testing new features

Who is a JSBSim User

bull Users ndash Do not write C++ code ndash Do not use compilers ndash Write or use XML models ndash Interact with the simulation using properties and

XML files ndash Run the simulation to produce data ndash Analyze the data resulting from the runs ndash Unix command skills useful

JSBSim lsquorunning modesrsquo

bull JSBSim can be run by itself as a standalone application (batch mode) and told to connect to FlightGear via socket subsequently directing FlightGear what to display

bull The JSBSim executable for batch mode runs has a reset capability bull Reset integrator past states bull Reset flight control component past states bull Reconfigure aircraft settings in scripts bull Trim aircraft

bull Scripted runs are possible where the aircraft configuration file is loaded once but multiple runs are made such as for a set of Monte Carlo runs

JSBSim in batch mode

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

Developer directories

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

User Directories

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

Files Needed by Users

bull Model files (vehicle engine systems aero etc)

bull Script files bull Data logging files bull Data plotting files bull Shell scripts for running monte carlo analyses

Tools Needed

bull Bash shell (cygwin or linux) bull Gnuplot bull Prep_plot

bull Optional (pick one)

ndash Microsoft Visual C++ 20102012 Express (free devel)

ndash Notepad++ (free userdevel) ndash Matlab (non-free users post-processing)

User Workflow

bull Setup scenario (edit model scripts etc) ndash Run simulation ndash Auto-generate plots (eg Matlab) ndash Analyze plots ndash Modify input conditions parameters ndash Rerun

bull When ready make runs for the record bull Plot data bull Archive CSV data with input files and run

information in zip file to reduce storage reqmts bull Present results

Analysis Computerized Model CM and Traceability

bull Must be able to recreate runs bull For any run must know

ndash Vehicle configuration ndash Dispersions ndash Environment setup ndash Other inputs and assumptions etc

bull Save all run data note executable version used and archive input data files wdata

Key Concepts in JSBSim

bull XML bull Properties bull Functions

What is XML

bull eXtensible Markup Language bull A way of encoding data bull Range of tools technology and code already

available ndash Schema ndash Transforms ndash Editors ndash Parsers (JSBSim uses the eXpat library)

bull See ndash W3 Schools (httpwwww3schoolscomxml) ndash XMLorg (httpwwwxmlorg)

XML Elements

Format ltelementgt content ltelementgt Example ltfunctiongt ltproductgt ltcosgt 0707 ltcosgt ltvaluegt aeroqbar-area ltvaluegt ltproductgt ltfunctiongt

XML Attributes

Format ltelement attribute=ldquovaluerdquogt content ltelementgt

Example ltixx dispersion=ldquo700rdquo type=ldquouniformrdquo unit=ldquoSLUGFT2rdquogt 140099 ltixxgt

Early JSBSim Data Specification ltCOEFFICIENT NAME=CLalpha TYPE=VECTORgt Lift_due_to_alpha 8 velocitiesmach-norm aeroqbar-psf | metricsSw-sqft | aeroalpha-rad 000 450 040 380 060 360 105 450 140 400 280 250 600 110 900 100 ltCOEFFICIENTgt

Current JSBSim Data Spec ltfunction name=aeroforceCLDfgt ltdescriptiongt Delta lift due to flap deflection ltdescriptiongt ltproductgt ltpgt aerofunctionground-effect-factor-lift ltpgt ltpgt aeroqbar-area ltpgt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 025 200 030 300 035 lttableDatagt lttablegt ltproductgt ltfunctiongt

Properties A Property is used like a Variable

bull Property names are defined in a hierarchical style ndash attitudephi-rad ndash velocitiesu-fps

bull A property can have read andor read-write access

bull There are native and created properties bull [Programmatically a property may be bound

to a program variable or a function ndash this is a concern mostly for developers]

Aircraft FDM catalog

bull Exports a lsquocatalogrsquo of JSBSim internal properties related to the selected aircraft (Cessna 172)

bull Properties are nothing but variablevalue pairs handled during simulations

bull Each property value is lsquoexposedrsquo to the user ie can be grabbed and used for specific purposes

User files

Vehicle configuration file

Vehicle configuration file

ltfdm_configgt ltfileheadergt hellip ltfileheadergt lt-- 0 or 1 instance --gt ltmetricsgt hellip ltmetricsgt lt-- 1 instance --gt ltmass_balancegt hellip ltmass_balancegt lt-- 1 instance --gt ltground_reactionsgt hellip ltground_reactionsgt lt-- 1 instance --gt ltexternal_reactionsgt hellip ltexternal_reactionsgt lt-- 0 or 1 instance --gt ltbuoyant_forcesgt hellip ltbuoyant_forcesgt lt-- 0 or 1 instance --gt ltpropulsiongt hellip ltpropulsiongt lt-- 0 or 1 instance --gt ltsystemgt hellip ltsystemgt lt-- 0 to n instances --gt ltautopilotgt hellip ltautopilotgt lt-- 0 or 1 instance --gt ltflight_controlgt hellip ltflight_controlgt lt-- 0 or 1 instance --gt ltaerodynamicsgt hellip ltaerodynamicsgt lt-- 1 instance --gt ltinputgt hellip ltinputgt lt-- 0 or 1 instance --gt ltoutputgt hellip ltoutputgt lt-- 0 to n instances --gt ltfdm_configgt

Vehicle configuration

Geometry Masses

Vehicle configuration Propulsion configuration files

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 5: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

JSBSim most notable uses

bull FlightGear wwwflightgearorg bull Outerra wwwouterraorg bull BoozSimulator (Paparazzi)

wikipaparazziuavorgwikiBoozSimulator bull OpenEaagles wwwopeneaaglesorg

A team of main developers and a large base of users

JSBSim users in the world

Who is a JSBSim Developer

bull Developers ndash Add or modify C++ code ndash Integrate JSBSim into new simulation architectures ndash Compile the code ndash Interact with the code using the API ndash Use models (XML files) for testing new features

Who is a JSBSim User

bull Users ndash Do not write C++ code ndash Do not use compilers ndash Write or use XML models ndash Interact with the simulation using properties and

XML files ndash Run the simulation to produce data ndash Analyze the data resulting from the runs ndash Unix command skills useful

JSBSim lsquorunning modesrsquo

bull JSBSim can be run by itself as a standalone application (batch mode) and told to connect to FlightGear via socket subsequently directing FlightGear what to display

bull The JSBSim executable for batch mode runs has a reset capability bull Reset integrator past states bull Reset flight control component past states bull Reconfigure aircraft settings in scripts bull Trim aircraft

bull Scripted runs are possible where the aircraft configuration file is loaded once but multiple runs are made such as for a set of Monte Carlo runs

JSBSim in batch mode

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

Developer directories

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

User Directories

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

Files Needed by Users

bull Model files (vehicle engine systems aero etc)

bull Script files bull Data logging files bull Data plotting files bull Shell scripts for running monte carlo analyses

Tools Needed

bull Bash shell (cygwin or linux) bull Gnuplot bull Prep_plot

bull Optional (pick one)

ndash Microsoft Visual C++ 20102012 Express (free devel)

ndash Notepad++ (free userdevel) ndash Matlab (non-free users post-processing)

User Workflow

bull Setup scenario (edit model scripts etc) ndash Run simulation ndash Auto-generate plots (eg Matlab) ndash Analyze plots ndash Modify input conditions parameters ndash Rerun

bull When ready make runs for the record bull Plot data bull Archive CSV data with input files and run

information in zip file to reduce storage reqmts bull Present results

Analysis Computerized Model CM and Traceability

bull Must be able to recreate runs bull For any run must know

ndash Vehicle configuration ndash Dispersions ndash Environment setup ndash Other inputs and assumptions etc

bull Save all run data note executable version used and archive input data files wdata

Key Concepts in JSBSim

bull XML bull Properties bull Functions

What is XML

bull eXtensible Markup Language bull A way of encoding data bull Range of tools technology and code already

available ndash Schema ndash Transforms ndash Editors ndash Parsers (JSBSim uses the eXpat library)

bull See ndash W3 Schools (httpwwww3schoolscomxml) ndash XMLorg (httpwwwxmlorg)

XML Elements

Format ltelementgt content ltelementgt Example ltfunctiongt ltproductgt ltcosgt 0707 ltcosgt ltvaluegt aeroqbar-area ltvaluegt ltproductgt ltfunctiongt

XML Attributes

Format ltelement attribute=ldquovaluerdquogt content ltelementgt

Example ltixx dispersion=ldquo700rdquo type=ldquouniformrdquo unit=ldquoSLUGFT2rdquogt 140099 ltixxgt

Early JSBSim Data Specification ltCOEFFICIENT NAME=CLalpha TYPE=VECTORgt Lift_due_to_alpha 8 velocitiesmach-norm aeroqbar-psf | metricsSw-sqft | aeroalpha-rad 000 450 040 380 060 360 105 450 140 400 280 250 600 110 900 100 ltCOEFFICIENTgt

Current JSBSim Data Spec ltfunction name=aeroforceCLDfgt ltdescriptiongt Delta lift due to flap deflection ltdescriptiongt ltproductgt ltpgt aerofunctionground-effect-factor-lift ltpgt ltpgt aeroqbar-area ltpgt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 025 200 030 300 035 lttableDatagt lttablegt ltproductgt ltfunctiongt

Properties A Property is used like a Variable

bull Property names are defined in a hierarchical style ndash attitudephi-rad ndash velocitiesu-fps

bull A property can have read andor read-write access

bull There are native and created properties bull [Programmatically a property may be bound

to a program variable or a function ndash this is a concern mostly for developers]

Aircraft FDM catalog

bull Exports a lsquocatalogrsquo of JSBSim internal properties related to the selected aircraft (Cessna 172)

bull Properties are nothing but variablevalue pairs handled during simulations

bull Each property value is lsquoexposedrsquo to the user ie can be grabbed and used for specific purposes

User files

Vehicle configuration file

Vehicle configuration file

ltfdm_configgt ltfileheadergt hellip ltfileheadergt lt-- 0 or 1 instance --gt ltmetricsgt hellip ltmetricsgt lt-- 1 instance --gt ltmass_balancegt hellip ltmass_balancegt lt-- 1 instance --gt ltground_reactionsgt hellip ltground_reactionsgt lt-- 1 instance --gt ltexternal_reactionsgt hellip ltexternal_reactionsgt lt-- 0 or 1 instance --gt ltbuoyant_forcesgt hellip ltbuoyant_forcesgt lt-- 0 or 1 instance --gt ltpropulsiongt hellip ltpropulsiongt lt-- 0 or 1 instance --gt ltsystemgt hellip ltsystemgt lt-- 0 to n instances --gt ltautopilotgt hellip ltautopilotgt lt-- 0 or 1 instance --gt ltflight_controlgt hellip ltflight_controlgt lt-- 0 or 1 instance --gt ltaerodynamicsgt hellip ltaerodynamicsgt lt-- 1 instance --gt ltinputgt hellip ltinputgt lt-- 0 or 1 instance --gt ltoutputgt hellip ltoutputgt lt-- 0 to n instances --gt ltfdm_configgt

Vehicle configuration

Geometry Masses

Vehicle configuration Propulsion configuration files

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 6: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

A team of main developers and a large base of users

JSBSim users in the world

Who is a JSBSim Developer

bull Developers ndash Add or modify C++ code ndash Integrate JSBSim into new simulation architectures ndash Compile the code ndash Interact with the code using the API ndash Use models (XML files) for testing new features

Who is a JSBSim User

bull Users ndash Do not write C++ code ndash Do not use compilers ndash Write or use XML models ndash Interact with the simulation using properties and

XML files ndash Run the simulation to produce data ndash Analyze the data resulting from the runs ndash Unix command skills useful

JSBSim lsquorunning modesrsquo

bull JSBSim can be run by itself as a standalone application (batch mode) and told to connect to FlightGear via socket subsequently directing FlightGear what to display

bull The JSBSim executable for batch mode runs has a reset capability bull Reset integrator past states bull Reset flight control component past states bull Reconfigure aircraft settings in scripts bull Trim aircraft

bull Scripted runs are possible where the aircraft configuration file is loaded once but multiple runs are made such as for a set of Monte Carlo runs

JSBSim in batch mode

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

Developer directories

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

User Directories

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

Files Needed by Users

bull Model files (vehicle engine systems aero etc)

bull Script files bull Data logging files bull Data plotting files bull Shell scripts for running monte carlo analyses

Tools Needed

bull Bash shell (cygwin or linux) bull Gnuplot bull Prep_plot

bull Optional (pick one)

ndash Microsoft Visual C++ 20102012 Express (free devel)

ndash Notepad++ (free userdevel) ndash Matlab (non-free users post-processing)

User Workflow

bull Setup scenario (edit model scripts etc) ndash Run simulation ndash Auto-generate plots (eg Matlab) ndash Analyze plots ndash Modify input conditions parameters ndash Rerun

bull When ready make runs for the record bull Plot data bull Archive CSV data with input files and run

information in zip file to reduce storage reqmts bull Present results

Analysis Computerized Model CM and Traceability

bull Must be able to recreate runs bull For any run must know

ndash Vehicle configuration ndash Dispersions ndash Environment setup ndash Other inputs and assumptions etc

bull Save all run data note executable version used and archive input data files wdata

Key Concepts in JSBSim

bull XML bull Properties bull Functions

What is XML

bull eXtensible Markup Language bull A way of encoding data bull Range of tools technology and code already

available ndash Schema ndash Transforms ndash Editors ndash Parsers (JSBSim uses the eXpat library)

bull See ndash W3 Schools (httpwwww3schoolscomxml) ndash XMLorg (httpwwwxmlorg)

XML Elements

Format ltelementgt content ltelementgt Example ltfunctiongt ltproductgt ltcosgt 0707 ltcosgt ltvaluegt aeroqbar-area ltvaluegt ltproductgt ltfunctiongt

XML Attributes

Format ltelement attribute=ldquovaluerdquogt content ltelementgt

Example ltixx dispersion=ldquo700rdquo type=ldquouniformrdquo unit=ldquoSLUGFT2rdquogt 140099 ltixxgt

Early JSBSim Data Specification ltCOEFFICIENT NAME=CLalpha TYPE=VECTORgt Lift_due_to_alpha 8 velocitiesmach-norm aeroqbar-psf | metricsSw-sqft | aeroalpha-rad 000 450 040 380 060 360 105 450 140 400 280 250 600 110 900 100 ltCOEFFICIENTgt

Current JSBSim Data Spec ltfunction name=aeroforceCLDfgt ltdescriptiongt Delta lift due to flap deflection ltdescriptiongt ltproductgt ltpgt aerofunctionground-effect-factor-lift ltpgt ltpgt aeroqbar-area ltpgt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 025 200 030 300 035 lttableDatagt lttablegt ltproductgt ltfunctiongt

Properties A Property is used like a Variable

bull Property names are defined in a hierarchical style ndash attitudephi-rad ndash velocitiesu-fps

bull A property can have read andor read-write access

bull There are native and created properties bull [Programmatically a property may be bound

to a program variable or a function ndash this is a concern mostly for developers]

Aircraft FDM catalog

bull Exports a lsquocatalogrsquo of JSBSim internal properties related to the selected aircraft (Cessna 172)

bull Properties are nothing but variablevalue pairs handled during simulations

bull Each property value is lsquoexposedrsquo to the user ie can be grabbed and used for specific purposes

User files

Vehicle configuration file

Vehicle configuration file

ltfdm_configgt ltfileheadergt hellip ltfileheadergt lt-- 0 or 1 instance --gt ltmetricsgt hellip ltmetricsgt lt-- 1 instance --gt ltmass_balancegt hellip ltmass_balancegt lt-- 1 instance --gt ltground_reactionsgt hellip ltground_reactionsgt lt-- 1 instance --gt ltexternal_reactionsgt hellip ltexternal_reactionsgt lt-- 0 or 1 instance --gt ltbuoyant_forcesgt hellip ltbuoyant_forcesgt lt-- 0 or 1 instance --gt ltpropulsiongt hellip ltpropulsiongt lt-- 0 or 1 instance --gt ltsystemgt hellip ltsystemgt lt-- 0 to n instances --gt ltautopilotgt hellip ltautopilotgt lt-- 0 or 1 instance --gt ltflight_controlgt hellip ltflight_controlgt lt-- 0 or 1 instance --gt ltaerodynamicsgt hellip ltaerodynamicsgt lt-- 1 instance --gt ltinputgt hellip ltinputgt lt-- 0 or 1 instance --gt ltoutputgt hellip ltoutputgt lt-- 0 to n instances --gt ltfdm_configgt

Vehicle configuration

Geometry Masses

Vehicle configuration Propulsion configuration files

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 7: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

JSBSim users in the world

Who is a JSBSim Developer

bull Developers ndash Add or modify C++ code ndash Integrate JSBSim into new simulation architectures ndash Compile the code ndash Interact with the code using the API ndash Use models (XML files) for testing new features

Who is a JSBSim User

bull Users ndash Do not write C++ code ndash Do not use compilers ndash Write or use XML models ndash Interact with the simulation using properties and

XML files ndash Run the simulation to produce data ndash Analyze the data resulting from the runs ndash Unix command skills useful

JSBSim lsquorunning modesrsquo

bull JSBSim can be run by itself as a standalone application (batch mode) and told to connect to FlightGear via socket subsequently directing FlightGear what to display

bull The JSBSim executable for batch mode runs has a reset capability bull Reset integrator past states bull Reset flight control component past states bull Reconfigure aircraft settings in scripts bull Trim aircraft

bull Scripted runs are possible where the aircraft configuration file is loaded once but multiple runs are made such as for a set of Monte Carlo runs

JSBSim in batch mode

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

Developer directories

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

User Directories

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

Files Needed by Users

bull Model files (vehicle engine systems aero etc)

bull Script files bull Data logging files bull Data plotting files bull Shell scripts for running monte carlo analyses

Tools Needed

bull Bash shell (cygwin or linux) bull Gnuplot bull Prep_plot

bull Optional (pick one)

ndash Microsoft Visual C++ 20102012 Express (free devel)

ndash Notepad++ (free userdevel) ndash Matlab (non-free users post-processing)

User Workflow

bull Setup scenario (edit model scripts etc) ndash Run simulation ndash Auto-generate plots (eg Matlab) ndash Analyze plots ndash Modify input conditions parameters ndash Rerun

bull When ready make runs for the record bull Plot data bull Archive CSV data with input files and run

information in zip file to reduce storage reqmts bull Present results

Analysis Computerized Model CM and Traceability

bull Must be able to recreate runs bull For any run must know

ndash Vehicle configuration ndash Dispersions ndash Environment setup ndash Other inputs and assumptions etc

bull Save all run data note executable version used and archive input data files wdata

Key Concepts in JSBSim

bull XML bull Properties bull Functions

What is XML

bull eXtensible Markup Language bull A way of encoding data bull Range of tools technology and code already

available ndash Schema ndash Transforms ndash Editors ndash Parsers (JSBSim uses the eXpat library)

bull See ndash W3 Schools (httpwwww3schoolscomxml) ndash XMLorg (httpwwwxmlorg)

XML Elements

Format ltelementgt content ltelementgt Example ltfunctiongt ltproductgt ltcosgt 0707 ltcosgt ltvaluegt aeroqbar-area ltvaluegt ltproductgt ltfunctiongt

XML Attributes

Format ltelement attribute=ldquovaluerdquogt content ltelementgt

Example ltixx dispersion=ldquo700rdquo type=ldquouniformrdquo unit=ldquoSLUGFT2rdquogt 140099 ltixxgt

Early JSBSim Data Specification ltCOEFFICIENT NAME=CLalpha TYPE=VECTORgt Lift_due_to_alpha 8 velocitiesmach-norm aeroqbar-psf | metricsSw-sqft | aeroalpha-rad 000 450 040 380 060 360 105 450 140 400 280 250 600 110 900 100 ltCOEFFICIENTgt

Current JSBSim Data Spec ltfunction name=aeroforceCLDfgt ltdescriptiongt Delta lift due to flap deflection ltdescriptiongt ltproductgt ltpgt aerofunctionground-effect-factor-lift ltpgt ltpgt aeroqbar-area ltpgt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 025 200 030 300 035 lttableDatagt lttablegt ltproductgt ltfunctiongt

Properties A Property is used like a Variable

bull Property names are defined in a hierarchical style ndash attitudephi-rad ndash velocitiesu-fps

bull A property can have read andor read-write access

bull There are native and created properties bull [Programmatically a property may be bound

to a program variable or a function ndash this is a concern mostly for developers]

Aircraft FDM catalog

bull Exports a lsquocatalogrsquo of JSBSim internal properties related to the selected aircraft (Cessna 172)

bull Properties are nothing but variablevalue pairs handled during simulations

bull Each property value is lsquoexposedrsquo to the user ie can be grabbed and used for specific purposes

User files

Vehicle configuration file

Vehicle configuration file

ltfdm_configgt ltfileheadergt hellip ltfileheadergt lt-- 0 or 1 instance --gt ltmetricsgt hellip ltmetricsgt lt-- 1 instance --gt ltmass_balancegt hellip ltmass_balancegt lt-- 1 instance --gt ltground_reactionsgt hellip ltground_reactionsgt lt-- 1 instance --gt ltexternal_reactionsgt hellip ltexternal_reactionsgt lt-- 0 or 1 instance --gt ltbuoyant_forcesgt hellip ltbuoyant_forcesgt lt-- 0 or 1 instance --gt ltpropulsiongt hellip ltpropulsiongt lt-- 0 or 1 instance --gt ltsystemgt hellip ltsystemgt lt-- 0 to n instances --gt ltautopilotgt hellip ltautopilotgt lt-- 0 or 1 instance --gt ltflight_controlgt hellip ltflight_controlgt lt-- 0 or 1 instance --gt ltaerodynamicsgt hellip ltaerodynamicsgt lt-- 1 instance --gt ltinputgt hellip ltinputgt lt-- 0 or 1 instance --gt ltoutputgt hellip ltoutputgt lt-- 0 to n instances --gt ltfdm_configgt

Vehicle configuration

Geometry Masses

Vehicle configuration Propulsion configuration files

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 8: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Who is a JSBSim Developer

bull Developers ndash Add or modify C++ code ndash Integrate JSBSim into new simulation architectures ndash Compile the code ndash Interact with the code using the API ndash Use models (XML files) for testing new features

Who is a JSBSim User

bull Users ndash Do not write C++ code ndash Do not use compilers ndash Write or use XML models ndash Interact with the simulation using properties and

XML files ndash Run the simulation to produce data ndash Analyze the data resulting from the runs ndash Unix command skills useful

JSBSim lsquorunning modesrsquo

bull JSBSim can be run by itself as a standalone application (batch mode) and told to connect to FlightGear via socket subsequently directing FlightGear what to display

bull The JSBSim executable for batch mode runs has a reset capability bull Reset integrator past states bull Reset flight control component past states bull Reconfigure aircraft settings in scripts bull Trim aircraft

bull Scripted runs are possible where the aircraft configuration file is loaded once but multiple runs are made such as for a set of Monte Carlo runs

JSBSim in batch mode

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

Developer directories

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

User Directories

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

Files Needed by Users

bull Model files (vehicle engine systems aero etc)

bull Script files bull Data logging files bull Data plotting files bull Shell scripts for running monte carlo analyses

Tools Needed

bull Bash shell (cygwin or linux) bull Gnuplot bull Prep_plot

bull Optional (pick one)

ndash Microsoft Visual C++ 20102012 Express (free devel)

ndash Notepad++ (free userdevel) ndash Matlab (non-free users post-processing)

User Workflow

bull Setup scenario (edit model scripts etc) ndash Run simulation ndash Auto-generate plots (eg Matlab) ndash Analyze plots ndash Modify input conditions parameters ndash Rerun

bull When ready make runs for the record bull Plot data bull Archive CSV data with input files and run

information in zip file to reduce storage reqmts bull Present results

Analysis Computerized Model CM and Traceability

bull Must be able to recreate runs bull For any run must know

ndash Vehicle configuration ndash Dispersions ndash Environment setup ndash Other inputs and assumptions etc

bull Save all run data note executable version used and archive input data files wdata

Key Concepts in JSBSim

bull XML bull Properties bull Functions

What is XML

bull eXtensible Markup Language bull A way of encoding data bull Range of tools technology and code already

available ndash Schema ndash Transforms ndash Editors ndash Parsers (JSBSim uses the eXpat library)

bull See ndash W3 Schools (httpwwww3schoolscomxml) ndash XMLorg (httpwwwxmlorg)

XML Elements

Format ltelementgt content ltelementgt Example ltfunctiongt ltproductgt ltcosgt 0707 ltcosgt ltvaluegt aeroqbar-area ltvaluegt ltproductgt ltfunctiongt

XML Attributes

Format ltelement attribute=ldquovaluerdquogt content ltelementgt

Example ltixx dispersion=ldquo700rdquo type=ldquouniformrdquo unit=ldquoSLUGFT2rdquogt 140099 ltixxgt

Early JSBSim Data Specification ltCOEFFICIENT NAME=CLalpha TYPE=VECTORgt Lift_due_to_alpha 8 velocitiesmach-norm aeroqbar-psf | metricsSw-sqft | aeroalpha-rad 000 450 040 380 060 360 105 450 140 400 280 250 600 110 900 100 ltCOEFFICIENTgt

Current JSBSim Data Spec ltfunction name=aeroforceCLDfgt ltdescriptiongt Delta lift due to flap deflection ltdescriptiongt ltproductgt ltpgt aerofunctionground-effect-factor-lift ltpgt ltpgt aeroqbar-area ltpgt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 025 200 030 300 035 lttableDatagt lttablegt ltproductgt ltfunctiongt

Properties A Property is used like a Variable

bull Property names are defined in a hierarchical style ndash attitudephi-rad ndash velocitiesu-fps

bull A property can have read andor read-write access

bull There are native and created properties bull [Programmatically a property may be bound

to a program variable or a function ndash this is a concern mostly for developers]

Aircraft FDM catalog

bull Exports a lsquocatalogrsquo of JSBSim internal properties related to the selected aircraft (Cessna 172)

bull Properties are nothing but variablevalue pairs handled during simulations

bull Each property value is lsquoexposedrsquo to the user ie can be grabbed and used for specific purposes

User files

Vehicle configuration file

Vehicle configuration file

ltfdm_configgt ltfileheadergt hellip ltfileheadergt lt-- 0 or 1 instance --gt ltmetricsgt hellip ltmetricsgt lt-- 1 instance --gt ltmass_balancegt hellip ltmass_balancegt lt-- 1 instance --gt ltground_reactionsgt hellip ltground_reactionsgt lt-- 1 instance --gt ltexternal_reactionsgt hellip ltexternal_reactionsgt lt-- 0 or 1 instance --gt ltbuoyant_forcesgt hellip ltbuoyant_forcesgt lt-- 0 or 1 instance --gt ltpropulsiongt hellip ltpropulsiongt lt-- 0 or 1 instance --gt ltsystemgt hellip ltsystemgt lt-- 0 to n instances --gt ltautopilotgt hellip ltautopilotgt lt-- 0 or 1 instance --gt ltflight_controlgt hellip ltflight_controlgt lt-- 0 or 1 instance --gt ltaerodynamicsgt hellip ltaerodynamicsgt lt-- 1 instance --gt ltinputgt hellip ltinputgt lt-- 0 or 1 instance --gt ltoutputgt hellip ltoutputgt lt-- 0 to n instances --gt ltfdm_configgt

Vehicle configuration

Geometry Masses

Vehicle configuration Propulsion configuration files

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 9: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Who is a JSBSim User

bull Users ndash Do not write C++ code ndash Do not use compilers ndash Write or use XML models ndash Interact with the simulation using properties and

XML files ndash Run the simulation to produce data ndash Analyze the data resulting from the runs ndash Unix command skills useful

JSBSim lsquorunning modesrsquo

bull JSBSim can be run by itself as a standalone application (batch mode) and told to connect to FlightGear via socket subsequently directing FlightGear what to display

bull The JSBSim executable for batch mode runs has a reset capability bull Reset integrator past states bull Reset flight control component past states bull Reconfigure aircraft settings in scripts bull Trim aircraft

bull Scripted runs are possible where the aircraft configuration file is loaded once but multiple runs are made such as for a set of Monte Carlo runs

JSBSim in batch mode

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

Developer directories

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

User Directories

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

Files Needed by Users

bull Model files (vehicle engine systems aero etc)

bull Script files bull Data logging files bull Data plotting files bull Shell scripts for running monte carlo analyses

Tools Needed

bull Bash shell (cygwin or linux) bull Gnuplot bull Prep_plot

bull Optional (pick one)

ndash Microsoft Visual C++ 20102012 Express (free devel)

ndash Notepad++ (free userdevel) ndash Matlab (non-free users post-processing)

User Workflow

bull Setup scenario (edit model scripts etc) ndash Run simulation ndash Auto-generate plots (eg Matlab) ndash Analyze plots ndash Modify input conditions parameters ndash Rerun

bull When ready make runs for the record bull Plot data bull Archive CSV data with input files and run

information in zip file to reduce storage reqmts bull Present results

Analysis Computerized Model CM and Traceability

bull Must be able to recreate runs bull For any run must know

ndash Vehicle configuration ndash Dispersions ndash Environment setup ndash Other inputs and assumptions etc

bull Save all run data note executable version used and archive input data files wdata

Key Concepts in JSBSim

bull XML bull Properties bull Functions

What is XML

bull eXtensible Markup Language bull A way of encoding data bull Range of tools technology and code already

available ndash Schema ndash Transforms ndash Editors ndash Parsers (JSBSim uses the eXpat library)

bull See ndash W3 Schools (httpwwww3schoolscomxml) ndash XMLorg (httpwwwxmlorg)

XML Elements

Format ltelementgt content ltelementgt Example ltfunctiongt ltproductgt ltcosgt 0707 ltcosgt ltvaluegt aeroqbar-area ltvaluegt ltproductgt ltfunctiongt

XML Attributes

Format ltelement attribute=ldquovaluerdquogt content ltelementgt

Example ltixx dispersion=ldquo700rdquo type=ldquouniformrdquo unit=ldquoSLUGFT2rdquogt 140099 ltixxgt

Early JSBSim Data Specification ltCOEFFICIENT NAME=CLalpha TYPE=VECTORgt Lift_due_to_alpha 8 velocitiesmach-norm aeroqbar-psf | metricsSw-sqft | aeroalpha-rad 000 450 040 380 060 360 105 450 140 400 280 250 600 110 900 100 ltCOEFFICIENTgt

Current JSBSim Data Spec ltfunction name=aeroforceCLDfgt ltdescriptiongt Delta lift due to flap deflection ltdescriptiongt ltproductgt ltpgt aerofunctionground-effect-factor-lift ltpgt ltpgt aeroqbar-area ltpgt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 025 200 030 300 035 lttableDatagt lttablegt ltproductgt ltfunctiongt

Properties A Property is used like a Variable

bull Property names are defined in a hierarchical style ndash attitudephi-rad ndash velocitiesu-fps

bull A property can have read andor read-write access

bull There are native and created properties bull [Programmatically a property may be bound

to a program variable or a function ndash this is a concern mostly for developers]

Aircraft FDM catalog

bull Exports a lsquocatalogrsquo of JSBSim internal properties related to the selected aircraft (Cessna 172)

bull Properties are nothing but variablevalue pairs handled during simulations

bull Each property value is lsquoexposedrsquo to the user ie can be grabbed and used for specific purposes

User files

Vehicle configuration file

Vehicle configuration file

ltfdm_configgt ltfileheadergt hellip ltfileheadergt lt-- 0 or 1 instance --gt ltmetricsgt hellip ltmetricsgt lt-- 1 instance --gt ltmass_balancegt hellip ltmass_balancegt lt-- 1 instance --gt ltground_reactionsgt hellip ltground_reactionsgt lt-- 1 instance --gt ltexternal_reactionsgt hellip ltexternal_reactionsgt lt-- 0 or 1 instance --gt ltbuoyant_forcesgt hellip ltbuoyant_forcesgt lt-- 0 or 1 instance --gt ltpropulsiongt hellip ltpropulsiongt lt-- 0 or 1 instance --gt ltsystemgt hellip ltsystemgt lt-- 0 to n instances --gt ltautopilotgt hellip ltautopilotgt lt-- 0 or 1 instance --gt ltflight_controlgt hellip ltflight_controlgt lt-- 0 or 1 instance --gt ltaerodynamicsgt hellip ltaerodynamicsgt lt-- 1 instance --gt ltinputgt hellip ltinputgt lt-- 0 or 1 instance --gt ltoutputgt hellip ltoutputgt lt-- 0 to n instances --gt ltfdm_configgt

Vehicle configuration

Geometry Masses

Vehicle configuration Propulsion configuration files

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 10: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

JSBSim lsquorunning modesrsquo

bull JSBSim can be run by itself as a standalone application (batch mode) and told to connect to FlightGear via socket subsequently directing FlightGear what to display

bull The JSBSim executable for batch mode runs has a reset capability bull Reset integrator past states bull Reset flight control component past states bull Reconfigure aircraft settings in scripts bull Trim aircraft

bull Scripted runs are possible where the aircraft configuration file is loaded once but multiple runs are made such as for a set of Monte Carlo runs

JSBSim in batch mode

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

Developer directories

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

User Directories

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

Files Needed by Users

bull Model files (vehicle engine systems aero etc)

bull Script files bull Data logging files bull Data plotting files bull Shell scripts for running monte carlo analyses

Tools Needed

bull Bash shell (cygwin or linux) bull Gnuplot bull Prep_plot

bull Optional (pick one)

ndash Microsoft Visual C++ 20102012 Express (free devel)

ndash Notepad++ (free userdevel) ndash Matlab (non-free users post-processing)

User Workflow

bull Setup scenario (edit model scripts etc) ndash Run simulation ndash Auto-generate plots (eg Matlab) ndash Analyze plots ndash Modify input conditions parameters ndash Rerun

bull When ready make runs for the record bull Plot data bull Archive CSV data with input files and run

information in zip file to reduce storage reqmts bull Present results

Analysis Computerized Model CM and Traceability

bull Must be able to recreate runs bull For any run must know

ndash Vehicle configuration ndash Dispersions ndash Environment setup ndash Other inputs and assumptions etc

bull Save all run data note executable version used and archive input data files wdata

Key Concepts in JSBSim

bull XML bull Properties bull Functions

What is XML

bull eXtensible Markup Language bull A way of encoding data bull Range of tools technology and code already

available ndash Schema ndash Transforms ndash Editors ndash Parsers (JSBSim uses the eXpat library)

bull See ndash W3 Schools (httpwwww3schoolscomxml) ndash XMLorg (httpwwwxmlorg)

XML Elements

Format ltelementgt content ltelementgt Example ltfunctiongt ltproductgt ltcosgt 0707 ltcosgt ltvaluegt aeroqbar-area ltvaluegt ltproductgt ltfunctiongt

XML Attributes

Format ltelement attribute=ldquovaluerdquogt content ltelementgt

Example ltixx dispersion=ldquo700rdquo type=ldquouniformrdquo unit=ldquoSLUGFT2rdquogt 140099 ltixxgt

Early JSBSim Data Specification ltCOEFFICIENT NAME=CLalpha TYPE=VECTORgt Lift_due_to_alpha 8 velocitiesmach-norm aeroqbar-psf | metricsSw-sqft | aeroalpha-rad 000 450 040 380 060 360 105 450 140 400 280 250 600 110 900 100 ltCOEFFICIENTgt

Current JSBSim Data Spec ltfunction name=aeroforceCLDfgt ltdescriptiongt Delta lift due to flap deflection ltdescriptiongt ltproductgt ltpgt aerofunctionground-effect-factor-lift ltpgt ltpgt aeroqbar-area ltpgt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 025 200 030 300 035 lttableDatagt lttablegt ltproductgt ltfunctiongt

Properties A Property is used like a Variable

bull Property names are defined in a hierarchical style ndash attitudephi-rad ndash velocitiesu-fps

bull A property can have read andor read-write access

bull There are native and created properties bull [Programmatically a property may be bound

to a program variable or a function ndash this is a concern mostly for developers]

Aircraft FDM catalog

bull Exports a lsquocatalogrsquo of JSBSim internal properties related to the selected aircraft (Cessna 172)

bull Properties are nothing but variablevalue pairs handled during simulations

bull Each property value is lsquoexposedrsquo to the user ie can be grabbed and used for specific purposes

User files

Vehicle configuration file

Vehicle configuration file

ltfdm_configgt ltfileheadergt hellip ltfileheadergt lt-- 0 or 1 instance --gt ltmetricsgt hellip ltmetricsgt lt-- 1 instance --gt ltmass_balancegt hellip ltmass_balancegt lt-- 1 instance --gt ltground_reactionsgt hellip ltground_reactionsgt lt-- 1 instance --gt ltexternal_reactionsgt hellip ltexternal_reactionsgt lt-- 0 or 1 instance --gt ltbuoyant_forcesgt hellip ltbuoyant_forcesgt lt-- 0 or 1 instance --gt ltpropulsiongt hellip ltpropulsiongt lt-- 0 or 1 instance --gt ltsystemgt hellip ltsystemgt lt-- 0 to n instances --gt ltautopilotgt hellip ltautopilotgt lt-- 0 or 1 instance --gt ltflight_controlgt hellip ltflight_controlgt lt-- 0 or 1 instance --gt ltaerodynamicsgt hellip ltaerodynamicsgt lt-- 1 instance --gt ltinputgt hellip ltinputgt lt-- 0 or 1 instance --gt ltoutputgt hellip ltoutputgt lt-- 0 to n instances --gt ltfdm_configgt

Vehicle configuration

Geometry Masses

Vehicle configuration Propulsion configuration files

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 11: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

JSBSim in batch mode

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

Developer directories

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

User Directories

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

Files Needed by Users

bull Model files (vehicle engine systems aero etc)

bull Script files bull Data logging files bull Data plotting files bull Shell scripts for running monte carlo analyses

Tools Needed

bull Bash shell (cygwin or linux) bull Gnuplot bull Prep_plot

bull Optional (pick one)

ndash Microsoft Visual C++ 20102012 Express (free devel)

ndash Notepad++ (free userdevel) ndash Matlab (non-free users post-processing)

User Workflow

bull Setup scenario (edit model scripts etc) ndash Run simulation ndash Auto-generate plots (eg Matlab) ndash Analyze plots ndash Modify input conditions parameters ndash Rerun

bull When ready make runs for the record bull Plot data bull Archive CSV data with input files and run

information in zip file to reduce storage reqmts bull Present results

Analysis Computerized Model CM and Traceability

bull Must be able to recreate runs bull For any run must know

ndash Vehicle configuration ndash Dispersions ndash Environment setup ndash Other inputs and assumptions etc

bull Save all run data note executable version used and archive input data files wdata

Key Concepts in JSBSim

bull XML bull Properties bull Functions

What is XML

bull eXtensible Markup Language bull A way of encoding data bull Range of tools technology and code already

available ndash Schema ndash Transforms ndash Editors ndash Parsers (JSBSim uses the eXpat library)

bull See ndash W3 Schools (httpwwww3schoolscomxml) ndash XMLorg (httpwwwxmlorg)

XML Elements

Format ltelementgt content ltelementgt Example ltfunctiongt ltproductgt ltcosgt 0707 ltcosgt ltvaluegt aeroqbar-area ltvaluegt ltproductgt ltfunctiongt

XML Attributes

Format ltelement attribute=ldquovaluerdquogt content ltelementgt

Example ltixx dispersion=ldquo700rdquo type=ldquouniformrdquo unit=ldquoSLUGFT2rdquogt 140099 ltixxgt

Early JSBSim Data Specification ltCOEFFICIENT NAME=CLalpha TYPE=VECTORgt Lift_due_to_alpha 8 velocitiesmach-norm aeroqbar-psf | metricsSw-sqft | aeroalpha-rad 000 450 040 380 060 360 105 450 140 400 280 250 600 110 900 100 ltCOEFFICIENTgt

Current JSBSim Data Spec ltfunction name=aeroforceCLDfgt ltdescriptiongt Delta lift due to flap deflection ltdescriptiongt ltproductgt ltpgt aerofunctionground-effect-factor-lift ltpgt ltpgt aeroqbar-area ltpgt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 025 200 030 300 035 lttableDatagt lttablegt ltproductgt ltfunctiongt

Properties A Property is used like a Variable

bull Property names are defined in a hierarchical style ndash attitudephi-rad ndash velocitiesu-fps

bull A property can have read andor read-write access

bull There are native and created properties bull [Programmatically a property may be bound

to a program variable or a function ndash this is a concern mostly for developers]

Aircraft FDM catalog

bull Exports a lsquocatalogrsquo of JSBSim internal properties related to the selected aircraft (Cessna 172)

bull Properties are nothing but variablevalue pairs handled during simulations

bull Each property value is lsquoexposedrsquo to the user ie can be grabbed and used for specific purposes

User files

Vehicle configuration file

Vehicle configuration file

ltfdm_configgt ltfileheadergt hellip ltfileheadergt lt-- 0 or 1 instance --gt ltmetricsgt hellip ltmetricsgt lt-- 1 instance --gt ltmass_balancegt hellip ltmass_balancegt lt-- 1 instance --gt ltground_reactionsgt hellip ltground_reactionsgt lt-- 1 instance --gt ltexternal_reactionsgt hellip ltexternal_reactionsgt lt-- 0 or 1 instance --gt ltbuoyant_forcesgt hellip ltbuoyant_forcesgt lt-- 0 or 1 instance --gt ltpropulsiongt hellip ltpropulsiongt lt-- 0 or 1 instance --gt ltsystemgt hellip ltsystemgt lt-- 0 to n instances --gt ltautopilotgt hellip ltautopilotgt lt-- 0 or 1 instance --gt ltflight_controlgt hellip ltflight_controlgt lt-- 0 or 1 instance --gt ltaerodynamicsgt hellip ltaerodynamicsgt lt-- 1 instance --gt ltinputgt hellip ltinputgt lt-- 0 or 1 instance --gt ltoutputgt hellip ltoutputgt lt-- 0 to n instances --gt ltfdm_configgt

Vehicle configuration

Geometry Masses

Vehicle configuration Propulsion configuration files

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 12: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

Developer directories

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

User Directories

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

Files Needed by Users

bull Model files (vehicle engine systems aero etc)

bull Script files bull Data logging files bull Data plotting files bull Shell scripts for running monte carlo analyses

Tools Needed

bull Bash shell (cygwin or linux) bull Gnuplot bull Prep_plot

bull Optional (pick one)

ndash Microsoft Visual C++ 20102012 Express (free devel)

ndash Notepad++ (free userdevel) ndash Matlab (non-free users post-processing)

User Workflow

bull Setup scenario (edit model scripts etc) ndash Run simulation ndash Auto-generate plots (eg Matlab) ndash Analyze plots ndash Modify input conditions parameters ndash Rerun

bull When ready make runs for the record bull Plot data bull Archive CSV data with input files and run

information in zip file to reduce storage reqmts bull Present results

Analysis Computerized Model CM and Traceability

bull Must be able to recreate runs bull For any run must know

ndash Vehicle configuration ndash Dispersions ndash Environment setup ndash Other inputs and assumptions etc

bull Save all run data note executable version used and archive input data files wdata

Key Concepts in JSBSim

bull XML bull Properties bull Functions

What is XML

bull eXtensible Markup Language bull A way of encoding data bull Range of tools technology and code already

available ndash Schema ndash Transforms ndash Editors ndash Parsers (JSBSim uses the eXpat library)

bull See ndash W3 Schools (httpwwww3schoolscomxml) ndash XMLorg (httpwwwxmlorg)

XML Elements

Format ltelementgt content ltelementgt Example ltfunctiongt ltproductgt ltcosgt 0707 ltcosgt ltvaluegt aeroqbar-area ltvaluegt ltproductgt ltfunctiongt

XML Attributes

Format ltelement attribute=ldquovaluerdquogt content ltelementgt

Example ltixx dispersion=ldquo700rdquo type=ldquouniformrdquo unit=ldquoSLUGFT2rdquogt 140099 ltixxgt

Early JSBSim Data Specification ltCOEFFICIENT NAME=CLalpha TYPE=VECTORgt Lift_due_to_alpha 8 velocitiesmach-norm aeroqbar-psf | metricsSw-sqft | aeroalpha-rad 000 450 040 380 060 360 105 450 140 400 280 250 600 110 900 100 ltCOEFFICIENTgt

Current JSBSim Data Spec ltfunction name=aeroforceCLDfgt ltdescriptiongt Delta lift due to flap deflection ltdescriptiongt ltproductgt ltpgt aerofunctionground-effect-factor-lift ltpgt ltpgt aeroqbar-area ltpgt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 025 200 030 300 035 lttableDatagt lttablegt ltproductgt ltfunctiongt

Properties A Property is used like a Variable

bull Property names are defined in a hierarchical style ndash attitudephi-rad ndash velocitiesu-fps

bull A property can have read andor read-write access

bull There are native and created properties bull [Programmatically a property may be bound

to a program variable or a function ndash this is a concern mostly for developers]

Aircraft FDM catalog

bull Exports a lsquocatalogrsquo of JSBSim internal properties related to the selected aircraft (Cessna 172)

bull Properties are nothing but variablevalue pairs handled during simulations

bull Each property value is lsquoexposedrsquo to the user ie can be grabbed and used for specific purposes

User files

Vehicle configuration file

Vehicle configuration file

ltfdm_configgt ltfileheadergt hellip ltfileheadergt lt-- 0 or 1 instance --gt ltmetricsgt hellip ltmetricsgt lt-- 1 instance --gt ltmass_balancegt hellip ltmass_balancegt lt-- 1 instance --gt ltground_reactionsgt hellip ltground_reactionsgt lt-- 1 instance --gt ltexternal_reactionsgt hellip ltexternal_reactionsgt lt-- 0 or 1 instance --gt ltbuoyant_forcesgt hellip ltbuoyant_forcesgt lt-- 0 or 1 instance --gt ltpropulsiongt hellip ltpropulsiongt lt-- 0 or 1 instance --gt ltsystemgt hellip ltsystemgt lt-- 0 to n instances --gt ltautopilotgt hellip ltautopilotgt lt-- 0 or 1 instance --gt ltflight_controlgt hellip ltflight_controlgt lt-- 0 or 1 instance --gt ltaerodynamicsgt hellip ltaerodynamicsgt lt-- 1 instance --gt ltinputgt hellip ltinputgt lt-- 0 or 1 instance --gt ltoutputgt hellip ltoutputgt lt-- 0 to n instances --gt ltfdm_configgt

Vehicle configuration

Geometry Masses

Vehicle configuration Propulsion configuration files

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 13: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Developer directories

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

User Directories

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

Files Needed by Users

bull Model files (vehicle engine systems aero etc)

bull Script files bull Data logging files bull Data plotting files bull Shell scripts for running monte carlo analyses

Tools Needed

bull Bash shell (cygwin or linux) bull Gnuplot bull Prep_plot

bull Optional (pick one)

ndash Microsoft Visual C++ 20102012 Express (free devel)

ndash Notepad++ (free userdevel) ndash Matlab (non-free users post-processing)

User Workflow

bull Setup scenario (edit model scripts etc) ndash Run simulation ndash Auto-generate plots (eg Matlab) ndash Analyze plots ndash Modify input conditions parameters ndash Rerun

bull When ready make runs for the record bull Plot data bull Archive CSV data with input files and run

information in zip file to reduce storage reqmts bull Present results

Analysis Computerized Model CM and Traceability

bull Must be able to recreate runs bull For any run must know

ndash Vehicle configuration ndash Dispersions ndash Environment setup ndash Other inputs and assumptions etc

bull Save all run data note executable version used and archive input data files wdata

Key Concepts in JSBSim

bull XML bull Properties bull Functions

What is XML

bull eXtensible Markup Language bull A way of encoding data bull Range of tools technology and code already

available ndash Schema ndash Transforms ndash Editors ndash Parsers (JSBSim uses the eXpat library)

bull See ndash W3 Schools (httpwwww3schoolscomxml) ndash XMLorg (httpwwwxmlorg)

XML Elements

Format ltelementgt content ltelementgt Example ltfunctiongt ltproductgt ltcosgt 0707 ltcosgt ltvaluegt aeroqbar-area ltvaluegt ltproductgt ltfunctiongt

XML Attributes

Format ltelement attribute=ldquovaluerdquogt content ltelementgt

Example ltixx dispersion=ldquo700rdquo type=ldquouniformrdquo unit=ldquoSLUGFT2rdquogt 140099 ltixxgt

Early JSBSim Data Specification ltCOEFFICIENT NAME=CLalpha TYPE=VECTORgt Lift_due_to_alpha 8 velocitiesmach-norm aeroqbar-psf | metricsSw-sqft | aeroalpha-rad 000 450 040 380 060 360 105 450 140 400 280 250 600 110 900 100 ltCOEFFICIENTgt

Current JSBSim Data Spec ltfunction name=aeroforceCLDfgt ltdescriptiongt Delta lift due to flap deflection ltdescriptiongt ltproductgt ltpgt aerofunctionground-effect-factor-lift ltpgt ltpgt aeroqbar-area ltpgt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 025 200 030 300 035 lttableDatagt lttablegt ltproductgt ltfunctiongt

Properties A Property is used like a Variable

bull Property names are defined in a hierarchical style ndash attitudephi-rad ndash velocitiesu-fps

bull A property can have read andor read-write access

bull There are native and created properties bull [Programmatically a property may be bound

to a program variable or a function ndash this is a concern mostly for developers]

Aircraft FDM catalog

bull Exports a lsquocatalogrsquo of JSBSim internal properties related to the selected aircraft (Cessna 172)

bull Properties are nothing but variablevalue pairs handled during simulations

bull Each property value is lsquoexposedrsquo to the user ie can be grabbed and used for specific purposes

User files

Vehicle configuration file

Vehicle configuration file

ltfdm_configgt ltfileheadergt hellip ltfileheadergt lt-- 0 or 1 instance --gt ltmetricsgt hellip ltmetricsgt lt-- 1 instance --gt ltmass_balancegt hellip ltmass_balancegt lt-- 1 instance --gt ltground_reactionsgt hellip ltground_reactionsgt lt-- 1 instance --gt ltexternal_reactionsgt hellip ltexternal_reactionsgt lt-- 0 or 1 instance --gt ltbuoyant_forcesgt hellip ltbuoyant_forcesgt lt-- 0 or 1 instance --gt ltpropulsiongt hellip ltpropulsiongt lt-- 0 or 1 instance --gt ltsystemgt hellip ltsystemgt lt-- 0 to n instances --gt ltautopilotgt hellip ltautopilotgt lt-- 0 or 1 instance --gt ltflight_controlgt hellip ltflight_controlgt lt-- 0 or 1 instance --gt ltaerodynamicsgt hellip ltaerodynamicsgt lt-- 1 instance --gt ltinputgt hellip ltinputgt lt-- 0 or 1 instance --gt ltoutputgt hellip ltoutputgt lt-- 0 to n instances --gt ltfdm_configgt

Vehicle configuration

Geometry Masses

Vehicle configuration Propulsion configuration files

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 14: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

User Directories

JSBSim Directory Tree (

root

)

src

aircraft

data_output

data_plot

scripts

initialization input_output math models utilities

Aero Engines Ground MassProperties Propulsion Systems

DC

Files Needed by Users

bull Model files (vehicle engine systems aero etc)

bull Script files bull Data logging files bull Data plotting files bull Shell scripts for running monte carlo analyses

Tools Needed

bull Bash shell (cygwin or linux) bull Gnuplot bull Prep_plot

bull Optional (pick one)

ndash Microsoft Visual C++ 20102012 Express (free devel)

ndash Notepad++ (free userdevel) ndash Matlab (non-free users post-processing)

User Workflow

bull Setup scenario (edit model scripts etc) ndash Run simulation ndash Auto-generate plots (eg Matlab) ndash Analyze plots ndash Modify input conditions parameters ndash Rerun

bull When ready make runs for the record bull Plot data bull Archive CSV data with input files and run

information in zip file to reduce storage reqmts bull Present results

Analysis Computerized Model CM and Traceability

bull Must be able to recreate runs bull For any run must know

ndash Vehicle configuration ndash Dispersions ndash Environment setup ndash Other inputs and assumptions etc

bull Save all run data note executable version used and archive input data files wdata

Key Concepts in JSBSim

bull XML bull Properties bull Functions

What is XML

bull eXtensible Markup Language bull A way of encoding data bull Range of tools technology and code already

available ndash Schema ndash Transforms ndash Editors ndash Parsers (JSBSim uses the eXpat library)

bull See ndash W3 Schools (httpwwww3schoolscomxml) ndash XMLorg (httpwwwxmlorg)

XML Elements

Format ltelementgt content ltelementgt Example ltfunctiongt ltproductgt ltcosgt 0707 ltcosgt ltvaluegt aeroqbar-area ltvaluegt ltproductgt ltfunctiongt

XML Attributes

Format ltelement attribute=ldquovaluerdquogt content ltelementgt

Example ltixx dispersion=ldquo700rdquo type=ldquouniformrdquo unit=ldquoSLUGFT2rdquogt 140099 ltixxgt

Early JSBSim Data Specification ltCOEFFICIENT NAME=CLalpha TYPE=VECTORgt Lift_due_to_alpha 8 velocitiesmach-norm aeroqbar-psf | metricsSw-sqft | aeroalpha-rad 000 450 040 380 060 360 105 450 140 400 280 250 600 110 900 100 ltCOEFFICIENTgt

Current JSBSim Data Spec ltfunction name=aeroforceCLDfgt ltdescriptiongt Delta lift due to flap deflection ltdescriptiongt ltproductgt ltpgt aerofunctionground-effect-factor-lift ltpgt ltpgt aeroqbar-area ltpgt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 025 200 030 300 035 lttableDatagt lttablegt ltproductgt ltfunctiongt

Properties A Property is used like a Variable

bull Property names are defined in a hierarchical style ndash attitudephi-rad ndash velocitiesu-fps

bull A property can have read andor read-write access

bull There are native and created properties bull [Programmatically a property may be bound

to a program variable or a function ndash this is a concern mostly for developers]

Aircraft FDM catalog

bull Exports a lsquocatalogrsquo of JSBSim internal properties related to the selected aircraft (Cessna 172)

bull Properties are nothing but variablevalue pairs handled during simulations

bull Each property value is lsquoexposedrsquo to the user ie can be grabbed and used for specific purposes

User files

Vehicle configuration file

Vehicle configuration file

ltfdm_configgt ltfileheadergt hellip ltfileheadergt lt-- 0 or 1 instance --gt ltmetricsgt hellip ltmetricsgt lt-- 1 instance --gt ltmass_balancegt hellip ltmass_balancegt lt-- 1 instance --gt ltground_reactionsgt hellip ltground_reactionsgt lt-- 1 instance --gt ltexternal_reactionsgt hellip ltexternal_reactionsgt lt-- 0 or 1 instance --gt ltbuoyant_forcesgt hellip ltbuoyant_forcesgt lt-- 0 or 1 instance --gt ltpropulsiongt hellip ltpropulsiongt lt-- 0 or 1 instance --gt ltsystemgt hellip ltsystemgt lt-- 0 to n instances --gt ltautopilotgt hellip ltautopilotgt lt-- 0 or 1 instance --gt ltflight_controlgt hellip ltflight_controlgt lt-- 0 or 1 instance --gt ltaerodynamicsgt hellip ltaerodynamicsgt lt-- 1 instance --gt ltinputgt hellip ltinputgt lt-- 0 or 1 instance --gt ltoutputgt hellip ltoutputgt lt-- 0 to n instances --gt ltfdm_configgt

Vehicle configuration

Geometry Masses

Vehicle configuration Propulsion configuration files

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 15: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Files Needed by Users

bull Model files (vehicle engine systems aero etc)

bull Script files bull Data logging files bull Data plotting files bull Shell scripts for running monte carlo analyses

Tools Needed

bull Bash shell (cygwin or linux) bull Gnuplot bull Prep_plot

bull Optional (pick one)

ndash Microsoft Visual C++ 20102012 Express (free devel)

ndash Notepad++ (free userdevel) ndash Matlab (non-free users post-processing)

User Workflow

bull Setup scenario (edit model scripts etc) ndash Run simulation ndash Auto-generate plots (eg Matlab) ndash Analyze plots ndash Modify input conditions parameters ndash Rerun

bull When ready make runs for the record bull Plot data bull Archive CSV data with input files and run

information in zip file to reduce storage reqmts bull Present results

Analysis Computerized Model CM and Traceability

bull Must be able to recreate runs bull For any run must know

ndash Vehicle configuration ndash Dispersions ndash Environment setup ndash Other inputs and assumptions etc

bull Save all run data note executable version used and archive input data files wdata

Key Concepts in JSBSim

bull XML bull Properties bull Functions

What is XML

bull eXtensible Markup Language bull A way of encoding data bull Range of tools technology and code already

available ndash Schema ndash Transforms ndash Editors ndash Parsers (JSBSim uses the eXpat library)

bull See ndash W3 Schools (httpwwww3schoolscomxml) ndash XMLorg (httpwwwxmlorg)

XML Elements

Format ltelementgt content ltelementgt Example ltfunctiongt ltproductgt ltcosgt 0707 ltcosgt ltvaluegt aeroqbar-area ltvaluegt ltproductgt ltfunctiongt

XML Attributes

Format ltelement attribute=ldquovaluerdquogt content ltelementgt

Example ltixx dispersion=ldquo700rdquo type=ldquouniformrdquo unit=ldquoSLUGFT2rdquogt 140099 ltixxgt

Early JSBSim Data Specification ltCOEFFICIENT NAME=CLalpha TYPE=VECTORgt Lift_due_to_alpha 8 velocitiesmach-norm aeroqbar-psf | metricsSw-sqft | aeroalpha-rad 000 450 040 380 060 360 105 450 140 400 280 250 600 110 900 100 ltCOEFFICIENTgt

Current JSBSim Data Spec ltfunction name=aeroforceCLDfgt ltdescriptiongt Delta lift due to flap deflection ltdescriptiongt ltproductgt ltpgt aerofunctionground-effect-factor-lift ltpgt ltpgt aeroqbar-area ltpgt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 025 200 030 300 035 lttableDatagt lttablegt ltproductgt ltfunctiongt

Properties A Property is used like a Variable

bull Property names are defined in a hierarchical style ndash attitudephi-rad ndash velocitiesu-fps

bull A property can have read andor read-write access

bull There are native and created properties bull [Programmatically a property may be bound

to a program variable or a function ndash this is a concern mostly for developers]

Aircraft FDM catalog

bull Exports a lsquocatalogrsquo of JSBSim internal properties related to the selected aircraft (Cessna 172)

bull Properties are nothing but variablevalue pairs handled during simulations

bull Each property value is lsquoexposedrsquo to the user ie can be grabbed and used for specific purposes

User files

Vehicle configuration file

Vehicle configuration file

ltfdm_configgt ltfileheadergt hellip ltfileheadergt lt-- 0 or 1 instance --gt ltmetricsgt hellip ltmetricsgt lt-- 1 instance --gt ltmass_balancegt hellip ltmass_balancegt lt-- 1 instance --gt ltground_reactionsgt hellip ltground_reactionsgt lt-- 1 instance --gt ltexternal_reactionsgt hellip ltexternal_reactionsgt lt-- 0 or 1 instance --gt ltbuoyant_forcesgt hellip ltbuoyant_forcesgt lt-- 0 or 1 instance --gt ltpropulsiongt hellip ltpropulsiongt lt-- 0 or 1 instance --gt ltsystemgt hellip ltsystemgt lt-- 0 to n instances --gt ltautopilotgt hellip ltautopilotgt lt-- 0 or 1 instance --gt ltflight_controlgt hellip ltflight_controlgt lt-- 0 or 1 instance --gt ltaerodynamicsgt hellip ltaerodynamicsgt lt-- 1 instance --gt ltinputgt hellip ltinputgt lt-- 0 or 1 instance --gt ltoutputgt hellip ltoutputgt lt-- 0 to n instances --gt ltfdm_configgt

Vehicle configuration

Geometry Masses

Vehicle configuration Propulsion configuration files

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 16: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Tools Needed

bull Bash shell (cygwin or linux) bull Gnuplot bull Prep_plot

bull Optional (pick one)

ndash Microsoft Visual C++ 20102012 Express (free devel)

ndash Notepad++ (free userdevel) ndash Matlab (non-free users post-processing)

User Workflow

bull Setup scenario (edit model scripts etc) ndash Run simulation ndash Auto-generate plots (eg Matlab) ndash Analyze plots ndash Modify input conditions parameters ndash Rerun

bull When ready make runs for the record bull Plot data bull Archive CSV data with input files and run

information in zip file to reduce storage reqmts bull Present results

Analysis Computerized Model CM and Traceability

bull Must be able to recreate runs bull For any run must know

ndash Vehicle configuration ndash Dispersions ndash Environment setup ndash Other inputs and assumptions etc

bull Save all run data note executable version used and archive input data files wdata

Key Concepts in JSBSim

bull XML bull Properties bull Functions

What is XML

bull eXtensible Markup Language bull A way of encoding data bull Range of tools technology and code already

available ndash Schema ndash Transforms ndash Editors ndash Parsers (JSBSim uses the eXpat library)

bull See ndash W3 Schools (httpwwww3schoolscomxml) ndash XMLorg (httpwwwxmlorg)

XML Elements

Format ltelementgt content ltelementgt Example ltfunctiongt ltproductgt ltcosgt 0707 ltcosgt ltvaluegt aeroqbar-area ltvaluegt ltproductgt ltfunctiongt

XML Attributes

Format ltelement attribute=ldquovaluerdquogt content ltelementgt

Example ltixx dispersion=ldquo700rdquo type=ldquouniformrdquo unit=ldquoSLUGFT2rdquogt 140099 ltixxgt

Early JSBSim Data Specification ltCOEFFICIENT NAME=CLalpha TYPE=VECTORgt Lift_due_to_alpha 8 velocitiesmach-norm aeroqbar-psf | metricsSw-sqft | aeroalpha-rad 000 450 040 380 060 360 105 450 140 400 280 250 600 110 900 100 ltCOEFFICIENTgt

Current JSBSim Data Spec ltfunction name=aeroforceCLDfgt ltdescriptiongt Delta lift due to flap deflection ltdescriptiongt ltproductgt ltpgt aerofunctionground-effect-factor-lift ltpgt ltpgt aeroqbar-area ltpgt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 025 200 030 300 035 lttableDatagt lttablegt ltproductgt ltfunctiongt

Properties A Property is used like a Variable

bull Property names are defined in a hierarchical style ndash attitudephi-rad ndash velocitiesu-fps

bull A property can have read andor read-write access

bull There are native and created properties bull [Programmatically a property may be bound

to a program variable or a function ndash this is a concern mostly for developers]

Aircraft FDM catalog

bull Exports a lsquocatalogrsquo of JSBSim internal properties related to the selected aircraft (Cessna 172)

bull Properties are nothing but variablevalue pairs handled during simulations

bull Each property value is lsquoexposedrsquo to the user ie can be grabbed and used for specific purposes

User files

Vehicle configuration file

Vehicle configuration file

ltfdm_configgt ltfileheadergt hellip ltfileheadergt lt-- 0 or 1 instance --gt ltmetricsgt hellip ltmetricsgt lt-- 1 instance --gt ltmass_balancegt hellip ltmass_balancegt lt-- 1 instance --gt ltground_reactionsgt hellip ltground_reactionsgt lt-- 1 instance --gt ltexternal_reactionsgt hellip ltexternal_reactionsgt lt-- 0 or 1 instance --gt ltbuoyant_forcesgt hellip ltbuoyant_forcesgt lt-- 0 or 1 instance --gt ltpropulsiongt hellip ltpropulsiongt lt-- 0 or 1 instance --gt ltsystemgt hellip ltsystemgt lt-- 0 to n instances --gt ltautopilotgt hellip ltautopilotgt lt-- 0 or 1 instance --gt ltflight_controlgt hellip ltflight_controlgt lt-- 0 or 1 instance --gt ltaerodynamicsgt hellip ltaerodynamicsgt lt-- 1 instance --gt ltinputgt hellip ltinputgt lt-- 0 or 1 instance --gt ltoutputgt hellip ltoutputgt lt-- 0 to n instances --gt ltfdm_configgt

Vehicle configuration

Geometry Masses

Vehicle configuration Propulsion configuration files

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 17: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

User Workflow

bull Setup scenario (edit model scripts etc) ndash Run simulation ndash Auto-generate plots (eg Matlab) ndash Analyze plots ndash Modify input conditions parameters ndash Rerun

bull When ready make runs for the record bull Plot data bull Archive CSV data with input files and run

information in zip file to reduce storage reqmts bull Present results

Analysis Computerized Model CM and Traceability

bull Must be able to recreate runs bull For any run must know

ndash Vehicle configuration ndash Dispersions ndash Environment setup ndash Other inputs and assumptions etc

bull Save all run data note executable version used and archive input data files wdata

Key Concepts in JSBSim

bull XML bull Properties bull Functions

What is XML

bull eXtensible Markup Language bull A way of encoding data bull Range of tools technology and code already

available ndash Schema ndash Transforms ndash Editors ndash Parsers (JSBSim uses the eXpat library)

bull See ndash W3 Schools (httpwwww3schoolscomxml) ndash XMLorg (httpwwwxmlorg)

XML Elements

Format ltelementgt content ltelementgt Example ltfunctiongt ltproductgt ltcosgt 0707 ltcosgt ltvaluegt aeroqbar-area ltvaluegt ltproductgt ltfunctiongt

XML Attributes

Format ltelement attribute=ldquovaluerdquogt content ltelementgt

Example ltixx dispersion=ldquo700rdquo type=ldquouniformrdquo unit=ldquoSLUGFT2rdquogt 140099 ltixxgt

Early JSBSim Data Specification ltCOEFFICIENT NAME=CLalpha TYPE=VECTORgt Lift_due_to_alpha 8 velocitiesmach-norm aeroqbar-psf | metricsSw-sqft | aeroalpha-rad 000 450 040 380 060 360 105 450 140 400 280 250 600 110 900 100 ltCOEFFICIENTgt

Current JSBSim Data Spec ltfunction name=aeroforceCLDfgt ltdescriptiongt Delta lift due to flap deflection ltdescriptiongt ltproductgt ltpgt aerofunctionground-effect-factor-lift ltpgt ltpgt aeroqbar-area ltpgt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 025 200 030 300 035 lttableDatagt lttablegt ltproductgt ltfunctiongt

Properties A Property is used like a Variable

bull Property names are defined in a hierarchical style ndash attitudephi-rad ndash velocitiesu-fps

bull A property can have read andor read-write access

bull There are native and created properties bull [Programmatically a property may be bound

to a program variable or a function ndash this is a concern mostly for developers]

Aircraft FDM catalog

bull Exports a lsquocatalogrsquo of JSBSim internal properties related to the selected aircraft (Cessna 172)

bull Properties are nothing but variablevalue pairs handled during simulations

bull Each property value is lsquoexposedrsquo to the user ie can be grabbed and used for specific purposes

User files

Vehicle configuration file

Vehicle configuration file

ltfdm_configgt ltfileheadergt hellip ltfileheadergt lt-- 0 or 1 instance --gt ltmetricsgt hellip ltmetricsgt lt-- 1 instance --gt ltmass_balancegt hellip ltmass_balancegt lt-- 1 instance --gt ltground_reactionsgt hellip ltground_reactionsgt lt-- 1 instance --gt ltexternal_reactionsgt hellip ltexternal_reactionsgt lt-- 0 or 1 instance --gt ltbuoyant_forcesgt hellip ltbuoyant_forcesgt lt-- 0 or 1 instance --gt ltpropulsiongt hellip ltpropulsiongt lt-- 0 or 1 instance --gt ltsystemgt hellip ltsystemgt lt-- 0 to n instances --gt ltautopilotgt hellip ltautopilotgt lt-- 0 or 1 instance --gt ltflight_controlgt hellip ltflight_controlgt lt-- 0 or 1 instance --gt ltaerodynamicsgt hellip ltaerodynamicsgt lt-- 1 instance --gt ltinputgt hellip ltinputgt lt-- 0 or 1 instance --gt ltoutputgt hellip ltoutputgt lt-- 0 to n instances --gt ltfdm_configgt

Vehicle configuration

Geometry Masses

Vehicle configuration Propulsion configuration files

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 18: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Analysis Computerized Model CM and Traceability

bull Must be able to recreate runs bull For any run must know

ndash Vehicle configuration ndash Dispersions ndash Environment setup ndash Other inputs and assumptions etc

bull Save all run data note executable version used and archive input data files wdata

Key Concepts in JSBSim

bull XML bull Properties bull Functions

What is XML

bull eXtensible Markup Language bull A way of encoding data bull Range of tools technology and code already

available ndash Schema ndash Transforms ndash Editors ndash Parsers (JSBSim uses the eXpat library)

bull See ndash W3 Schools (httpwwww3schoolscomxml) ndash XMLorg (httpwwwxmlorg)

XML Elements

Format ltelementgt content ltelementgt Example ltfunctiongt ltproductgt ltcosgt 0707 ltcosgt ltvaluegt aeroqbar-area ltvaluegt ltproductgt ltfunctiongt

XML Attributes

Format ltelement attribute=ldquovaluerdquogt content ltelementgt

Example ltixx dispersion=ldquo700rdquo type=ldquouniformrdquo unit=ldquoSLUGFT2rdquogt 140099 ltixxgt

Early JSBSim Data Specification ltCOEFFICIENT NAME=CLalpha TYPE=VECTORgt Lift_due_to_alpha 8 velocitiesmach-norm aeroqbar-psf | metricsSw-sqft | aeroalpha-rad 000 450 040 380 060 360 105 450 140 400 280 250 600 110 900 100 ltCOEFFICIENTgt

Current JSBSim Data Spec ltfunction name=aeroforceCLDfgt ltdescriptiongt Delta lift due to flap deflection ltdescriptiongt ltproductgt ltpgt aerofunctionground-effect-factor-lift ltpgt ltpgt aeroqbar-area ltpgt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 025 200 030 300 035 lttableDatagt lttablegt ltproductgt ltfunctiongt

Properties A Property is used like a Variable

bull Property names are defined in a hierarchical style ndash attitudephi-rad ndash velocitiesu-fps

bull A property can have read andor read-write access

bull There are native and created properties bull [Programmatically a property may be bound

to a program variable or a function ndash this is a concern mostly for developers]

Aircraft FDM catalog

bull Exports a lsquocatalogrsquo of JSBSim internal properties related to the selected aircraft (Cessna 172)

bull Properties are nothing but variablevalue pairs handled during simulations

bull Each property value is lsquoexposedrsquo to the user ie can be grabbed and used for specific purposes

User files

Vehicle configuration file

Vehicle configuration file

ltfdm_configgt ltfileheadergt hellip ltfileheadergt lt-- 0 or 1 instance --gt ltmetricsgt hellip ltmetricsgt lt-- 1 instance --gt ltmass_balancegt hellip ltmass_balancegt lt-- 1 instance --gt ltground_reactionsgt hellip ltground_reactionsgt lt-- 1 instance --gt ltexternal_reactionsgt hellip ltexternal_reactionsgt lt-- 0 or 1 instance --gt ltbuoyant_forcesgt hellip ltbuoyant_forcesgt lt-- 0 or 1 instance --gt ltpropulsiongt hellip ltpropulsiongt lt-- 0 or 1 instance --gt ltsystemgt hellip ltsystemgt lt-- 0 to n instances --gt ltautopilotgt hellip ltautopilotgt lt-- 0 or 1 instance --gt ltflight_controlgt hellip ltflight_controlgt lt-- 0 or 1 instance --gt ltaerodynamicsgt hellip ltaerodynamicsgt lt-- 1 instance --gt ltinputgt hellip ltinputgt lt-- 0 or 1 instance --gt ltoutputgt hellip ltoutputgt lt-- 0 to n instances --gt ltfdm_configgt

Vehicle configuration

Geometry Masses

Vehicle configuration Propulsion configuration files

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 19: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Key Concepts in JSBSim

bull XML bull Properties bull Functions

What is XML

bull eXtensible Markup Language bull A way of encoding data bull Range of tools technology and code already

available ndash Schema ndash Transforms ndash Editors ndash Parsers (JSBSim uses the eXpat library)

bull See ndash W3 Schools (httpwwww3schoolscomxml) ndash XMLorg (httpwwwxmlorg)

XML Elements

Format ltelementgt content ltelementgt Example ltfunctiongt ltproductgt ltcosgt 0707 ltcosgt ltvaluegt aeroqbar-area ltvaluegt ltproductgt ltfunctiongt

XML Attributes

Format ltelement attribute=ldquovaluerdquogt content ltelementgt

Example ltixx dispersion=ldquo700rdquo type=ldquouniformrdquo unit=ldquoSLUGFT2rdquogt 140099 ltixxgt

Early JSBSim Data Specification ltCOEFFICIENT NAME=CLalpha TYPE=VECTORgt Lift_due_to_alpha 8 velocitiesmach-norm aeroqbar-psf | metricsSw-sqft | aeroalpha-rad 000 450 040 380 060 360 105 450 140 400 280 250 600 110 900 100 ltCOEFFICIENTgt

Current JSBSim Data Spec ltfunction name=aeroforceCLDfgt ltdescriptiongt Delta lift due to flap deflection ltdescriptiongt ltproductgt ltpgt aerofunctionground-effect-factor-lift ltpgt ltpgt aeroqbar-area ltpgt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 025 200 030 300 035 lttableDatagt lttablegt ltproductgt ltfunctiongt

Properties A Property is used like a Variable

bull Property names are defined in a hierarchical style ndash attitudephi-rad ndash velocitiesu-fps

bull A property can have read andor read-write access

bull There are native and created properties bull [Programmatically a property may be bound

to a program variable or a function ndash this is a concern mostly for developers]

Aircraft FDM catalog

bull Exports a lsquocatalogrsquo of JSBSim internal properties related to the selected aircraft (Cessna 172)

bull Properties are nothing but variablevalue pairs handled during simulations

bull Each property value is lsquoexposedrsquo to the user ie can be grabbed and used for specific purposes

User files

Vehicle configuration file

Vehicle configuration file

ltfdm_configgt ltfileheadergt hellip ltfileheadergt lt-- 0 or 1 instance --gt ltmetricsgt hellip ltmetricsgt lt-- 1 instance --gt ltmass_balancegt hellip ltmass_balancegt lt-- 1 instance --gt ltground_reactionsgt hellip ltground_reactionsgt lt-- 1 instance --gt ltexternal_reactionsgt hellip ltexternal_reactionsgt lt-- 0 or 1 instance --gt ltbuoyant_forcesgt hellip ltbuoyant_forcesgt lt-- 0 or 1 instance --gt ltpropulsiongt hellip ltpropulsiongt lt-- 0 or 1 instance --gt ltsystemgt hellip ltsystemgt lt-- 0 to n instances --gt ltautopilotgt hellip ltautopilotgt lt-- 0 or 1 instance --gt ltflight_controlgt hellip ltflight_controlgt lt-- 0 or 1 instance --gt ltaerodynamicsgt hellip ltaerodynamicsgt lt-- 1 instance --gt ltinputgt hellip ltinputgt lt-- 0 or 1 instance --gt ltoutputgt hellip ltoutputgt lt-- 0 to n instances --gt ltfdm_configgt

Vehicle configuration

Geometry Masses

Vehicle configuration Propulsion configuration files

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 20: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

What is XML

bull eXtensible Markup Language bull A way of encoding data bull Range of tools technology and code already

available ndash Schema ndash Transforms ndash Editors ndash Parsers (JSBSim uses the eXpat library)

bull See ndash W3 Schools (httpwwww3schoolscomxml) ndash XMLorg (httpwwwxmlorg)

XML Elements

Format ltelementgt content ltelementgt Example ltfunctiongt ltproductgt ltcosgt 0707 ltcosgt ltvaluegt aeroqbar-area ltvaluegt ltproductgt ltfunctiongt

XML Attributes

Format ltelement attribute=ldquovaluerdquogt content ltelementgt

Example ltixx dispersion=ldquo700rdquo type=ldquouniformrdquo unit=ldquoSLUGFT2rdquogt 140099 ltixxgt

Early JSBSim Data Specification ltCOEFFICIENT NAME=CLalpha TYPE=VECTORgt Lift_due_to_alpha 8 velocitiesmach-norm aeroqbar-psf | metricsSw-sqft | aeroalpha-rad 000 450 040 380 060 360 105 450 140 400 280 250 600 110 900 100 ltCOEFFICIENTgt

Current JSBSim Data Spec ltfunction name=aeroforceCLDfgt ltdescriptiongt Delta lift due to flap deflection ltdescriptiongt ltproductgt ltpgt aerofunctionground-effect-factor-lift ltpgt ltpgt aeroqbar-area ltpgt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 025 200 030 300 035 lttableDatagt lttablegt ltproductgt ltfunctiongt

Properties A Property is used like a Variable

bull Property names are defined in a hierarchical style ndash attitudephi-rad ndash velocitiesu-fps

bull A property can have read andor read-write access

bull There are native and created properties bull [Programmatically a property may be bound

to a program variable or a function ndash this is a concern mostly for developers]

Aircraft FDM catalog

bull Exports a lsquocatalogrsquo of JSBSim internal properties related to the selected aircraft (Cessna 172)

bull Properties are nothing but variablevalue pairs handled during simulations

bull Each property value is lsquoexposedrsquo to the user ie can be grabbed and used for specific purposes

User files

Vehicle configuration file

Vehicle configuration file

ltfdm_configgt ltfileheadergt hellip ltfileheadergt lt-- 0 or 1 instance --gt ltmetricsgt hellip ltmetricsgt lt-- 1 instance --gt ltmass_balancegt hellip ltmass_balancegt lt-- 1 instance --gt ltground_reactionsgt hellip ltground_reactionsgt lt-- 1 instance --gt ltexternal_reactionsgt hellip ltexternal_reactionsgt lt-- 0 or 1 instance --gt ltbuoyant_forcesgt hellip ltbuoyant_forcesgt lt-- 0 or 1 instance --gt ltpropulsiongt hellip ltpropulsiongt lt-- 0 or 1 instance --gt ltsystemgt hellip ltsystemgt lt-- 0 to n instances --gt ltautopilotgt hellip ltautopilotgt lt-- 0 or 1 instance --gt ltflight_controlgt hellip ltflight_controlgt lt-- 0 or 1 instance --gt ltaerodynamicsgt hellip ltaerodynamicsgt lt-- 1 instance --gt ltinputgt hellip ltinputgt lt-- 0 or 1 instance --gt ltoutputgt hellip ltoutputgt lt-- 0 to n instances --gt ltfdm_configgt

Vehicle configuration

Geometry Masses

Vehicle configuration Propulsion configuration files

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 21: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

XML Elements

Format ltelementgt content ltelementgt Example ltfunctiongt ltproductgt ltcosgt 0707 ltcosgt ltvaluegt aeroqbar-area ltvaluegt ltproductgt ltfunctiongt

XML Attributes

Format ltelement attribute=ldquovaluerdquogt content ltelementgt

Example ltixx dispersion=ldquo700rdquo type=ldquouniformrdquo unit=ldquoSLUGFT2rdquogt 140099 ltixxgt

Early JSBSim Data Specification ltCOEFFICIENT NAME=CLalpha TYPE=VECTORgt Lift_due_to_alpha 8 velocitiesmach-norm aeroqbar-psf | metricsSw-sqft | aeroalpha-rad 000 450 040 380 060 360 105 450 140 400 280 250 600 110 900 100 ltCOEFFICIENTgt

Current JSBSim Data Spec ltfunction name=aeroforceCLDfgt ltdescriptiongt Delta lift due to flap deflection ltdescriptiongt ltproductgt ltpgt aerofunctionground-effect-factor-lift ltpgt ltpgt aeroqbar-area ltpgt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 025 200 030 300 035 lttableDatagt lttablegt ltproductgt ltfunctiongt

Properties A Property is used like a Variable

bull Property names are defined in a hierarchical style ndash attitudephi-rad ndash velocitiesu-fps

bull A property can have read andor read-write access

bull There are native and created properties bull [Programmatically a property may be bound

to a program variable or a function ndash this is a concern mostly for developers]

Aircraft FDM catalog

bull Exports a lsquocatalogrsquo of JSBSim internal properties related to the selected aircraft (Cessna 172)

bull Properties are nothing but variablevalue pairs handled during simulations

bull Each property value is lsquoexposedrsquo to the user ie can be grabbed and used for specific purposes

User files

Vehicle configuration file

Vehicle configuration file

ltfdm_configgt ltfileheadergt hellip ltfileheadergt lt-- 0 or 1 instance --gt ltmetricsgt hellip ltmetricsgt lt-- 1 instance --gt ltmass_balancegt hellip ltmass_balancegt lt-- 1 instance --gt ltground_reactionsgt hellip ltground_reactionsgt lt-- 1 instance --gt ltexternal_reactionsgt hellip ltexternal_reactionsgt lt-- 0 or 1 instance --gt ltbuoyant_forcesgt hellip ltbuoyant_forcesgt lt-- 0 or 1 instance --gt ltpropulsiongt hellip ltpropulsiongt lt-- 0 or 1 instance --gt ltsystemgt hellip ltsystemgt lt-- 0 to n instances --gt ltautopilotgt hellip ltautopilotgt lt-- 0 or 1 instance --gt ltflight_controlgt hellip ltflight_controlgt lt-- 0 or 1 instance --gt ltaerodynamicsgt hellip ltaerodynamicsgt lt-- 1 instance --gt ltinputgt hellip ltinputgt lt-- 0 or 1 instance --gt ltoutputgt hellip ltoutputgt lt-- 0 to n instances --gt ltfdm_configgt

Vehicle configuration

Geometry Masses

Vehicle configuration Propulsion configuration files

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 22: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

XML Attributes

Format ltelement attribute=ldquovaluerdquogt content ltelementgt

Example ltixx dispersion=ldquo700rdquo type=ldquouniformrdquo unit=ldquoSLUGFT2rdquogt 140099 ltixxgt

Early JSBSim Data Specification ltCOEFFICIENT NAME=CLalpha TYPE=VECTORgt Lift_due_to_alpha 8 velocitiesmach-norm aeroqbar-psf | metricsSw-sqft | aeroalpha-rad 000 450 040 380 060 360 105 450 140 400 280 250 600 110 900 100 ltCOEFFICIENTgt

Current JSBSim Data Spec ltfunction name=aeroforceCLDfgt ltdescriptiongt Delta lift due to flap deflection ltdescriptiongt ltproductgt ltpgt aerofunctionground-effect-factor-lift ltpgt ltpgt aeroqbar-area ltpgt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 025 200 030 300 035 lttableDatagt lttablegt ltproductgt ltfunctiongt

Properties A Property is used like a Variable

bull Property names are defined in a hierarchical style ndash attitudephi-rad ndash velocitiesu-fps

bull A property can have read andor read-write access

bull There are native and created properties bull [Programmatically a property may be bound

to a program variable or a function ndash this is a concern mostly for developers]

Aircraft FDM catalog

bull Exports a lsquocatalogrsquo of JSBSim internal properties related to the selected aircraft (Cessna 172)

bull Properties are nothing but variablevalue pairs handled during simulations

bull Each property value is lsquoexposedrsquo to the user ie can be grabbed and used for specific purposes

User files

Vehicle configuration file

Vehicle configuration file

ltfdm_configgt ltfileheadergt hellip ltfileheadergt lt-- 0 or 1 instance --gt ltmetricsgt hellip ltmetricsgt lt-- 1 instance --gt ltmass_balancegt hellip ltmass_balancegt lt-- 1 instance --gt ltground_reactionsgt hellip ltground_reactionsgt lt-- 1 instance --gt ltexternal_reactionsgt hellip ltexternal_reactionsgt lt-- 0 or 1 instance --gt ltbuoyant_forcesgt hellip ltbuoyant_forcesgt lt-- 0 or 1 instance --gt ltpropulsiongt hellip ltpropulsiongt lt-- 0 or 1 instance --gt ltsystemgt hellip ltsystemgt lt-- 0 to n instances --gt ltautopilotgt hellip ltautopilotgt lt-- 0 or 1 instance --gt ltflight_controlgt hellip ltflight_controlgt lt-- 0 or 1 instance --gt ltaerodynamicsgt hellip ltaerodynamicsgt lt-- 1 instance --gt ltinputgt hellip ltinputgt lt-- 0 or 1 instance --gt ltoutputgt hellip ltoutputgt lt-- 0 to n instances --gt ltfdm_configgt

Vehicle configuration

Geometry Masses

Vehicle configuration Propulsion configuration files

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 23: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Early JSBSim Data Specification ltCOEFFICIENT NAME=CLalpha TYPE=VECTORgt Lift_due_to_alpha 8 velocitiesmach-norm aeroqbar-psf | metricsSw-sqft | aeroalpha-rad 000 450 040 380 060 360 105 450 140 400 280 250 600 110 900 100 ltCOEFFICIENTgt

Current JSBSim Data Spec ltfunction name=aeroforceCLDfgt ltdescriptiongt Delta lift due to flap deflection ltdescriptiongt ltproductgt ltpgt aerofunctionground-effect-factor-lift ltpgt ltpgt aeroqbar-area ltpgt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 025 200 030 300 035 lttableDatagt lttablegt ltproductgt ltfunctiongt

Properties A Property is used like a Variable

bull Property names are defined in a hierarchical style ndash attitudephi-rad ndash velocitiesu-fps

bull A property can have read andor read-write access

bull There are native and created properties bull [Programmatically a property may be bound

to a program variable or a function ndash this is a concern mostly for developers]

Aircraft FDM catalog

bull Exports a lsquocatalogrsquo of JSBSim internal properties related to the selected aircraft (Cessna 172)

bull Properties are nothing but variablevalue pairs handled during simulations

bull Each property value is lsquoexposedrsquo to the user ie can be grabbed and used for specific purposes

User files

Vehicle configuration file

Vehicle configuration file

ltfdm_configgt ltfileheadergt hellip ltfileheadergt lt-- 0 or 1 instance --gt ltmetricsgt hellip ltmetricsgt lt-- 1 instance --gt ltmass_balancegt hellip ltmass_balancegt lt-- 1 instance --gt ltground_reactionsgt hellip ltground_reactionsgt lt-- 1 instance --gt ltexternal_reactionsgt hellip ltexternal_reactionsgt lt-- 0 or 1 instance --gt ltbuoyant_forcesgt hellip ltbuoyant_forcesgt lt-- 0 or 1 instance --gt ltpropulsiongt hellip ltpropulsiongt lt-- 0 or 1 instance --gt ltsystemgt hellip ltsystemgt lt-- 0 to n instances --gt ltautopilotgt hellip ltautopilotgt lt-- 0 or 1 instance --gt ltflight_controlgt hellip ltflight_controlgt lt-- 0 or 1 instance --gt ltaerodynamicsgt hellip ltaerodynamicsgt lt-- 1 instance --gt ltinputgt hellip ltinputgt lt-- 0 or 1 instance --gt ltoutputgt hellip ltoutputgt lt-- 0 to n instances --gt ltfdm_configgt

Vehicle configuration

Geometry Masses

Vehicle configuration Propulsion configuration files

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 24: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Current JSBSim Data Spec ltfunction name=aeroforceCLDfgt ltdescriptiongt Delta lift due to flap deflection ltdescriptiongt ltproductgt ltpgt aerofunctionground-effect-factor-lift ltpgt ltpgt aeroqbar-area ltpgt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 025 200 030 300 035 lttableDatagt lttablegt ltproductgt ltfunctiongt

Properties A Property is used like a Variable

bull Property names are defined in a hierarchical style ndash attitudephi-rad ndash velocitiesu-fps

bull A property can have read andor read-write access

bull There are native and created properties bull [Programmatically a property may be bound

to a program variable or a function ndash this is a concern mostly for developers]

Aircraft FDM catalog

bull Exports a lsquocatalogrsquo of JSBSim internal properties related to the selected aircraft (Cessna 172)

bull Properties are nothing but variablevalue pairs handled during simulations

bull Each property value is lsquoexposedrsquo to the user ie can be grabbed and used for specific purposes

User files

Vehicle configuration file

Vehicle configuration file

ltfdm_configgt ltfileheadergt hellip ltfileheadergt lt-- 0 or 1 instance --gt ltmetricsgt hellip ltmetricsgt lt-- 1 instance --gt ltmass_balancegt hellip ltmass_balancegt lt-- 1 instance --gt ltground_reactionsgt hellip ltground_reactionsgt lt-- 1 instance --gt ltexternal_reactionsgt hellip ltexternal_reactionsgt lt-- 0 or 1 instance --gt ltbuoyant_forcesgt hellip ltbuoyant_forcesgt lt-- 0 or 1 instance --gt ltpropulsiongt hellip ltpropulsiongt lt-- 0 or 1 instance --gt ltsystemgt hellip ltsystemgt lt-- 0 to n instances --gt ltautopilotgt hellip ltautopilotgt lt-- 0 or 1 instance --gt ltflight_controlgt hellip ltflight_controlgt lt-- 0 or 1 instance --gt ltaerodynamicsgt hellip ltaerodynamicsgt lt-- 1 instance --gt ltinputgt hellip ltinputgt lt-- 0 or 1 instance --gt ltoutputgt hellip ltoutputgt lt-- 0 to n instances --gt ltfdm_configgt

Vehicle configuration

Geometry Masses

Vehicle configuration Propulsion configuration files

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 25: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Properties A Property is used like a Variable

bull Property names are defined in a hierarchical style ndash attitudephi-rad ndash velocitiesu-fps

bull A property can have read andor read-write access

bull There are native and created properties bull [Programmatically a property may be bound

to a program variable or a function ndash this is a concern mostly for developers]

Aircraft FDM catalog

bull Exports a lsquocatalogrsquo of JSBSim internal properties related to the selected aircraft (Cessna 172)

bull Properties are nothing but variablevalue pairs handled during simulations

bull Each property value is lsquoexposedrsquo to the user ie can be grabbed and used for specific purposes

User files

Vehicle configuration file

Vehicle configuration file

ltfdm_configgt ltfileheadergt hellip ltfileheadergt lt-- 0 or 1 instance --gt ltmetricsgt hellip ltmetricsgt lt-- 1 instance --gt ltmass_balancegt hellip ltmass_balancegt lt-- 1 instance --gt ltground_reactionsgt hellip ltground_reactionsgt lt-- 1 instance --gt ltexternal_reactionsgt hellip ltexternal_reactionsgt lt-- 0 or 1 instance --gt ltbuoyant_forcesgt hellip ltbuoyant_forcesgt lt-- 0 or 1 instance --gt ltpropulsiongt hellip ltpropulsiongt lt-- 0 or 1 instance --gt ltsystemgt hellip ltsystemgt lt-- 0 to n instances --gt ltautopilotgt hellip ltautopilotgt lt-- 0 or 1 instance --gt ltflight_controlgt hellip ltflight_controlgt lt-- 0 or 1 instance --gt ltaerodynamicsgt hellip ltaerodynamicsgt lt-- 1 instance --gt ltinputgt hellip ltinputgt lt-- 0 or 1 instance --gt ltoutputgt hellip ltoutputgt lt-- 0 to n instances --gt ltfdm_configgt

Vehicle configuration

Geometry Masses

Vehicle configuration Propulsion configuration files

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 26: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Aircraft FDM catalog

bull Exports a lsquocatalogrsquo of JSBSim internal properties related to the selected aircraft (Cessna 172)

bull Properties are nothing but variablevalue pairs handled during simulations

bull Each property value is lsquoexposedrsquo to the user ie can be grabbed and used for specific purposes

User files

Vehicle configuration file

Vehicle configuration file

ltfdm_configgt ltfileheadergt hellip ltfileheadergt lt-- 0 or 1 instance --gt ltmetricsgt hellip ltmetricsgt lt-- 1 instance --gt ltmass_balancegt hellip ltmass_balancegt lt-- 1 instance --gt ltground_reactionsgt hellip ltground_reactionsgt lt-- 1 instance --gt ltexternal_reactionsgt hellip ltexternal_reactionsgt lt-- 0 or 1 instance --gt ltbuoyant_forcesgt hellip ltbuoyant_forcesgt lt-- 0 or 1 instance --gt ltpropulsiongt hellip ltpropulsiongt lt-- 0 or 1 instance --gt ltsystemgt hellip ltsystemgt lt-- 0 to n instances --gt ltautopilotgt hellip ltautopilotgt lt-- 0 or 1 instance --gt ltflight_controlgt hellip ltflight_controlgt lt-- 0 or 1 instance --gt ltaerodynamicsgt hellip ltaerodynamicsgt lt-- 1 instance --gt ltinputgt hellip ltinputgt lt-- 0 or 1 instance --gt ltoutputgt hellip ltoutputgt lt-- 0 to n instances --gt ltfdm_configgt

Vehicle configuration

Geometry Masses

Vehicle configuration Propulsion configuration files

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 27: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

User files

Vehicle configuration file

Vehicle configuration file

ltfdm_configgt ltfileheadergt hellip ltfileheadergt lt-- 0 or 1 instance --gt ltmetricsgt hellip ltmetricsgt lt-- 1 instance --gt ltmass_balancegt hellip ltmass_balancegt lt-- 1 instance --gt ltground_reactionsgt hellip ltground_reactionsgt lt-- 1 instance --gt ltexternal_reactionsgt hellip ltexternal_reactionsgt lt-- 0 or 1 instance --gt ltbuoyant_forcesgt hellip ltbuoyant_forcesgt lt-- 0 or 1 instance --gt ltpropulsiongt hellip ltpropulsiongt lt-- 0 or 1 instance --gt ltsystemgt hellip ltsystemgt lt-- 0 to n instances --gt ltautopilotgt hellip ltautopilotgt lt-- 0 or 1 instance --gt ltflight_controlgt hellip ltflight_controlgt lt-- 0 or 1 instance --gt ltaerodynamicsgt hellip ltaerodynamicsgt lt-- 1 instance --gt ltinputgt hellip ltinputgt lt-- 0 or 1 instance --gt ltoutputgt hellip ltoutputgt lt-- 0 to n instances --gt ltfdm_configgt

Vehicle configuration

Geometry Masses

Vehicle configuration Propulsion configuration files

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 28: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Vehicle configuration file

ltfdm_configgt ltfileheadergt hellip ltfileheadergt lt-- 0 or 1 instance --gt ltmetricsgt hellip ltmetricsgt lt-- 1 instance --gt ltmass_balancegt hellip ltmass_balancegt lt-- 1 instance --gt ltground_reactionsgt hellip ltground_reactionsgt lt-- 1 instance --gt ltexternal_reactionsgt hellip ltexternal_reactionsgt lt-- 0 or 1 instance --gt ltbuoyant_forcesgt hellip ltbuoyant_forcesgt lt-- 0 or 1 instance --gt ltpropulsiongt hellip ltpropulsiongt lt-- 0 or 1 instance --gt ltsystemgt hellip ltsystemgt lt-- 0 to n instances --gt ltautopilotgt hellip ltautopilotgt lt-- 0 or 1 instance --gt ltflight_controlgt hellip ltflight_controlgt lt-- 0 or 1 instance --gt ltaerodynamicsgt hellip ltaerodynamicsgt lt-- 1 instance --gt ltinputgt hellip ltinputgt lt-- 0 or 1 instance --gt ltoutputgt hellip ltoutputgt lt-- 0 to n instances --gt ltfdm_configgt

Vehicle configuration

Geometry Masses

Vehicle configuration Propulsion configuration files

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 29: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Vehicle configuration

Geometry Masses

Vehicle configuration Propulsion configuration files

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 30: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Vehicle configuration Propulsion configuration files

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 31: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Vehicle configuration bull Fuel tanks bull Thrusters bull Flight Control System

(FCS)

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 32: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Vehicle configuration FCS

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 33: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Vehicle configuration

Landing gears and terrain contact

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 34: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Sim configuration

Initialization file

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 35: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Sim configuration JSBSim Script file

Example of scripted trim

(default simple algorithm)

AC model and initialization file selection

Initial final time integration interval

Event scheduling

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 36: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Functions Arbitrary functions can be defined in XML Functions are used to bull Define aerodynamics forces and moments bull Define specific control system algorithms bull Set property values in scripted events Functions support most routines available in the C language standard library (eg cos sin tan exp pow mod etc)

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 37: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Example Lift build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo AoA rate

ldquoDue tordquo pitch rate

Baseline function

ldquoDue tordquo hellip

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 38: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Example Pitching Mom build-up ldquoDue tordquo flap deflection

ldquoDue tordquo elevator deflection ldquoDue tordquo pitch rate

ldquoDue tordquo AoA rate

Baseline function

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 39: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 40: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 41: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 42: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 43: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

ltfunction name=aeromomentDfgt ltdescriptiongt Pitch moment due to flap deflection ltdescriptiongt ltproductgt ltpropertygt aeroqbar-area ltpropertygt ltpropertygt metricscbarw-ft ltpropertygt lttablegt ltindependentVargt fcsflap-pos-deg ltindependentVargt lttableDatagt 00 00 100 -00654 200 -00981 300 -01140 lttableDatagt lttablegt ltproductgt ltfunctiongt

Represents Mδf = qbar bull Sw bull cbar bull Cmδf

XML Function Example Aero

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 44: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

XML System Function Example ltfcs_function name=guidanceangle-to-roll-radldquogt ltfunctiongt ltacosgt ltsumgt ltproductgt ltpgt guidancex1a ltpgt ltpgt guidancex2a ltpgt ltproductgt ltproductgt ltpgt guidancey1a ltpgt ltpgt guidancey2a ltpgt ltproductgt ltsumgt ltacosgt ltfunctiongt ltfcs_functiongt

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 45: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

XML Script Function ltevent name=Patrick Atmosphere Temperature and Pressure continuous=tru ltdescriptiongt Implements a Patrick atmosphere by overriding temp and p ltconditiongt simulationsim-time-sec ge 00 ltconditiongt ltset name=atmosphereoverridetemperaturegt ltfunction name=atmosphereoverridetemperature-functiongt ltsumgt lttable name=atmosphereoverridetemperature-meangt ltindependentVar lookup=rowgt positionh-agl-ft ltindependentVa ltindependentVar lookup=columngt simulationmonth ltindependent lttableDatagt lt-- This data is from the Patrick AFB Range Reference At lt-- Annual January February March Apri 0 1 2 3 4 00 529128 518220 517824 522468 5277 98 528480 517788 517446 522090 5276 65620 511776 505674 504846 507528 5107 hellip hellip hellip hellip hellip hellip 2296700 394794 397080 398826 399474 392 lttableDatagt lttablegt

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 46: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Flight Control System Components in JSBSim

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 47: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

ltsensor name=fcsattitudesensorphi-radgt ltinputgt attitudephi-rad ltinputgt ltlaggt 05 ltlaggt ltnoise variation=PERCENTgt 005 ltnoisegt ltquantization name=attitudesensorquantizedphi-radgt ltbitsgt 12 ltbitsgt ltmingt -314 ltmingt lt-- -180 degrees --gt ltmaxgt 314 ltmaxgt lt-- +180 degrees --gt ltquantizationgt ltbiasgt 0001 ltbiasgt ltsensorgt

ltpid name=fcsroll-ap-error-pidgt ltinputgt fcsattitudesensorphi-rad ltinputgt ltkpgt 20 ltkpgt ltkigt 02ltkigt ltkdgt 1 ltkdgt ltpidgt

Flight Control System Components in JSBSim

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 48: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Complex Functions ltfcs_function name=ldquoguidanceheading-to-waypointrdquogt ltfunctiongt ltatan2gt lt-- atan2 (deltaY deltaX )--gt ltproductgt ltsingtltpropertygt fcsdelta-lon-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltproductgt ltcosgtltpropertygt positionlat-gc-rad ltpropertygtltcosgt ltsingtltpropertygt apwp_latitude_rad ltpropertygtltsingt ltproductgt ltproductgt ltsingtltpropertygt positionlat-gc-rad ltpropertygtltsingt ltcosgtltpropertygt apwp_latitude_rad ltpropertygtltcosgt ltcosgtltpropertygt fcsdelta-lon-rad ltpropertygtltcosgt ltproductgt ltdifferencegt ltatan2gt ltfunctiongt ltfcs_functiongt

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 49: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Output JSBSim has a versatile data logging system bullAny number of ldquooutputrdquo sections can be specified in

the configuration file but it is preferred to create individual output directive files

bull Logical data sets can be output andor individual parameters

bullOutput can be sent to one or many (in any combination)

bull Socket (local or remote) bull File bull Console

bullNormally file is sent to a CSV data file

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 50: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Output Example ltoutput name=DCcsv type=CSV rate=30gt ltmasspropsgt OFF ltmasspropsgt ltratesgt ON ltratesgt ltvelocitiesgt ON ltvelocitiesgt ltforcesgt ON ltforcesgt ltmomentsgt ON ltmomentsgt ltpositiongt ON ltpositiongt ltpropulsiongt ON ltpropulsiongt ltaerosurfacesgt OFF ltaerosurfacesgt ltaerodynamicsgt OFF ltaerodynamicsgt ltfcsgt ON ltfcsgt ltground_reactionsgt OFF ltground_reactionsgt ltatmospheregt OFF ltatmospheregt ltpropertygt velocitiesve-kts ltpropertygt ltpropertygt velocitiesmach ltpropertygt ltpropertygt flight-pathgamma-deg ltpropertygt hellip ltoutput

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 51: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Gravity Model JSBSim can use either a classical gravity model (proportional to 1r2) or the model used with the WGS-84 datum the Earth Gravitation Model of 1996 (EGM96 ndash the default) For the Dream Chaser ascent abort simulation runs we use the latter The implementation does not use the full set of 130676 coefficients but only the first coefficient which is two orders of magnitude larger than the next coefficient The gravity model is selected via the following property usually set in a script (0 = standard 1 = EGM96) simulationgravity-model [Reference Aircraft Control and Simulation Stevens and Lewis]

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 52: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Atmosphere Model The atmosphere model that is standard in JSBSim is the 1976 standard atmosphere as defined in ldquoUS Standard Atmosphere 1976 NASA TM-X-74335 We currently use the Patrick AFB Range Reference atmosphere for ascent abort runs This is satisfactory for aborts taking place entirely within a short range around the Florida launch site For more geographically expansive aborts (Charleston TAL etc) we plan to use the GRAM 2007 atmosphere model GRAM is the ldquogold standardrdquo atmosphere model and is a product of NASA Marshall Spaceflight Center

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 53: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Example Tecnam P2006T CS-23FAR-23 Certified Cockpit

Baggage compartme

nt

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 54: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Example Tecnam P2006T

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 55: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Pull manouever

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 56: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

More elaborated command hystory

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions
Page 57: Agostino De Marco 7 April 2014 - unina.itwpage.unina.it/agodemar/DSV-DQV/JSBSim... · Aircraft FDM catalog • Exports a ‘catalog’ of JSBSim internal properties related to the

Conclusions An easy-to-use open source software

Capability to model basic intermediate or advanced vehicles

No need to use commercial software

Interface with FlightGear

JSBSim wwwjsbsimorg

  • JSBSimAn Open Source Flight Dynamics Model (FDM)
  • What is JSBSim
  • What is JSBSim
  • Goals of JSBSim
  • JSBSim most notable uses
  • A team of main developers and a large base of users
  • JSBSim users in the world
  • Who is a JSBSim Developer
  • Who is a JSBSim User
  • JSBSim lsquorunning modesrsquo
  • JSBSim in batch mode
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • JSBSim Directory Tree
  • Files Needed by Users
  • Tools Needed
  • User Workflow
  • Analysis Computerized Model CM and Traceability
  • Key Concepts in JSBSim
  • What is XML
  • XML Elements
  • XML Attributes
  • Early JSBSim Data Specification
  • Current JSBSim Data Spec
  • Properties
  • Aircraft FDM catalog
  • User files
  • Vehicle configuration file
  • Vehicle configuration
  • Vehicle configuration
  • Slide Number 31
  • Vehicle configuration
  • Slide Number 33
  • Sim configuration
  • Sim configuration
  • Functions
  • Example Lift build-up
  • Example Pitching Mom build-up
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML Function Example Aero
  • XML System Function Example
  • XML Script Function
  • Flight Control System Components in JSBSim
  • Flight Control System Components in JSBSim
  • Complex Functions
  • Output
  • Output Example
  • Gravity Model
  • Atmosphere Model
  • Example Tecnam P2006T
  • Example Tecnam P2006T
  • Pull manouever
  • More elaborated command hystory
  • Conclusions

Recommended