FSUIPC Client DLL
.NET interface for FSUIPC
WeatherServices Class Reference

A class which handles all weather reading and writing. More...

Public Member Functions

FsWeather GetWeatherAtAircraft ()
 Get the current weather active at the player's aircraft. More...
 
FsWeather GetGlobalWeather ()
 Gets the currently set Global Weather (if Global Weather mode is not being used nothing will be filled in). More...
 
FsWeather GetWeatherAtLocation (string ICAO)
 Gets the current weather at the specified location. Note that the weather may not be avilable if it's a long way from the player. More...
 
FsWeather GetWeatherAtLocation (FsLatLonPoint Location)
 Gets the current weather at the specified location. Note that the weather may not be avilable if it's a long way from the player. More...
 
FsWeather GetWeatherAtLocation (FsLatitude Latitude, FsLongitude Longitude)
 Gets the current weather at the specified location. Note that the weather may not be avilable if it's a long way from the player. More...
 
FsWeather GetWeatherAtLocation (double Latitude, double Longitude)
 Gets the current weather at the specified location. Note that the weather may not be avilable if it's a long way from the player. More...
 
void ClearWeather ()
 Clear all types of weather from FS. (Does not reset any changes to the Dynamics setting). More...
 
void SetWeatherChangeRate (FsWeatherDynamics NewRate)
 Changes the weather change rate option in FS. This is the slider on the weather tab in the display settings dialog. More...
 
void EnableGlobalWeather ()
 Required for FSX+ Only. Puts FS into Global Weather Mode. You should only set Global weather after enabling this feature. More...
 
void SetGlobalWeather (FsWeather NewWeather)
 Set the global weather to the weather described in the FsWeather object passed in. More...
 
void SetGlobalWeather (FsWeather NewWeather, bool IgnoreUserSettings, ushort BlendTime)
 Set the global weather to the weather described in the FsWeather object passed in. More...
 
void SetWeatherStation (string ICAO, FsWeather NewWeather)
 Set the weather at a specific weather station to the weather described in the FsWeather object passed in. More...
 
void SetWeatherStation (string ICAO, FsWeather NewWeather, bool IgnoreUserSettings, ushort BlendTime)
 Set the weather at a specific weather station to the weather described in the FsWeather object passed in. More...
 
void SetWeatherStationPending (string ICAO, FsWeather NewWeather)
 Sends the weather at a specific weather station but does not active it. More...
 
void SetWeatherStationPending (string ICAO, FsWeather NewWeather, bool IgnoreUserSettings)
 Sends the weather at a specific weather station but does not active it. More...
 
void ActivatePendingWeather ()
 Activates all pending weather set with the SetWeatherStationPending() method. More...
 
void ActivatePendingWeather (ushort BlendTime)
 Activates all pending weather set with the SetWeatherStationPending() method. More...
 
string GetMetarAtLocation (string ICAO)
 (FSX+ ONLY) Gets the METAR string for the current weather at the specified location. Note that the weather may not be avilable if it's a long way from the player. More...
 
string GetMetarAtLocation (FsLatLonPoint Location)
 (FSX+ ONLY) Gets the METAR string for the current weather at the specified location. Note that the weather may not be avilable if it's a long way from the player. More...
 
string GetMetarAtLocation (FsLatitude Latitude, FsLongitude Longitude)
 (FSX+ ONLY) Gets the METAR string for the current weather at the specified location. Note that the weather may not be avilable if it's a long way from the player. More...
 
string GetMetarAtLocation (double Latitude, double Longitude)
 (FSX+ ONLY) Gets the METAR string for the current weather at the specified location. Note that the weather may not be avilable if it's a long way from the player. More...
 
void SetMetar (string Metar)
 (FSX+ ONLY) Write the supplied METAR string to flight sim and active it in the sim. More...
 

Properties

int LocationReadTimeout [get, set]
 Sets the timeout in milliseconds to wait while attempting to read weather from a weather station or lon/lat location. Default is 1000ms. More...
 
bool LocationReadExclusiveMode [get, set]
 Prevents any other applications reading weather while you are. More...
 

Detailed Description

A class which handles all weather reading and writing.

Member Function Documentation

◆ ActivatePendingWeather() [1/2]

