14 #include <vlutil/vlString.h>
18 #include <matrix/vlVector.h>
22 #include <tbb/spin_mutex.h>
27 #include <tbb/spin_mutex.h>
42 class DtTroposphereStateComponent;
98 virtual bool globalEnvironmentSimulatedLocally()
const;
104 virtual bool startEnvironmentSimulationLocally();
129 template<
typename WeatherStateType>
131 bool* isGlobal = 0)
const;
135 template<
typename WeatherStateType>
136 const WeatherStateType* weatherStateFor(
const DtVector& localPosition,
137 bool* isGlobal = 0)
const;
146 virtual std::vector<DtSimObjectReference> weatherObjectsFor(
const DtChord& localChord)
const;
156 virtual std::vector<const makVrf::DtTroposphereStateComponent*> cloudLayersFor(
const DtChord& localChord)
const;
162 virtual std::vector<CloudStateSegment>
163 cloudLayerDescriptionsAt(
const DtVector& localPosition)
const;
173 virtual std::vector<DtSimObjectReference> windCorridorsFor(
const DtChord& localChord)
const;
183 virtual std::vector<DtSimObjectReference> airTurbulencesFor(
const DtChord& localChord)
const;
191 virtual double visualDetectionMinimumContrast()
const;
196 virtual double airTemperature(
const DtVector&)
const;
199 virtual double airPressure(
const DtVector& localPosition)
const;
202 virtual double airTemperatureAltitude(
const DtVector& localPosition)
const;
205 virtual double airPressureAltitude(
const DtVector& localPosition)
const;
208 virtual double humidity(
const DtVector& localPosition)
const;
211 virtual double precipitationIntensity(
const DtVector&)
const;
215 virtual double averagePrecipitationIntensity(
const DtChord&)
const;
221 virtual double windSpeed(
const DtVector&)
const;
224 virtual double windDirection(
const DtVector&)
const;
230 virtual bool lightningPresent(
const DtVector& localPosition)
const;
233 virtual double visibility(
const DtVector&)
const;
236 virtual int visibilityObscurant(
const DtVector&)
const;
243 virtual double visibility(
const DtChord&)
const;
246 virtual double underwaterVisibility(
const DtVector&)
const;
249 virtual double surfaceTransparency(
const DtVector&)
const;
252 virtual double waterCurrentSpeed(
const DtVector&)
const;
255 virtual double waterCurrentDirection(
const DtVector&)
const;
258 virtual double ambientWaterTemperature(
const DtVector&)
const;
261 virtual double tidalOffset(
const DtVector&)
const;
264 virtual unsigned int swellState(
const DtVector&)
const;
267 virtual double swellStateDirection(
const DtVector&)
const;
270 virtual unsigned int seaState(
const DtVector&)
const;
273 virtual double seaStateDirection(
const DtVector&)
const;
276 virtual double choppiness(
const DtVector&)
const;
279 virtual double surgeDepth(
const DtVector&)
const;
282 virtual double fogHeight(
const DtVector&)
const;
291 virtual double snowAccumulation(
const DtVector&)
const;
295 virtual double snowRoadAccumulation(
const DtVector&)
const;
298 virtual double rainAccumulation(
const DtVector&)
const;
302 virtual DtObjectType globalEnvironmentObjectType()
const;
310 virtual DtUUID initializeAndGetMetocWeatherService();
313 virtual void setMetocEnabled(
bool b);
315 virtual bool metocEnabled()
const;
320 virtual double thermoclineLayer1Depth(
const DtVector&)
const;
321 virtual double thermoclineLayer1Permeability(
const DtVector&)
const;
322 virtual double thermoclineLayer2Depth(
const DtVector&)
const;
323 virtual double thermoclineLayer2Permeability(
const DtVector&)
const;
324 virtual double thermoclineLayer3Depth(
const DtVector&)
const;
325 virtual double thermoclineLayer3Permeability(
const DtVector&)
const;
326 virtual double thermoclineLayer4Depth(
const DtVector&)
const;
327 virtual double thermoclineLayer4Permeability(
const DtVector&)
const;
328 virtual double thermoclineLayer5Depth(
const DtVector&)
const;
329 virtual double thermoclineLayer5Permeability(
const DtVector&)
const;
333 virtual bool windSpeedAndDirectionAtAltitude(
const DtVector&,
334 double altMSL,
double& windSpeed,
double& windDirection)
const;
336 virtual bool visibilityAndObscurantAtAltitude(
const DtVector&,
337 double altMSL,
double& visibility,
int& obscurant)
const;
346 virtual void setDateAndTimeOfDay(
double secondsPastMidnight);
349 virtual double timeOfDay()
const;
351 virtual double dateAndTimeOfDay()
const;
354 virtual void setTimeOfDayAdvancementSpeed(
double speed);
356 virtual double timeOfDayAdvancementSpeed()
const;
365 virtual double illumination(
const DtVector& localPosition)
const;
369 virtual double expectedIllumination(
const DtVector& localPosition,
double dateAndTime)
const;
388 virtual void computeSoilWeatherMobilityModifiers(
390 double& snowEffectFraction,
391 DtString& alternateSoil,
double& alternateSoilFraction,
392 double& tractionModifier)
const;
400 virtual double snowMinimumAltitude(
const DtVector&)
const;
407 virtual bool windDrivenSeaStateEnabled(
const DtVector&)
const;
413 virtual void setUseDayNightIlluminationModel(
bool);
414 virtual bool useDayNightIlluminationModel()
const;
420 virtual double normalizedPrecipitationRate()
const;
421 virtual void setNormalizedPrecipitationRate(
const double);
429 virtual bool reduceVisibilityForPrecipitation()
const;
430 virtual void setReduceVisibilityForPrecipitation(
const bool);
446 virtual DtString deepWaterSoilName()
const;
447 virtual DtString shallowWaterSoilName()
const;
448 virtual DtString waterySoilName()
const;
449 virtual DtString drySoilName()
const;
450 virtual DtString roadSoilName()
const;
451 virtual DtString snowSoilName()
const;
452 virtual DtString iceSoilName()
const;
453 virtual double deepSnowDepth()
const;
456 virtual double saturationWaterDepth()
const;
458 virtual double waterSlideDepth()
const;
460 virtual double waterSlideFactor()
const;
463 virtual double hardFreezeTemperature()
const;
469 virtual int priority(
const DtUUID& weatherArea)
const;
470 virtual int priority(
const DtVector&)
const;
479 virtual double cloudAltitude(
const DtVector& localPosition)
const;
480 virtual double cloudThickness(
const DtVector& localPosition)
const;
481 virtual double cloudDensity(
const DtVector& localPosition)
const;
498 virtual void setUnderwaterVisibility(
double underwaterVisibility,
const DtUUID& weatherArea =
DtUUID::nullUUID());
500 virtual void setWaterCurrentSpeed(
double waterCurrentSpeed,
const DtUUID& weatherArea =
DtUUID::nullUUID());
501 virtual void setWaterCurrentDirection(
double waterCurrentDirection,
const DtUUID& weatherArea =
DtUUID::nullUUID());
502 virtual void setAmbientWaterTemperature(
double waterTemperature,
const DtUUID& weatherArea =
DtUUID::nullUUID());
516 virtual void setThermoclineLayer1Permeability(
double depth,
const DtUUID& weatherArea =
DtUUID::nullUUID());
518 virtual void setThermoclineLayer2Permeability(
double depth,
const DtUUID& weatherArea =
DtUUID::nullUUID());
520 virtual void setThermoclineLayer3Permeability(
double depth,
const DtUUID& weatherArea =
DtUUID::nullUUID());
522 virtual void setThermoclineLayer4Permeability(
double depth,
const DtUUID& weatherArea =
DtUUID::nullUUID());
524 virtual void setThermoclineLayer5Permeability(
double depth,
const DtUUID& weatherArea =
DtUUID::nullUUID());
538 virtual void setDeepWaterSoilName(
const DtString&);
539 virtual void setShallowWaterSoilName(
const DtString&);
540 virtual void setDrySoilName(
const DtString&);
541 virtual void setWaterySoilName(
const DtString&);
542 virtual void setRoadSoilName(
const DtString&);
543 virtual void setSnowSoilName(
const DtString&);
544 virtual void setIceSoilName(
const DtString&);
545 virtual void setDeepSnowDepth(
const double);
546 virtual void setSaturationWaterDepth(
const double);
547 virtual void setWaterSlideDepth(
const double);
548 virtual void setWaterSlideFactor(
const double);
549 virtual void setHardFreezeTemperature(
const double);
561 static void changeWeatherPrioritiesCallback(
DtSimMessage* msg,
void* usr);
562 virtual void processChangeWeatherPriorities(
DtSimMessage* msg);
564 static void requestWeatherAtLocationCallback(
DtSimMessage* msg,
void* usr);
565 virtual void processRequestWeatherAtLocation(
DtSimMessage* msg);
567 static void physicalWorldParametersChangedCallback(
void* usr);
568 virtual void initializeIlluminationObjectsList();
571 virtual void initializeSoilCharacteristics();
575 virtual void initializeWeatherStateProvider();
579 virtual void initializeWeatherParameters();
582 virtual void setupGlobalEnvironmentObject(
DtLocalObject* lo);
583 virtual void setupGlobalEnvironmentObject(
const DtUUID&);
584 static void globalObjectAddedCallback(
const DtLocalObject*,
void* usr);
588 void printWeatherObjects()
const;
UUID is a unique ID wrapper class.
Definition: uuid.h:59
DtVrfWeatherPrecipitationType
Definition: vrfWeatherStateEnums.h:13
DtString myIceSoilName
Name of "soil" that is ice.
Definition: environmentalStateManager.h:632
NOTE: This entire class is deprecated, in favor of Dt3dChord.
Definition: chord.h:40
class DtLocalObjectManager:
Definition: localObjectManager.h:151
DtRwBoolean myReduceVisibilityForPrecipitation
This flag determines whether to degrade visibility due to precipitation, on top of the effect of the ...
Definition: environmentalStateManager.h:662
DtSimulationServices * simulationServices() const
Definition: environmentalStateManager.h:435
DtReal myWaterSlideFactor
Fraction [0-1] of traction retained on hard surface with water on it.
Definition: environmentalStateManager.h:645
std::map< DtObjectType, DtIlluminationObjectParameters > myIlluminationObjectTypes
Definition: environmentalStateManager.h:611
This class contains the functions that the VRF simulation uses to query the current state of the weat...
Definition: weatherStateProvider.h:186
DtEnvironmentalStateSetter * myEnvironmentalStateSetter
This is only for setting global weather – local weather will use local vrf objects.
Definition: environmentalStateManager.h:604
tbb::spin_mutex myRemovalMutex
Definition: environmentalStateManager.h:673
DtVrfTurbulenceLevel
placeholder. Final version is defined in vrfWeatherStateEnums.h
Definition: weatherStateProvider.h:27
The DtSimObjectReference is a shared pointer that can be used amongst many object for access to the u...
Definition: simObjectReference.h:26
Instances of DtIlluminationObjectParameters are used to specify the how much illumination is cast by ...
Definition: illuminationObjectParameters.h:21
DtSimObjectReferenceList myAirTurbulenceObjects
Definition: environmentalStateManager.h:601
DtString myShallowWaterSoilName
Name of soil that is considered shallow water.
Definition: environmentalStateManager.h:617
double myHardFreezeTemperature
Temperature at which shallow water is frozen enough to drive a vehicle on. Degrees C...
Definition: environmentalStateManager.h:649
Contains the DtUUID class declaration.
DtUUID myMetocWeatherServiceUuid
Definition: environmentalStateManager.h:607
boost::signals2::scoped_connection mySimObjectAddedConnection
Definition: environmentalStateManager.h:664
bool myFirstTick
Definition: environmentalStateManager.h:667
CloudLayerCloudType
Definition: vrfCloudLayerStateEnums.h:14
DtString myRoadSoilName
Name of soil that is paved road.
Definition: environmentalStateManager.h:626
DtLocalObjectManager * myObjectManager
Definition: environmentalStateManager.h:668
DtSimulationServices * mySimulationServices
Definition: environmentalStateManager.h:591
DtSimObjectReferenceList myWeatherObjects
Definition: environmentalStateManager.h:599
Definition: objectType.h:27
bool myCreatedMetocService
Definition: environmentalStateManager.h:606
static const DtUUID & nullUUID()
boost::signals2::scoped_connection mySimObjectDeletedConnection
Definition: environmentalStateManager.h:665
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
Contains the enums for cloud layers.
DtSimObjectReferenceList myWindCorridorObjects
Definition: environmentalStateManager.h:600
double myDeepSnowDepth
Depth of snow required for full snow soil effect. Meters.
Definition: environmentalStateManager.h:635
File: simMsg.h.
Definition: simMessage.h:35
DtWeatherStateProvider * myWeatherStateProvider
The object used to get weather state.
Definition: environmentalStateManager.h:594
double mySaturationWaterDepth
Depth of water accumulation before dry soil is changed completely to watery soil. Meters...
Definition: environmentalStateManager.h:639
DtReal myWaterSlideDepth
Depth of water on a hard surface that causes loss of normal traction.
Definition: environmentalStateManager.h:642
DtString myWaterySoilName
Name of soil that is considered watery soil.
Definition: environmentalStateManager.h:620
A DtSimCommand subclass which specifies a change to the weather settings for the specified weather ar...
Definition: changeWeatherCommand.h:29
DtSimObjectReference myGlobalEnvironmentObject
Definition: environmentalStateManager.h:598
DtString myDeepWaterSoilName
Name of soil that is considered deep water.
Definition: environmentalStateManager.h:614
This is a convenience list that will add DtSimObjectReference objects and modify the list as objects ...
Definition: simObjectReferenceList.h:23
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:94
Description: Readable, Writable bool.
Definition: rwBoolean.h:26
DtString myDrySoilName
Name of soil that is dry soil–not sand or gravel.
Definition: environmentalStateManager.h:623
DtString mySnowSoilName
Name of "soil" that is snow.
Definition: environmentalStateManager.h:629
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
DtUUID myNextFrameGlobalEnvironmentObjectUUID
Definition: environmentalStateManager.h:597
DtBoost::shared_ptr< const DtManagedObjectList > DtManagedObjectListConstPtr
Typedef for a shared pointer to a const DtOrgViewManagedObjectList. These lists are used within VR-Fo...
Definition: managedObjectList.h:35
Maintains the environmental state of the simulation, such as time of day, illumination, and various aspects of the weather. All access to this data from any behavior or dynamics model should be made to this class.
Definition: environmentalStateManager.h:67
bool myMetocEnabled
This flag determines whether the net interfaces for Environmental Process objects will publish METOC ...
Definition: environmentalStateManager.h:672
Definition: rwWindLevels.h:17
A DtSimCommand subclass which specifies a change to the time of day settings in the simulation engine...
Definition: changeTimeOfDayCommand.h:20
Abstract base class for classes that set new environmental state to the environmental state simulator...
Definition: environmentalStateSetter.h:29
DtManagedObjectListConstPtr myIlluminationObjects
Definition: environmentalStateManager.h:609
1) Define the interface class that will be used to represent the next and current frames...
Definition: troposphereStateComponent.h:46
double myNormalizedPrecipitationRate
The (rain) precipitation rate that corresponds to a value of 1.0 in a weather object or the return va...
Definition: environmentalStateManager.h:653
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86
DtLocalObject * myNextFrameGlobalEnvironmentObject
Definition: environmentalStateManager.h:596