![]() |
VR-Forces 4.2 Class Documentation
|
DtRemoteEnvironmentController allows the user to interrogate the back-end which is simulating the environmental weather object to get the current weather state. More...
Public Member Functions | |
| DtRemoteEnvironmentController () | |
| Constructor. | |
| virtual void | init (DtVrfMessageInterface *msgIf, DtReflectedEnvironmentProcessList *rel) |
| Caches the given pointers as myMsgIf and myReflectedEnvironmentProcessList. | |
| bool | reflectingCurrentWeatherState () |
| Indicates if the weather state of the back-end simulating the weather has been reflected. | |
| virtual void | processEnvironmentProcessAdded (DtReflectedEnvironmentProcess *obj) |
| Checks to see if the first recordPointer in the state repository of the DtReflectedEnvironmentProcess is of type DtEnvVrfWeatherStateRecordType, and if so it caches a pointer to the SR in myReflectedWeatherSR. | |
| virtual void | processEnvironmentProcessRemoved (DtReflectedEnvironmentProcess *obj) |
| Checks to see if the DtReflectedEnvironmentProcess being removed corresponds to the one cached in myReflectedWeatherSR, and if so myReflectedWeatherSR is set to 0. | |
| virtual void | setAirTurbidity (double value) |
| Air Turbidity. | |
| virtual double | airTurbidity () |
| If !reflectingCurrentWeatherState(), the default is 0.0. | |
| virtual void | setAmbientAirTemperature (double value) |
| Ambient Air Temperature. | |
| virtual double | ambientAirTemperature () |
| If !reflectingCurrentWeatherState(), the default is 0.0. | |
| virtual void | setCloudState (DtVrfWeatherCloudState) |
| Cloud State. | |
| virtual DtVrfWeatherCloudState | cloudState () |
| If !reflectingCurrentWeatherState(), the default is DtVrfWeatherCloudStateClear. | |
| virtual void | setPrecipitationIntensity (double value) |
| Precipitation Intensity. | |
| virtual double | precipitationIntensity () |
| If !reflectingCurrentWeatherState(), the default is 0.0. | |
| virtual void | setPrecipitationType (DtVrfWeatherPrecipitationType) |
| Precipitation Intensity. | |
| virtual DtVrfWeatherPrecipitationType | precipitationType () |
| If !reflectingCurrentWeatherState(), the default is 0.0. | |
| virtual void | setWindSpeed (double value) |
| Wind speed in m/s. | |
| virtual double | windSpeed () |
| If !reflectingCurrentWeatherState(), the default is 0.0. | |
| virtual void | setWindDirection (double value) |
| Wind direction in radians. | |
| virtual double | windDirection () |
| If !reflectingCurrentWeatherState(), the default is 0.0. | |
| virtual void | setVisibility (double value) |
| Visibility in meters. | |
| virtual double | visibility () |
| If !reflectingCurrentWeatherState(), the default is 16,000 (16km) | |
| virtual double | illumination () |
| Illumination in percentage (0 to 1.0). | |
| virtual void | setTimeOfDay (double secondsPastMidnight) |
| The current time of day, specified by the number of seconds passed midnight. | |
| virtual double | timeOfDay () |
| If !reflectingCurrentWeatherState(), the default is 43200 (12:00 noon) | |
| virtual void | setTimeOfDayAdvancementSpeed (double speed) |
| The current time of day advancement speed. | |
| virtual double | timeOfDayAdvancementSpeed () |
| If !reflectingCurrentWeatherState(), the default is 0 (no advance) | |
| virtual void | setUnderwaterVisibility (double underwaterVisibility) |
| Underwater visibility in meters. | |
| virtual double | underwaterVisibility () |
| Underwater visibility in meters. | |
| virtual void | setSurfaceTransparency (double transparency) |
| Surface transparency (percentage) | |
| virtual double | surfaceTransparency () |
| Surface transparency (percentage) | |
| virtual void | setWaterCurrentSpeed (double waterCurrentSpeed) |
| Water velocity in meters per second. | |
| virtual double | waterCurrentSpeed () |
| Water velocity in meters per second. | |
| virtual void | setWaterCurrentDirection (double waterCurrentDirection) |
| Water direction in radians clockwise from 0 (north) | |
| virtual double | waterCurrentDirection () |
| Water direction in radians clockwise from 0 (north) | |
| virtual void | setAmbientWaterTemperature (double waterTemperature) |
| Ambient water temperature in Celsius. | |
| virtual double | ambientWaterTemperature () |
| Ambient water temperature in Celsius. | |
| virtual void | setTidalOffset (double tidalOffset) |
| Tidal offset in meters from the water polygons in the database. | |
| virtual double | tidalOffset () |
| Tidal offset in meters from the water polygons in the database. | |
| virtual void | setTidalDirection (bool tidalDirection) |
| Tidal direction where true represents the tide going in and false represents the tide going out. | |
| virtual bool | tidalDirection () |
| Tidal direction where true represents the tide going in and false represents the tide going out. | |
| virtual void | setSwellState (unsigned int state) |
| Swell state according to the Douglas Sea Scale (integer 0 - 9) | |
| virtual unsigned int | swellState () |
| Swell state according to the Douglas Sea Scale (integer 0 - 9) | |
| virtual void | setSwellStateDirection (double direction) |
| Swell direction in in radians clockwise from 0 (north) | |
| virtual double | swellStateDirection () |
| Swell direction in in radians clockwise from 0 (north) | |
| virtual void | setSeaState (unsigned int douglasScale) |
| virtual unsigned int | seaState () |
| virtual void | setSeaStateDirection (double radiansFromNorth) |
| virtual double | seaStateDirection () |
| void | setWindDrivenSeaStateEnabled (bool enabled) |
| bool | windDrivenSeaStateEnabled () |
| virtual void | setChoppiness (double choppiness) |
| Wave choppiness (0..1) | |
| virtual double | choppiness () |
| Wave choppiness (0..1) | |
| virtual void | setSurgeDepth (double depth) |
| Surge depth (meters) | |
| virtual double | surgeDepth () |
| Surge depth (meters) | |
| virtual void | setThermoclineLayer1Depth (double depth) |
| Thermocline depth (in meters) and permeability (0..1). | |
| virtual double | thermoclineLayer1Depth () |
| Thermocline depth (in meters) and permeability (0..1). | |
| virtual void | setThermoclineLayer1Permeability (double depth) |
| Thermocline depth (in meters) and permeability (0..1). | |
| virtual double | thermoclineLayer1Permeability () |
| Thermocline depth (in meters) and permeability (0..1). | |
| virtual void | setThermoclineLayer2Depth (double depth) |
| Thermocline depth (in meters) and permeability (0..1). | |
| virtual double | thermoclineLayer2Depth () |
| Thermocline depth (in meters) and permeability (0..1). | |
| virtual void | setThermoclineLayer2Permeability (double depth) |
| Thermocline depth (in meters) and permeability (0..1). | |
| virtual double | thermoclineLayer2Permeability () |
| Thermocline depth (in meters) and permeability (0..1). | |
| virtual void | setThermoclineLayer3Depth (double depth) |
| Thermocline depth (in meters) and permeability (0..1). | |
| virtual double | thermoclineLayer3Depth () |
| Thermocline depth (in meters) and permeability (0..1). | |
| virtual void | setThermoclineLayer3Permeability (double depth) |
| Thermocline depth (in meters) and permeability (0..1). | |
| virtual double | thermoclineLayer3Permeability () |
| Thermocline depth (in meters) and permeability (0..1). | |
| virtual void | setThermoclineLayer4Depth (double depth) |
| Thermocline depth (in meters) and permeability (0..1). | |
| virtual double | thermoclineLayer4Depth () |
| Thermocline depth (in meters) and permeability (0..1). | |
| virtual void | setThermoclineLayer4Permeability (double depth) |
| Thermocline depth (in meters) and permeability (0..1). | |
| virtual double | thermoclineLayer4Permeability () |
| Thermocline depth (in meters) and permeability (0..1). | |
| virtual void | setThermoclineLayer5Depth (double depth) |
| Thermocline depth (in meters) and permeability (0..1). | |
| virtual double | thermoclineLayer5Depth () |
| Thermocline depth (in meters) and permeability (0..1). | |
| virtual void | setThermoclineLayer5Permeability (double depth) |
| Thermocline depth (in meters) and permeability (0..1). | |
| virtual double | thermoclineLayer5Permeability () |
| Thermocline depth (in meters) and permeability (0..1). | |
Static Public Member Functions | |
| static void | environmentProcessAddedCallback (DtReflectedEnvironmentProcess *obj, void *userData) |
| Registered by onInit, calls processEnvironmentProcessAdded. | |
| static void | environmentProcessRemovedCallback (DtReflectedEnvironmentProcess *obj, void *userData) |
| Registered by onInit, calls processEnvironmentProcessRemoved. | |
Protected Member Functions | |
| bool | updateVrfEnvironmentalWeatherStateRecord () |
| Called by all the weather accessors to update myVrfEnvironmentalWeatherStateRecord from DtEnvironmentProcessRepository. | |
| virtual void | processUpdatedCallback (DtReflectedEnvironmentProcess *e) |
Static Protected Member Functions | |
| static void | environmentProcessUpdatedCallback (DtReflectedEnvironmentProcess *e, void *usr) |
| Update internal data structures. | |
Protected Attributes | |
| DtReflectedEnvironmentProcessList * | myReflectedEnvironmentProcessList |
| DtVrfMessageInterface * | myMsgIf |
| DtEnvironmentProcessRepository * | myReflectedWeatherSR |
| DtVrfEnvironmentalWeatherStateRecord * | myVrfEnvironmentalWeatherStateRecord |
DtRemoteEnvironmentController allows the user to interrogate the back-end which is simulating the environmental weather object to get the current weather state.
Sim commands can also be sent to change the weather state. If there is no weather state available, the accessors will all provide reasonable default values which represent a clear, windless and sunny environment state. The user can check to see if the back-end's weather values are being reflected by calling reflectingCurrentWeatherState().
| DtRemoteEnvironmentController::DtRemoteEnvironmentController | ( | ) |
Constructor.
|
virtual |
Caches the given pointers as myMsgIf and myReflectedEnvironmentProcessList.
Registers environmentProcessAddedCallback and environmentProcessRemovedCallback with the DtReflectedEnvironmentProcessList. In order to check to see if the environment object has already been reflected, the environment list is walked and each reflected object is passed to processEnvironmentProcessAdded.
| bool DtRemoteEnvironmentController::reflectingCurrentWeatherState | ( | ) |
Indicates if the weather state of the back-end simulating the weather has been reflected.
Unless this returns true, none of the accessors will return real data!
|
virtual |
Air Turbidity.
|
virtual |
If !reflectingCurrentWeatherState(), the default is 0.0.
|
virtual |
Ambient Air Temperature.
|
virtual |
If !reflectingCurrentWeatherState(), the default is 0.0.
|
virtual |
Cloud State.
|
virtual |
If !reflectingCurrentWeatherState(), the default is DtVrfWeatherCloudStateClear.
|
virtual |
Precipitation Intensity.
|
virtual |
If !reflectingCurrentWeatherState(), the default is 0.0.
|
virtual |
Precipitation Intensity.
|
virtual |
If !reflectingCurrentWeatherState(), the default is 0.0.
|
virtual |
Wind speed in m/s.
|
virtual |
If !reflectingCurrentWeatherState(), the default is 0.0.
|
virtual |
Wind direction in radians.
|
virtual |
If !reflectingCurrentWeatherState(), the default is 0.0.
|
virtual |
Visibility in meters.
|
virtual |
If !reflectingCurrentWeatherState(), the default is 16,000 (16km)
|
virtual |
Illumination in percentage (0 to 1.0).
Illumination cannot be set directly. It is a function of time of day. If !reflectingCurrentWeatherState() is default is 1.0 (100% illumination)
|
virtual |
The current time of day, specified by the number of seconds passed midnight.
|
virtual |
If !reflectingCurrentWeatherState(), the default is 43200 (12:00 noon)
|
virtual |
The current time of day advancement speed.
|
virtual |
If !reflectingCurrentWeatherState(), the default is 0 (no advance)
|
virtual |
Underwater visibility in meters.
|
virtual |
Underwater visibility in meters.
|
virtual |
Surface transparency (percentage)
|
virtual |
Surface transparency (percentage)
|
virtual |
Water velocity in meters per second.
|
virtual |
Water velocity in meters per second.
|
virtual |
Water direction in radians clockwise from 0 (north)
|
virtual |
Water direction in radians clockwise from 0 (north)
|
virtual |
Ambient water temperature in Celsius.
|
virtual |
Ambient water temperature in Celsius.
|
virtual |
Tidal offset in meters from the water polygons in the database.
|
virtual |
Tidal offset in meters from the water polygons in the database.
|
virtual |
Tidal direction where true represents the tide going in and false represents the tide going out.
|
virtual |
Tidal direction where true represents the tide going in and false represents the tide going out.
|
virtual |
Swell state according to the Douglas Sea Scale (integer 0 - 9)
|
virtual |
Swell state according to the Douglas Sea Scale (integer 0 - 9)
|
virtual |
Swell direction in in radians clockwise from 0 (north)
|
virtual |
Swell direction in in radians clockwise from 0 (north)
|
virtual |
Sea state according to the Douglas Sea Scale.
|
virtual |
Sea state according to the Douglas Sea Scale.
|
virtual |
The direction waves travel from in radians from North.
|
virtual |
The direction waves travel from in radians from North.
| void DtRemoteEnvironmentController::setWindDrivenSeaStateEnabled | ( | bool | enabled | ) |
Flag for enabling sea-state to be driven by wind.
| bool DtRemoteEnvironmentController::windDrivenSeaStateEnabled | ( | ) |
Flag for enabling sea-state to be driven by wind.
|
virtual |
Wave choppiness (0..1)
|
virtual |
Wave choppiness (0..1)
|
virtual |
Surge depth (meters)
|
virtual |
Surge depth (meters)
|
virtual |
Thermocline depth (in meters) and permeability (0..1).
A depth of zero means that layer is not used.
|
virtual |
Thermocline depth (in meters) and permeability (0..1).
A depth of zero means that layer is not used.
|
virtual |
Thermocline depth (in meters) and permeability (0..1).
A depth of zero means that layer is not used.
|
virtual |
Thermocline depth (in meters) and permeability (0..1).
A depth of zero means that layer is not used.
|
virtual |
Thermocline depth (in meters) and permeability (0..1).
A depth of zero means that layer is not used.
|
virtual |
Thermocline depth (in meters) and permeability (0..1).
A depth of zero means that layer is not used.
|
virtual |
Thermocline depth (in meters) and permeability (0..1).
A depth of zero means that layer is not used.
|
virtual |
Thermocline depth (in meters) and permeability (0..1).
A depth of zero means that layer is not used.
|
virtual |
Thermocline depth (in meters) and permeability (0..1).
A depth of zero means that layer is not used.
|
virtual |
Thermocline depth (in meters) and permeability (0..1).
A depth of zero means that layer is not used.
|
virtual |
Thermocline depth (in meters) and permeability (0..1).
A depth of zero means that layer is not used.
|
virtual |
Thermocline depth (in meters) and permeability (0..1).
A depth of zero means that layer is not used.
|
virtual |
Thermocline depth (in meters) and permeability (0..1).
A depth of zero means that layer is not used.
|
virtual |
Thermocline depth (in meters) and permeability (0..1).
A depth of zero means that layer is not used.
|
virtual |
Thermocline depth (in meters) and permeability (0..1).
A depth of zero means that layer is not used.
|
virtual |
Thermocline depth (in meters) and permeability (0..1).
A depth of zero means that layer is not used.
|
virtual |
Thermocline depth (in meters) and permeability (0..1).
A depth of zero means that layer is not used.
|
virtual |
Thermocline depth (in meters) and permeability (0..1).
A depth of zero means that layer is not used.
|
virtual |
Thermocline depth (in meters) and permeability (0..1).
A depth of zero means that layer is not used.
|
virtual |
Thermocline depth (in meters) and permeability (0..1).
A depth of zero means that layer is not used.
|
static |
Registered by onInit, calls processEnvironmentProcessAdded.
|
virtual |
Checks to see if the first recordPointer in the state repository of the DtReflectedEnvironmentProcess is of type DtEnvVrfWeatherStateRecordType, and if so it caches a pointer to the SR in myReflectedWeatherSR.
|
static |
Registered by onInit, calls processEnvironmentProcessRemoved.
|
virtual |
Checks to see if the DtReflectedEnvironmentProcess being removed corresponds to the one cached in myReflectedWeatherSR, and if so myReflectedWeatherSR is set to 0.
|
protected |
Called by all the weather accessors to update myVrfEnvironmentalWeatherStateRecord from DtEnvironmentProcessRepository.
|
staticprotected |
Update internal data structures.
|
protectedvirtual |
|
protected |
|
protected |
|
protected |
|
protected |