XPLMWeatherInfo_t
Basic weather conditions at a specific point. To specify exactly what data you intend to send or receive, it is required to set the structSize appropriately.
Version 2 data starts at “temp_layers”.
typedef struct {
// The size of the struct. Required for both reading and writing.
int structSize;
// Temperature at the given altitude in Celsius
float temperature_alt;
// Dewpoint at the given altitude in Celsius
float dewpoint_alt;
// Pressure at the given altitude in Pascals. Pass 0 when setting to use sea-level pressure instead of QNH.
float pressure_alt;
// Precipitation rate at the given altitude. Unused when setting.
float precip_rate_alt;
// Wind direction at the given altitude. Unused when setting.
float wind_dir_alt;
// Wind speed at the given altitude, meters/sec. Unused when setting.
float wind_spd_alt;
// Turbulence ratio at the given altitude. Unused when setting.
float turbulence_alt;
// Height of water waves in meters
float wave_height;
// Length of water waves in meters. Unused when setting.
float wave_length;
// Direction from which water waves are coming
int wave_dir;
// Speed of wave advance in meters/sec. Unused when setting.
float wave_speed;
// Base visibility at 0 altitude, meters
float visibility;
// Base precipitation ratio at 0 altitude
float precip_rate;
// Climb rate due to thermals, meters/sec
float thermal_climb;
// Pressure at sealevel in Pascals. Used when setting ONLY if pressure_alt (i.e. QNH) is not valid.
float pressure_sl;
// Defined wind layers. Not all layers are always defined.
XPLMWeatherInfoWinds_t wind_layers[XPLM_NUM_WIND_LAYERS];
// Defined cloud layers. Not all layers are always defined.
XPLMWeatherInfoClouds_t cloud_layers[XPLM_NUM_CLOUD_LAYERS];
// Temperatures at altitude, in degrees C. Layer altitudes are the same globally - see the 'sim/weather/region/atmosphere_alt_levels_m' dataref.
float temp_layers[XPLM_NUM_TEMPERATURE_LAYERS];
// Dewpoints at altitude, in degrees C. Layer altitudes are the same globally - see the 'sim/weather/region/atmosphere_alt_levels_m' dataref.
float dewp_layers[XPLM_NUM_TEMPERATURE_LAYERS];
// The altitude in MSL of the troposphere.
float troposphere_alt;
// The temperature in degrees C of the troposphere.
float troposphere_temp;
// Age in seconds of this weather report. Age affects how strongly the report affects the resulting weather.
float age;
// Horizontal radius of effect of this weather report, nautical miles.
float radius_nm;
// Vertical radius of effect of this weather report, feet MSL.
float max_altitude_msl_ft;
} XPLMWeatherInfo_t;