Weather System PDK


Related Links

Overview

This service is provided through the PDK interface and allows callers to manipulate the weather system during runtime. The interface is defined in the file IWeatherSystemPdk.h. The interface gives the developer control over current weather settings as well as current weather station data.


IWeatherSystemPdk

This is the interface to the core Prepar3D weather system. An example on how to query for the service can be found in the DLLStart() function of the Camera PDK Sample.

Note: This interface uses several enumerated weather types which are defined in WeatherSystemTypes.h. Several functions will also utilize the METAR Data Format.

GetCloudCoverageDensity() is called to retrieve the current cloud coverage density setting.

STDMETHOD_(CLOUD_COVERAGE_DENSITY, GetCloudCoverageDensity)() const abstract;

SetCloudCoverageDensity() is called to set the current cloud coverage density setting. The effects of setting this value will not be immediately seen.

STDMETHOD (SetCloudCoverageDensity)(CLOUD_COVERAGE_DENSITY eDensity) abstract;

GetCloudDrawDistance() is called to retrieve the current cloud draw distance setting.

STDMETHOD_(CLOUD_DRAW_DISTANCE, GetCloudDrawDistance)() const abstract;

SetCloudDrawDistance() is called to set the current cloud draw distance setting.

STDMETHOD (SetCloudDrawDistance)(CLOUD_DRAW_DISTANCE eDistance) abstract;

GetDetailedClouds() is called to retrieve the detailed cloud setting.

STDMETHOD_(bool, GetDetailedClouds)() const abstract;

SetDetailedClouds() is called to set the current detailed cloud setting.

STDMETHOD (SetDetailedClouds)(bool bIsDetailed) abstract;

GetThermalVisualType() is called to retrieve the current thermal visual type setting.

STDMETHOD_(THERMAL_VISUAL_TYPE, GetThermalVisualType)() const abstract;

SetThermalVisualType() is called to set the current thermal visual type setting.

STDMETHOD (SetThermalVisualType)(THERMAL_VISUAL_TYPE eThermalType) abstract;

GetNumberOfPressurePoints() is called to retrieve the current number of pressure points from the weather system.

STDMETHOD_(int, GetNumberOfPressurePoints)() const abstract;

GetStationMetarData() is called to retrieve the METAR string from the weather station with the given ICAO. The maximum supported length for a METAR string is 2000 characters. See also the METAR Data Format.

STDMETHOD (GetStationMetarData)(
__in __notnull LPCTSTR pszIcao,         // The station's ICAO
__out __notnull LPTSTR pszMetar,        // The resulting METAR string
__in size_t cchMetar) const abstract;   // The length of the resulting METAR string in characters

GetNearestStationMetarData() is called to retrieve the METAR string from the nearest weather station at the given latitude, longitude, and altitude. The maximum supported length for a METAR string is 2000 characters. See also the METAR Data Format.

STDMETHOD (GetNearestStationMetarData)(
__in double dLatRadians,                // Latitude in radians
__in double dLonRadians,                // Longitude in radians
__in double dAltFeet,                   // Altitude in feet
__out __notnull LPTSTR pszMetar,        // The resulting METAR string
__in size_t cchMetar) const abstract;   // The length of the resulting METAR string in characters

GetInterpolatedMetarData() is called to retrieve the weather station interpolated METAR string at the given latitude, longitude, and altitude. The maximum supported length for a METAR string is 2000 characters. See also the METAR Data Format.

STDMETHOD (GetNearestIcaoMetarData)(
__in double dLatRadians,                // Latitude in radians
__in double dLonRadians,                // Longitude in radians
__in double dAltFeet,                   // Altitude in feet
__out __notnull LPTSTR pszMetar,        // The resulting METAR string
__in size_t cchMetar) const abstract;   // The length of the resulting METAR string in characters

SetMetarData() is called to inject the given METAR string into the weather system. The maximum supported length for a METAR string is 2000 characters. See also the METAR Data Format.

STDMETHOD (SetMetarData)(
__in __notnull LPCTSTR pszMetar,    // The METAR string
__in int nSeconds) abstract;        // The time in seconds that the injected weather should merge into the current weather