void ActivatePendingWeather ( )
inline

Activates all pending weather set with the SetWeatherStationPending() method.

◆ ActivatePendingWeather() [2/2]

void ActivatePendingWeather ( ushort  BlendTime)
inline

Activates all pending weather set with the SetWeatherStationPending() method.

Parameters
BlendTimeFSX+ ONLY. A value in seconds to make this weather active after a delay, gradually "blending" into the existing weather.

◆ ClearWeather()

void ClearWeather ( )
inline

Clear all types of weather from FS. (Does not reset any changes to the Dynamics setting).

◆ EnableGlobalWeather()

void EnableGlobalWeather ( )
inline

Required for FSX+ Only. Puts FS into Global Weather Mode. You should only set Global weather after enabling this feature.

Note that the DLL will call this automatically when you set any global weather for the first time.

◆ GetGlobalWeather()

FsWeather GetGlobalWeather ( )
inline

Gets the currently set Global Weather (if Global Weather mode is not being used nothing will be filled in).

Returns
An FsWeather object containing all the weather data.

◆ GetMetarAtLocation() [1/4]

string GetMetarAtLocation ( string  ICAO)
inline

(FSX+ ONLY) Gets the METAR string for the current weather at the specified location. Note that the weather may not be avilable if it's a long way from the player.

Parameters
ICAOThe ICAO code of the weather station to read.
Returns
A METAR string.

◆ GetMetarAtLocation() [2/4]

string GetMetarAtLocation ( FsLatLonPoint  Location)
inline

(FSX+ ONLY) Gets the METAR string for the current weather at the specified location. Note that the weather may not be avilable if it's a long way from the player.

Parameters
LocationAn FsLatLonPoint object that specifies the location from which to read the weather.
Returns
A METAR string.

◆ GetMetarAtLocation() [3/4]

string GetMetarAtLocation ( FsLatitude  Latitude,
FsLongitude  Longitude 
)
inline

(FSX+ ONLY) Gets the METAR string for the current weather at the specified location. Note that the weather may not be avilable if it's a long way from the player.

Parameters
LatitudeAn FsLatitude object that specifies the latitude of the point from which to read the weather.
LongitudeAn FsLongitude object that specifies the longitude of the point from which to read the weather.
Returns
A METAR string.

◆ GetMetarAtLocation() [4/4]

string GetMetarAtLocation ( double  Latitude,
double  Longitude 
)
inline

(FSX+ ONLY) Gets the METAR string for the current weather at the specified location. Note that the weather may not be avilable if it's a long way from the player.

Parameters
LatitudeThe latitude of the point (in decimal degrees) from which to read the weather.
LongitudeThe longitude of the point (in decimal degrees) from which to read the weather.
Returns
A METAR string.

◆ GetWeatherAtAircraft()

FsWeather GetWeatherAtAircraft ( )
inline

Get the current weather active at the player's aircraft.

Returns
An FsWeather object containing all the weather data.

◆ GetWeatherAtLocation() [1/4]

FsWeather GetWeatherAtLocation ( string  ICAO)
inline

Gets the current weather at the specified location. Note that the weather may not be avilable if it's a long way from the player.

Parameters
ICAOThe ICAO code of the weather station to read.
Returns
An FsWeather object containing all the weather data.

◆ GetWeatherAtLocation() [2/4]

FsWeather GetWeatherAtLocation ( FsLatLonPoint  Location)
inline

Gets the current weather at the specified location. Note that the weather may not be avilable if it's a long way from the player.

Parameters
LocationAn FsLatLonPoint object that specifies the location from which to read the weather.
Returns
An FsWeather object containing all the weather data.

◆ GetWeatherAtLocation() [3/4]

FsWeather GetWeatherAtLocation ( FsLatitude  Latitude,
FsLongitude  Longitude 
)
inline

Gets the current weather at the specified location. Note that the weather may not be avilable if it's a long way from the player.

Parameters
LatitudeAn FsLatitude object that specifies the latitude of the point from which to read the weather.
LongitudeAn FsLongitude object that specifies the longitude of the point from which to read the weather.
Returns
An FsWeather object containing all the weather data.

◆ GetWeatherAtLocation() [4/4]

FsWeather GetWeatherAtLocation ( double  Latitude,
double  Longitude 
)
inline

