YSFlight uses simplified physics based on real-world principles. Through analysis of in-game performance and the YSFlight Source Code released on GitHub, the equations used to calculate properties and performance parameters are presented here.
The atmosphere in YSFlight roughly follows the standard day atmospheric model, but with some simplifications.
Air Density[]
YSFlight's air density is a function of altitude and uses linear interpolation between 0m and 20000m using the table below.
Altitude (m)
Density (kg/m^3)
0
1.224991
4000
0.819122
8000
0.529999
12000
0.299988
16000
0.153000
20000
0.084991
Speed of Sound[]
The speed of sound in YSFlight varies with altitude and uses linear interpolation for altitudes between 0 and 12000m using the table below.
Altitude (m)
Speed of Sound (m/s)
0
340.294
4000
324.579
8000
308.063
12000
295.069
The Mach number of an aircraft can be calculated via this equation:
Where:
is the aircraft's velocity in meters per second
is the local speed of sound in meters per second
Indicated Air Speed[]
Indicated airspeed is calculated by the following:
Where:
is the true air speed of the aircraft
is the indicated air speed of the aircraft
is the air density at the altitude of the aircraft.
Gravity[]
The YSFlight gravity is a constant for all altitudes:
Units[]
YSFlight accepts several different units for various measures, which are converted into a SI standard units for all calculations in the code.
YSFlight Default Units[]
Type
Units
YSFlight Unit
Length
Foot (ft)
Meter (m)
Inch (in)
Centameter (Cm)
Statue Mile (sm)
Nautical Mile (nm)
Meter (m)
Area
Square Inches (in^2)
Square Meters (m^2)
Square Meters (m^2)
Weight
or
Force
Kilogram (kg)
Pound (lb)
Tonne (t)
Newton (N)
Newton (N)
Speed
Mach
Kilometers per Hour (km/h)
Meters per Second (m/s)
Knots (kt)
Meters per Second (m/s)
Angle
Degrees (deg)
Radians (rad)
Radians (rad)
Power
Horsepower (HP)
Jules Per Second (J/s) a.k.a. Watts(W)
Watts (W)
Time
Second (sec)
Seconds (s)
YSFlight Unit Conversion[]
YSFlight does not always use the standard conversion between units and in some places uses a simplification.
Type
Unit
Equation
Output Unit
Weight
kg
N
Weight
lb
N
Weight
t
N
Speed
Mach
m/s
Speed
km/h
m/s
Speed
kt
m/s
Angle
deg
radians
Area
in^2
m^2
Length
in
m
Length
ft
m
Length
km
m
Length
Cm
m
Length
sm
m
Length
nm
m
Power
HP
W
Engine Thrust & Fuel Consumption[]
YSFlight has three engine models, each of which have their own equations and specific ties to the DAT File.
Jet Engine
Simple Propeller Engine
Real Propeller Engine
Jet Engine[]
The thrust of the jet engine is calculated based on the DAT File, Throttle setting, and altitude.
Where:
is the jet engine thrust efficiency factor
is the decimal throttle position (0 to 1, where 0 is Idle and 1 is maximum throttle).
Jet Engine Thrust Efficiency Factor[]
As a jet aircraft increases altitude, the thrust from the engine decreases for a given throttle position. For all altitudes between 0 and 20000m, a linear interpolation of the table below is used to determine the value of the factor.
Altitude (m)
0
1
4000
1
12000
0.6
16000
0.3
20000
0
Jet Engine Fuel Consumption Equations[]
For jet engines the fuel burn rate is a function of DAT File Parameter values and if the engine is operating in afterburner or not.
Where:
is the fuel consumption in units of weight per second
is the decimal throttle position (0 to 1, where 0 is Idle and 1 is maximum throttle)
is the change in time (seconds).
Simple Propeller Engine[]
The simple propeller engine has two regimes delimited by the PROPVMIN DAT Variable.
Slow Speed Simple Propeller Engine Thrust[]
When the airspeed of the aircraft is below PROPVMIN, then the following equations are used:
Where:
is the power of the engine
is the thrust output of the engine and propeller
is the air density at sea level (0 m)
is the air density at the aircraft's altitude
V is the aircraft's velocity in meters per second
is the decimal throttle position (0 to 1, where 0 is Idle and 1 is maximum throttle)
High Speed Simple Propeller Engine Thrust[]
When the airspeed of the aircraft is greater than or equal to PROPVMIN, then the following equations are used:
Where:
is the static thrust of the propeller engine
is the maximum thrust of the propeller engine
is the thrust of the propeller engine
Simple Propeller Engine Fuel Consumption[]
The simple propeller engine fuel consumption matches the non-afterburner jet engine model:
Where:
is the fuel consumption in units of weight per second
is the decimal throttle position (0 to 1, where 0 is Idle and 1 is maximum throttle)
is the change in time (seconds).
Real Propeller Engine[]
The equations behind the real propeller engine model are still being analyzed.
Lift and Drag Force[]
In YSFlight the lift and drag forces are calculated using the following equations:
Where:
is the lift force in Newtons
is the drag force in Newtons
is the air density at the aircraft's altitude
is the aircraft's velocity in meters per second
is the aircraft's wing area in square meters
is the drag coefficient
is the drag coefficient
Lift Coefficient[]
The lift coefficient of an aircraft is defined by DAT File variables. In 2015 YSFlight the transition from lift to stall (where lift coefficient equals zero) was upgraded with four new variables.
Basic DAT Property Calculations[]
Regardless of what version of YSFlight is being used, the following three constants are calculated from the DAT File.
Where:
is the air density at the REFACRUS altitude defined in the DAT File.
is the YSFlight Gravitational Acceleration Constant
is the air density at sea level
is the Lift Coefficient at zero degrees angle of attack.
is the Lift Coefficient at the landing approach angle of attack, REFAOALD, from the DAT File.
Helicopters[]
For helicopters, and are zero
Lift Coefficient Regions[]
There are several regions to the Lift Coefficient curve in YSFlight, all of which are defined by the DAT file and can be seen in the F-22 Lift Coefficient Curve in the Image Below.
Negative AoA Decay1
Negative AoA Flat1
Between CRITAOAM and CRITAOAP
Positive AoA Flat1
Positive AoA Decay1
1 Only YSFlight 2015 and newer.
If FLATCLR1, FLATCLR2, CLDECAY1, or CLDECAY2 are not defined in a DAT File for YSFlight 2015 or newer, then these values default to zero. This means that aircraft defined in DAT Files prepared before YSFlight 2015 will have the same performance in older and newer YSFlight versions. This identical performance is very helpful for acrobatic aircraft since Airshows are typically performed using YSFlight 2012.
Where is the Angle of Attack.
Lift Coefficient Changes due to Variable Geometry Wing and Flaps[]
When an aircraft has Variable Geometry Wings defined in the DAT File, the following modification is applied to the Lift Coefficient equations above. Note that the combination of Variable Geometry Wing and Flaps may be combined.
Where:
is the decimal percent that the Wings are swept are deployed (0 to 1, where 0 is fully swept back and 1 is fully swept forward)
is the decimal percent that the Wings are swept are deployed (0 to 1, where 0 is fully swept back and 1 is fully swept forward)
Drag Coefficient[]
The Drag Coefficient is calculated in real-time and has some approximations made to simplify the equations in the back end of YSFlight. In YSFlight, the drag coefficient is approximated by a quadratic equation centered around zero degrees angle of attack.
Fixed-Wing Aircraft Drag Coefficient Components[]
The drag coefficient has several components that need to be calculated beforehand
Where:
is the thrust at REFTCRUS, REFVCRUS and REFACRUS conditions
is the thrust at MAXSPEED, REFACRUS, and a throttle setting of 1.0 or Maximum Afterburner if one is defined in the DAT File.
is the thrust at REFVLAND, REFTHRLD (without afterburner), 0m altitude, and flaps fully deployed
Helicopter Drag Coefficient Components[]
For helicopters, some parts of the propeller engine need to be calculated:
Which can then be used to calculate the reference thrust and throttle data at the REFVCRUS and REFACRUS conditions. YSFlight assumes that the maximum helicopter speed is obtained at 30 degrees pitch down.
is the thrust at the , REFVCRUS, and REFACRUS conditions.
From these reference properties we can calculate the Drag Coefficient Components
Drag Coefficient Build Up[]
When calculating drag, the angle of attack is bounded. Beyond MAXCDAOA, the drag coefficient does not increase.
Afterwards the drag coefficient is build up as different influences are accounted for.
Initial Drag Coefficient Calculation[]
The initial drag coefficient is calculated as such:
Critical Speed Drag Coefficient Buildup[]
If the aircraft is traveling faster than CRITSPED, or if is less than and CRITSPED is slower than MAXSPEED, then the following additional contributions are applied:
Otherwise:
Effector Drag Coefficient Buildup[]
NOTE: if the aircraft does not have CDSPOILR defined, then it defaults to zero. If the aircraft does not have CDVARGEO defined, it defaults to zero.
Where:
is the decimal percentage that the spoiler is deployed, where 0 is fully retracted and 1 is fully deployed
is the decimal percentage that the VGW is swept backwards is deployed, where 0 is fully swept and 1 is fully spread
is the decimal percentage that the Flap is deployed, where 0 is fully retracted and 1 is fully deployed
is the decimal percentage that the Landing Gear are extended, where 0 is fully retracted and 1 is fully extended.
Brakes[]
Brakes apply a force on the aircraft to slow it down when at least one wheel is on the ground. The braking force is calculated with the following equation:
Where:
is the braking force
is the decimal percentage that brakes are applied (0 = no brakes, 1 = 100% brakes)
is the braking constant coefficient.
Braking Constant Coefficient[]
Helicopters have different Braking Constant Coefficient equations than fixed-wing aircraft.
For helicopters:
Where:
is 30 meters per second
For fixed wing aircraft:
Tire Friction[]
In the 2014 release of YSFlight, the DAT Variable TIREFRIC was added to the game to define the tire friction coefficient. When this is defined the aircraft will be slowed while on-ground by the tire friction force.
Where:
is the weight of the aircraft, minus any aerodynamic lift, which also accounts for any slope the aircraft is on.
Variable Geometry Wing Position[]
The variable geometry wing position is controlled by VGWSPEED1 and VGWSPEED2. Between these reference speeds, the VGW position is linear.
Radar Cross Section[]
Available in YSFlight 20050207 and later, aircraft can have a reduced or increased radar cross section, which impacts the range that player and AI weapons can lock onto an aircraft.
Calculating Radar Cross Section[]
The radar cross section is controllable by the DAT File and is a function of aircraft configuration and weapon load out. Note that Fuel Tanks and Flare Pods do not counts as weapons for this calculation. Analysis of Radar Cross Section in YSFlight 2015 found that AIM9 and AGM65 weapons also do not count and that when the rocket count is 38 or below, then it counts, but above 38 there is a point where it is no longer counted as an "external weapon".
When all loaded weapons are on HRDPOINTs defined as "$INTERNAL", then the Radar Cross Section is defined by:
Where:
is the decimal percent that the bomb bay doors are open (0=closed / 1=fully open)
is the decimal percent that the landing gear are down (0=up / 1=fully down)
When there are weapons loaded on HRDPOINTs without the "$INTERNAL" designation