The WeatherStationDataInterface gives x2 authors a means to write a TheSky weather station driver.
The primary purpose of this interface is to make it easy/simple for x2 implementors to get weather station data into TheSky. TheSky calls the weatherStationData() method at a regular interval to keep weather station information up-to-date. At minimum integration, a weather station driver can return one or say a few of the weatherStationData() parameters to have them displayed in TheSky weather station tab. At a maximum integration, this weather station information resolves to a go or no-go state which TheSky can be configured to integrate with an enclosure (dome/roof) and open or close it accordingly.
For a working example, see the x2weatherstation example.
Support for this interface requires TheSky build 13488 or later. Use TheSkyXFacadeForDriversInterface::build() to determine the build of TheSky in use an act accordingly based on your requirements.
Don't forget to respond accordingly in your queryAbstraction().
| virtual int WeatherStationDataInterface::weatherStationData |
( |
double & |
dSkyTemp, |
|
|
double & |
dAmbTemp, |
|
|
double & |
dSenT, |
|
|
double & |
dWind, |
|
|
int & |
nPercentHumdity, |
|
|
double & |
dDewPointTemp, |
|
|
int & |
nRainHeaterPercentPower, |
|
|
int & |
nRainFlag, |
|
|
int & |
nWetFlag, |
|
|
int & |
nSecondsSinceGoodData, |
|
|
double & |
dVBNow, |
|
|
double & |
dBarometricPressure, |
|
|
WeatherStationDataInterface::x2CloudCond & |
cloudCondition, |
|
|
WeatherStationDataInterface::x2WindCond & |
windCondition, |
|
|
WeatherStationDataInterface::x2RainCond & |
rainCondition, |
|
|
WeatherStationDataInterface::x2DayCond & |
daylightCondition, |
|
|
int & |
nRoofCloseThisCycle |
|
) |
| |
|
pure virtual |
TheSky calls this method to have the x2 driver return the most up to date weather information.
This data is typical from the Boltwood Cloud sensor but can easily be extended/used by other weather station hardware providing the same information.
Note all values are marked as [in] because they are initialized so that if left unchanged, TheSky deems the weather station as not being equipped with the corresonding sensor. IOW, x2 implementors should only alter values that your pariticular hardware is able to measure and return.
- Parameters
-
| [in,out] | dSkyTemp | - sky ambient temperature in context of cloud sensing. |
| [in,out] | dAmbTemp | - ambient temperature. |
| [in,out] | dSenT | - sensor case temperature. |
| [in,out] | dWind | - wind speed. |
| [in,out] | nPercentHumdity | - relative humidity in %. |
| [in,out] | dDewPointTemp | - dew point temperature. |
| [in,out] | nRainHeaterPercentPower | - heater setting in % |
| [in,out] | nRainFlag | - rain flag, =0 for dry, =1 for rain in the last minute, =2 for rain right now |
| [in,out] | nWetFlag | - wet flag, =0 for dry, =1 for wet in the last minute, =2 for wet right now |
| [in,out] | nSecondsSinceGoodData | - seconds since the last valid data, only used for Boltwood |
| [in,out] | dVBNow | - date/time given as the VB6 Now() function result (in days) data last captured, only used for Boltwood |
| [in,out] | dBarometricPressure | - the barometric pressure in mB. This is the actual pressure, which is what the mount pointing calculations need, not a QNH figure. |
| [in,out] | cloudCondition | - see WeatherStationDataInterface::x2CloudCond |
| [in,out] | windCondition | - see WeatherStationDataInterface::x2WindCond |
| [in,out] | rainCondition | - see WeatherStationDataInterface::x2RainCond |
| [in,out] | daylightCondition | - see WeatherStationDataInterface::x2DayCond |
| [in,out] | nRoofCloseThisCycle | - By default, TheSky ignores this parameter and determines close (no-go) or open (good-to-go) internally based on the supplied weather data. Primarily this is to prevent weather station hardware or drivers from setting this parameter to 1 (no-go) or 0 (good-to-do) without supporting data (experienced with some hardware) which can confuse customers and, in some respects, breaks this interface by allowing arbitrary, external open/close.
Additionally, with some weather stations, this parameter "bounces" during transitions and even intermittently, resulting in unnecessary open/close cycles. By ignoring this parameter, TheSky has taken responsibility for these challenges and others within its own logic.
If you have exceptional or unavoidable circumstances that require TheSky to honor nRoofCloseThisCycle, please contact Software Bisque for instructions and understand that configuring TheSky to obey this parameter is unsupported, can cause confusion, may lead to unexpected open/close actions, may generate technical support you are responsible for, etc.
For weather-station drivers supporting only a subset of sensors (for example, a rain sensor only), all other sensors should be marked as not equipped. In that case, if rain is clear, the resulting outcome is good-to-go, and if raining, no-go. |