Gets the current weather at the specified location. Note that the weather may not be avilable if it's a long way from the player.

Parameters
LatitudeThe latitude of the point (in decimal degrees) from which to read the weather.
LongitudeThe longitude of the point (in decimal degrees) from which to read the weather.
Returns
An FsWeather object containing all the weather data.

◆ SetGlobalWeather() [1/2]

void SetGlobalWeather ( FsWeather  NewWeather)
inline

Set the global weather to the weather described in the FsWeather object passed in.

Parameters
NewWeatherAn FsWeather object containing the weather to be set.

◆ SetGlobalWeather() [2/2]

void SetGlobalWeather ( FsWeather  NewWeather,
bool  IgnoreUserSettings,
ushort  BlendTime 
)
inline

Set the global weather to the weather described in the FsWeather object passed in.

NOTE: For FSX+ you must enable the global weather mode by calling EnableGlobalWeather()

Parameters
NewWeatherAn FsWeather object containing the weather to be set.
IgnoreUserSettingsSet to true if you want to bypass the weather options set the user in FSUIPC.
BlendTimeFSX+ ONLY. A value in seconds to make this weather active after a delay, gradually "blending" into the existing weather.

◆ SetMetar()

void SetMetar ( string  Metar)
inline

(FSX+ ONLY) Write the supplied METAR string to flight sim and active it in the sim.

Parameters
MetarThe METAR string to be written.

Note the format is not standard METAR used in real life, and is NOT the same as the METAR format read by one of the GetMetar... methods.

The SimConnect SDK apparently descibes the format.

◆ SetWeatherChangeRate()

void SetWeatherChangeRate ( FsWeatherDynamics  NewRate)
inline

Changes the weather change rate option in FS. This is the slider on the weather tab in the display settings dialog.

This change is only the for the current session and is not remembered when Flight Sim is restarted.

Parameters
NewRateAn FsWeatherDynamics value representing the new change rate setting.

◆ SetWeatherStation() [1/2]

void SetWeatherStation ( string  ICAO,
FsWeather  NewWeather 
)
inline

Set the weather at a specific weather station to the weather described in the FsWeather object passed in.

Parameters
ICAOThe ICAO code of a valid weather station.
NewWeatherAn FsWeather object containing the weather to be set.

◆ SetWeatherStation() [2/2]

void SetWeatherStation ( string  ICAO,
FsWeather  NewWeather,
bool  IgnoreUserSettings,
ushort  BlendTime 
)
inline

Set the weather at a specific weather station to the weather described in the FsWeather object passed in.

Parameters
ICAOThe ICAO code of a valid weather station.
NewWeatherAn FsWeather object containing the weather to be set.
IgnoreUserSettingsSet to true if you want to bypass the weather options set the user in FSUIPC.
BlendTimeFSX+ ONLY. A value in seconds to make this weather active after a delay, gradually "blending" into the existing weather.

◆ SetWeatherStationPending() [1/2]

void SetWeatherStationPending ( string  ICAO,
FsWeather  NewWeather 
)
inline

Sends the weather at a specific weather station but does not active it.

Multiple weather stations can be set using this method. To make pending weather active, call the ActivatePendingWeather() method.

Parameters
ICAOThe ICAO code of a valid weather station.
NewWeatherAn FsWeather object containing the weather to be set.

◆ SetWeatherStationPending() [2/2]

void SetWeatherStationPending ( string  ICAO,
FsWeather  NewWeather,
bool  IgnoreUserSettings 
)
inline

Sends the weather at a specific weather station but does not active it.

Multiple weather stations can be set using this method. To make pending weather active, call the ActivatePendingWeather() method.

Parameters
ICAOThe ICAO code of a valid weather station.
NewWeatherAn FsWeather object containing the weather to be set.
IgnoreUserSettingsSet to true if you want to bypass the weather options set the user in FSUIPC.

Property Documentation

◆ LocationReadExclusiveMode

bool LocationReadExclusiveMode
getset

Prevents any other applications reading weather while you are.

◆ LocationReadTimeout

int LocationReadTimeout
getset

Sets the timeout in milliseconds to wait while attempting to read weather from a weather station or lon/lat location. Default is 1000ms.