OutsideConditions Reference

Table of contents


Introduction

Aircraft types before the mid-1970s often represent performance data for earlier models differently than for later models. For example, the earlier models may base performance data on the outside air temperature and density altitude, while later models might use ISA and airport elevation. An OutsideConditions instance presents these alternatives as different properties that each model's Ptable instance can choose as input keys. You can then add other properties, such as aircraft weight, and use the instance as the input for the Ptable interpolate() and related methods. An OutsideConditions instance presents the following properties. Only oat and isa have public setters (setting one recomputes the other); the others are read-only and are changed using the methods listed below:

An OutsideConditions instance may be created using an object containing any of the following properties:

If the constructor is passed an existing OutsideConditions instance, it returns a clone() of that instance.

If the constructor is passed a string, then it is passed to setFromPage() to initialize the conditions by retrieving values from a page's state variables.

The altitude, pressure altitude, altimeter, and transition altitude properties should only be changed using the following methods:

Here's a simple example:

const conditions = new OutsideConditions({
	oat: 20,
	altitude:1000,
	altimeter: 30.12,
	weight: 2500,
	headwind: 8,
})
takeoffRollTable.interpolateC(conditions)
takeoffWeightAdjTable.interpolateC(conditions)
const takeoffRoll = takeoffWindAdjTable.interpolate(conditions)
if (isError(takeoffRoll)) {
	...
} else {
	...
}

The conditions object will have computed pressureAltitude, densityAltitude, and isa properties in addition to the other properties provided to the constructor. The call to takeoffRollTable.interpolateC() will add a runwayDistance property to the conditions object, which may contain a number or an Error. The second interpolation adjusts the runwayDistance property, and the last interpolation returns a result value. If any interpolation produces an error, it will be passed to the takeoffRoll result.


Constructor

Syntax

new OutsideConditions(info)
new OutsideConditions(conditions)
new OutsideConditions(pageId)

Constructs a new OutsideConditions instance. If the argument is an object (info) then it contains any of the following properties:

If the argument is a string, then it is passed to setFromPage() to initialize the conditions from the specified pageId.

Each instance will have the following properties:

The oat and isa properties may be set directly. The other properties should be modified using instance methods. Other info properties copied to the instance may be modified as required.

Parameters


Instance methods

clone()

clone()

Return a new OutsideConditions instance that has the same content as this instance. All additional enumerable properties are copied as well.

Return value

An OutsideConditions instance.


setAltitude()

setAltitude(altitude)

Adjust the conditions for a new true altitude. The pressure altitude is recomputed from the true altitude, altimeter setting, and transition altitude. The OAT is recomputed from the pressure altitude and ISA.

Parameters

Return value

The OutsideConditions instance.


setAltitudeTemperature()

setAltitudeTemperature(info)

Sets new conditions according to info. info is an object that contains any of the following properties:

Parameters

Return value

The OutsideConditions instance.


setFromPage()

setFromPage(pageId)

Set the conditions from state variables from the page specified by pageId. However, if pageId is 'enrtAlt', it sets it to the cruise conditions between the destination and alternate airports from the enrt page.

For 'enrtAlt', the conditions are first set from the 'dest' page and the 'alt' page conditions are read as well. The altitude is set from enrt_altAltitudeH (the alternate cruise altitude in hundreds of feet, multiplied by 100). The altimeter is the average of the 'dest' and 'alt' altimeter settings, and isa is the average of their ISA values, clamped to ±20°C. The oat is then computed from the isa at the new altitude.

If pageId is not 'enrt', airportId is set from the page's airportId state variable. If the resulting altitude is at or above the transition altitude, the standard altimeter setting is used.

The following state variable values may be used to set the conditions:

Parameters

Return value

The OutsideConditions instance.


setPressureAltitude()

setPressureAltitude(pressureAltitude)

Adjust the conditions for a new pressure altitude. The true altitude is recomputed from the pressure altitude, altimeter setting, and transition altitude. The OAT is recomputed from the pressure altitude and ISA.

Parameters

Return value

The OutsideConditions instance.


Instance properties

airportId

The ID of the airport whose page the conditions were set from. It is set only by setFromPage() when pageId is not 'enrt'; otherwise it is not present, unless copied from an info object.


altimeter

The altimeter setting in inches of Mercury. It is always the standard setting (29.92) if altitude is at or above transitionAltitude.


altitude

The true altitude above MSL in feet.


densityAltitude

The dry density altitude above MSL in feet. The dry density altitude does not consider humidity, but it is the density altitude reported at airports. It is computed from the pressure altitude, and temperature.


isa

The difference from standard temperature (ISA) in degrees Celsius. If temperature information is not set at construction or by instance methods, then isa is 0 (the standard temperature at the pressure altitude). It is computed from the OAT and pressure altitude if oat is provided. Setting isa recomputes oat from the pressure altitude. A non-numeric value sets isa to 0.


limitedDensityAltitude

A read-only property that is the larger of the pressureAltitude and the densityAltitude. It is useful for Ptable data for models that have an altitude correction but no temperature correction. It keeps calculations more conservative than the POH by not using a density altitude lower than the pressure altitude.


oat

The outside air temperature in degrees Celsius. If temperature information is not set at construction or by instance methods, then the standard temperature at the pressure altitude is used. Setting oat recomputes isa from the pressure altitude. A non-numeric value sets isa to 0, so oat becomes the standard temperature.


pressureAltitude

The pressure altitude above MSL in feet. It is computed from the true altitude, altimeter setting, and transition altitude.


transitionAltitude

The transition altitude. The altitude above which the standard altimeter setting must be used to report altitude.