Density Altitude
Calculate density altitude for airports using live METAR data or manual atmospheric inputs.
Endpoints
GET
/api/v1/performance/density-altitude/{icaoCodeOrIdent}Commercial PilotGet Density Altitude For Airport
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| icaoCodeOrIdent* | path | string | ICAO code or airport identifier |
| TemperatureCelsiusOverride | query | number? | Override temperature in Celsius (uses METAR if not provided) |
| AltimeterInHgOverride | query | number? | Override altimeter setting in inHg (uses METAR if not provided) |
Responses
200Returns density altitude dataDensityAltitudeResponseDto
airportIdentifierstringnullableAirport identifier (for airport-based calculations)
fieldElevationFtnumberField elevation in feet MSL
pressureAltitudeFtnumberPressure altitude in feet
densityAltitudeFtnumberDensity altitude in feet
isaTemperatureCelsiusnumberStandard (ISA) temperature at this pressure altitude in Celsius
actualTemperatureCelsiusnumberActual temperature in Celsius
temperatureDeviationCelsiusnumberTemperature deviation from ISA in Celsius
altimeterInHgnumberAltimeter setting used in calculation (inHg)
rawMetarstringnullableRaw METAR text for reference (for airport-based calculations)
observationTimestringnullableMETAR observation time (for airport-based calculations)
400If METAR is missing required data and no override providedApiErrorResponse
codestringMachine-readable error code (e.g., "AIRCRAFT_NOT_FOUND").
messagestringHuman-readable error message suitable for display.
detailsstringnullableAdditional error details (only included in development environment).
validationErrorsRecord<string, string[]>nullableField-level validation errors (only for validation failures).
timestampstringUTC timestamp when the error occurred.
traceIdstringnullableCorrelation ID for tracing the request.
pathstringnullableRequest path that generated the error.
404If the airport or METAR is not foundApiErrorResponse
codestringMachine-readable error code (e.g., "AIRCRAFT_NOT_FOUND").
messagestringHuman-readable error message suitable for display.
detailsstringnullableAdditional error details (only included in development environment).
validationErrorsRecord<string, string[]>nullableField-level validation errors (only for validation failures).
timestampstringUTC timestamp when the error occurred.
traceIdstringnullableCorrelation ID for tracing the request.
pathstringnullableRequest path that generated the error.
503ApiErrorResponse
codestringMachine-readable error code (e.g., "AIRCRAFT_NOT_FOUND").
messagestringHuman-readable error message suitable for display.
detailsstringnullableAdditional error details (only included in development environment).
validationErrorsRecord<string, string[]>nullableField-level validation errors (only for validation failures).
timestampstringUTC timestamp when the error occurred.
traceIdstringnullableCorrelation ID for tracing the request.
pathstringnullableRequest path that generated the error.
Code Examples
curl \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://preflightapi-apim-service.azure-api.net/api/v1/performance/density-altitude/KJFK?TemperatureCelsiusOverride=10.0&AltimeterInHgOverride=10.0"POST
/api/v1/performance/density-altitude/calculateCommercial PilotCalculate Density Altitude
Request BodyDensityAltitudeRequestDto
fieldElevationFtnumberField elevation in feet MSL
altimeterInHgnumberAltimeter setting in inches of mercury (inHg)
temperatureCelsiusnumberTemperature in degrees Celsius
Responses
200Returns calculated density altitudeDensityAltitudeResponseDto
airportIdentifierstringnullableAirport identifier (for airport-based calculations)
fieldElevationFtnumberField elevation in feet MSL
pressureAltitudeFtnumberPressure altitude in feet
densityAltitudeFtnumberDensity altitude in feet
isaTemperatureCelsiusnumberStandard (ISA) temperature at this pressure altitude in Celsius
actualTemperatureCelsiusnumberActual temperature in Celsius
temperatureDeviationCelsiusnumberTemperature deviation from ISA in Celsius
altimeterInHgnumberAltimeter setting used in calculation (inHg)
rawMetarstringnullableRaw METAR text for reference (for airport-based calculations)
observationTimestringnullableMETAR observation time (for airport-based calculations)
400If the request parameters are invalidApiErrorResponse
codestringMachine-readable error code (e.g., "AIRCRAFT_NOT_FOUND").
messagestringHuman-readable error message suitable for display.
detailsstringnullableAdditional error details (only included in development environment).
validationErrorsRecord<string, string[]>nullableField-level validation errors (only for validation failures).
timestampstringUTC timestamp when the error occurred.
traceIdstringnullableCorrelation ID for tracing the request.
pathstringnullableRequest path that generated the error.
Code Examples
curl \
-X POST \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"fieldElevationFt": 748,
"altimeterInHg": 29.92,
"temperatureCelsius": 30
}' \
"https://preflightapi-apim-service.azure-api.net/api/v1/performance/density-altitude/calculate"