XPLMSetWeatherAtAirport

XPLM_API void       XPLMSetWeatherAtAirport(
                         const char *         airport_id,
                         XPLMWeatherInfo_t *  in_info);

Set the current weather conditions at a given airport. Unlike XPLMSetWeatherAtLocation, this call will replace any existing weather records for that airport from other sources (i.e. downloaded METARs) instead of being used as just another weather sample.

Some notes on individual fields: - pressure_alt should be QNH as reported by a station at the ground altitude given, or 0 if you are passing sealevel pressure in ‘pressure_sl’ instead. - pressure_sl is ignored if pressure_alt is given. - wind_dir_alt, wind_spd_alt, turbulence_alt, wave_speed, wave_length are derived from other data and are UNUSED when setting weather. - Temperatures can be given either as a single temperature at the ground altitude (temperature_alt) OR as an array of temperatures aloft (temp_layers), if the struct is V2 or higher. If you wish to use the V2 struct and still provide a single ground-level temperature, pass -100 or lower as the first element of the temp_layers array. In this case, existing weather at that point will be used for temperatures at altitude. - The same rules apply to dewpoint temperatures; either a single value at ground level in ‘dewpoint_alt’, or per-layer values in ‘dewp_layers’. - The troposphere altitude and temperature will be derived from existing data if you pass 0 or lower for troposphere_alt.

This call is not intended to be used per-frame. It should be called only during the pre-flight loop callback.