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- | Set to 1 if this weather station hardware has determined close conditions (no-go) or 0 if not (good-to-go). Leave unchanged to have TheSky's internal logic dictate go or no-go. TheSky determines go or no-go conditions by internal logic using nearly all values here, and possibly some values outside the context of weather data. For the case when a weather station implementation returns a subset of these weather parameters, the practical solution is for this weather station to dictate this parameter. Otherwise, the permutations of having go no-go logic to apply to all the possible number of subsets is too vast. A common subset of values for go/no-go might be supported in the future if this subset can be established. |