E6B Flight Computer
POST/api/v1/e6b/cloud-base/calculateCommercial Pilot

Calculate Cloud Base

Estimates cloud base height AGL from surface temperature and dewpoint spread.

Code Examples

curl \
  -X POST \
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "temperatureCelsius": 0,
  "dewpointCelsius": 0
}' \
  "https://api.preflightapi.io/api/v1/e6b/cloud-base/calculate"

Description

Uses the standard pilot rule of thumb: cloud base (ft AGL) = (temperature - dewpoint) * 400. This approximates the lifting condensation level based on the average dry adiabatic lapse rate (~3°C/1000 ft) and dewpoint lapse rate (~0.5°C/1000 ft).

Response Fields

  • EstimatedCloudBaseFtAgl — estimated height of the cloud base above ground level (feet)
  • TemperatureDewpointSpreadCelsius — the difference between temperature and dewpoint (degrees Celsius)

*Note:* Actual cloud bases vary with humidity profiles, inversions, and local convective conditions. A small spread (less than 3°C) generally indicates a high likelihood of low ceilings or fog.

Request BodyCloudBaseRequestDto

temperatureCelsiusnumber

Surface temperature in degrees Celsius

dewpointCelsiusnumber

Dewpoint temperature in degrees Celsius (must be ≤ temperature)

Response Schema

200Returns the cloud base estimationCloudBaseResponseDto
estimatedCloudBaseFtAglnumber

Estimated cloud base in feet AGL

temperatureDewpointSpreadCelsiusnumber

Temperature/dewpoint spread in degrees Celsius

temperatureCelsiusnumber

Surface temperature used in calculation (°C)

dewpointCelsiusnumber

Dewpoint used in calculation (°C)

400The dewpoint exceeds the temperature, which is physically invalidApiErrorResponse
codestring

Machine-readable error code (e.g., "AIRCRAFT_NOT_FOUND").

messagestring

Human-readable error message suitable for display.

detailsstringnullable

Additional error details (only included in development environment).

servicestringnullable

Name of the external service that failed (only included for 503 errors).

validationErrorsRecord<string, string[]>nullable

Field-level validation errors (only for validation failures).

timestampstring

UTC timestamp when the error occurred.

traceIdstringnullable

Correlation ID for tracing the request.

pathstringnullable

Request path that generated the error.

Search Documentation

Search docs, endpoints, and schemas