VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
DtWeatherStateProvider Class Reference

This class contains the functions that the VRF simulation uses to query the current state of the weather. All locations are terrain database ("local") coordinates.

Inheritance diagram for DtWeatherStateProvider:
Inheritance graph
[legend]

Public Member Functions

 DtWeatherStateProvider (const DtSimulationServices *simManager)
 
virtual ~DtWeatherStateProvider ()
 
virtual bool init ()
 
virtual void tick ()
 
virtual const
DtSimulationServices
simManager () const
 
const DtSimulationServicessimulationServices () const
 
Atmosphere
virtual std::vector
< CloudStateSegment
cloudLayers (const DtVector &localPosition) const
 
virtual double airVisibility (const DtVector &localPosition) const
 
virtual double visibility (const DtVector &localPosition) const
 
virtual int visibilityObscurant (const DtVector &localPosition) const
 
virtual double averageVisibilityOnChord (const DtChord &path) const
 
virtual double airTemperatureAtAltitude (const double mslTemperature, const double altitude) const
 
virtual double airTemperature (const DtVector &localPosition) const
 
virtual double mslTemperatureFromAirTemperatureAtAltitude (const double airTemperature, const double altitude) const
 
virtual double airPressureAtAltitude (const double mslPressure, const double altitude, const double mslTemperature) const
 
virtual double airPressure (const DtVector &localPosition) const
 
virtual double mslPressureFromAirPressureAtAltitude (const double airPressure, const double altitude, const double mslTemperature) const
 
virtual double airTemperatureAltitude (const DtVector &localPosition) const
 
virtual double airPressureAltitude (const DtVector &localPosition) const
 
virtual double humidity (const DtVector &localPosition) const
 
virtual double relativeHumidity (const DtVector &localPosition) const
 
virtual double windSpeed (const DtVector &localPosition) const
 
virtual double windDirection (const DtVector &localPosition) const
 
virtual bool windSpeedAndDirectionAtAltitude (const DtVector &localPosition, double altMSL, double &windSpeed, double &windDiection) const
 
virtual bool visibilityAndObscurantAtAltitude (const DtVector &localPosition, double altMSL, double &visibility, int &obscurant) const
 
virtual DtRwWindLevels windLevels (const DtVector &localPosition) const
 
virtual DtVrfTurbulenceLevel airTurbulence (const DtVector &localPosition) const
 
virtual void lineQueryAtmosphericState (const DtVector &startPosition, const DtVector &endPosition, double minSegmentLength, size_t maxSegmentCount, std::vector< AtmosphericStateSegment > &atmosphericStateSegments) const
 
virtual void lineQueryCloudState (const DtVector &startPosition, const DtVector &endPosition, std::vector< CloudStateSegment > &cloudStateSegments, double tolerance=5.0) const
 
virtual bool lightningPresent (const DtVector &localPosition) const
 
Precipitation

The functions may make use of the altitude of the point; however, in the default implementation, altitude is not considered.

virtual int blowingParticulateMatter (const DtVector &localPosition) const
 
virtual double precipitationIntensity (const DtVector &localPosition) const
 
virtual double averagePrecipitationIntensity (const DtChord &) const
 
virtual
DtVrfWeatherPrecipitationType 
precipitationType (const DtVector &localPosition) const
 
virtual double snowAccumulationDepth (const DtVector &localPosition) const
 
virtual double snowDepthOnRoads (const DtVector &localPosition) const
 
virtual double rainAccumulationDepth (const DtVector &localPosition) const
 
virtual void lineQueryPrecipitationState (const DtVector &startPosition, const DtVector &endPosition, std::vector< PrecipitationStateSegment > &precipitationStateSegments, double tolerance=5.0) const
 
Illumination
virtual double illuminationFromSky (const DtVector &localPosition) const
 
virtual double illuminationAtTime (const DtVector &localPosition, const double dateTime) const
 
Water
virtual double underwaterVisibility (const DtVector &localPosition) const
 
virtual double averageWaterVisibilityOnChord (const DtChord &path) const
 
virtual double waterCurrentSpeed (const DtVector &localPosition) const
 
virtual double waterCurrentDirection (const DtVector &localPosition) const
 
virtual double waterTemperature (const DtVector &localPosition) const
 
virtual double tidalOffset (const DtVector &localPosition) const
 
virtual unsigned int swellState (const DtVector &localPosition) const
 
virtual double swellDirection (const DtVector &localPosition) const
 
virtual unsigned int seaState (const DtVector &localPosition) const
 
virtual double seaDirection (const DtVector &localPosition) const
 
virtual double choppiness (const DtVector &localPosition) const
 
virtual double surgeDepth (const DtVector &localPosition) const
 
virtual double depthOffset (const DtVector &localPosition) const
 
virtual double windFetch (const DtVector &localPosition) const
 
virtual double thermoclineLayer1Depth (const DtVector &localPosition) const
 
virtual double thermoclineLayer1Permeability (const DtVector &localPosition) const
 
virtual double thermoclineLayer2Depth (const DtVector &localPosition) const
 
virtual double thermoclineLayer2Permeability (const DtVector &localPosition) const
 
virtual double thermoclineLayer3Depth (const DtVector &localPosition) const
 
virtual double thermoclineLayer3Permeability (const DtVector &localPosition) const
 
virtual double thermoclineLayer4Depth (const DtVector &localPosition) const
 
virtual double thermoclineLayer4Permeability (const DtVector &localPosition) const
 
virtual double thermoclineLayer5Depth (const DtVector &localPosition) const
 
virtual double thermoclineLayer5Permeability (const DtVector &localPosition) const
 

Static Public Member Functions

static DtWeatherStateProvidercreator (const DtSimulationServices *simMgr)
 

Protected Member Functions

std::vector< DtChordsegmentsIntersectingPrecipitationAreas (const DtVector &startPosition, const DtVector &endPosition, const std::vector< DtSimObjectReference > &weatherObjects, double tolerance) const
 
void setPrecipitationStateForWeatherObjectsSegments (const std::vector< DtChord > &chordIntersectingSegments, const std::vector< DtSimObjectReference > &weatherObjects, std::vector< PrecipitationStateSegment > &precipitationStateSegments, std::vector< DtChord > &globalWeatherChordIntersectingSegments, double tolerance) const
 
void setPrecipitationStateForGlobalWeatherSegments (const DtVector &startPosition, const std::vector< DtChord > &globalWeatherChordIntersectingSegments, const std::vector< DtSimObjectReference > &weatherObjects, std::vector< PrecipitationStateSegment > &precipitationStateSegments, double tolerance) const
 
std::vector< DtChordsegmentsIntersectingCloudLayers (const DtVector &startPosition, const DtVector &endPosition, const std::vector< DtSimObjectReference > &weatherObjects, double tolerance) const
 
void setCloudStateForWeatherObjectsSegments (const std::vector< DtChord > &chordIntersectingSegments, const std::vector< DtSimObjectReference > &weatherObjects, std::vector< CloudStateSegment > &cloudStateSegments, std::vector< DtChord > &globalWeatherChordIntersectingSegments, double tolerance) const
 
void setCloudStateForGlobalWeatherSegments (const DtVector &startPosition, const std::vector< DtChord > &globalWeatherChordIntersectingSegments, const std::vector< DtSimObjectReference > &weatherObjects, std::vector< CloudStateSegment > &cloudStateSegments, double tolerance) const
 
bool chordIntersectsExtent (const DtChord &chord, const DtExtent &extent, DtPoint &intersectionEntryPoint, DtPoint &intersectionExitPoint, bool &chordPt0InExtent, bool &chordPt1InExtent) const
 
virtual double defaultCloudVisibility () const
 

Protected Attributes

const DtSimulationServicesmySimulationServices
 
double myKoschmiederConstant
 

Private Member Functions

 DtWeatherStateProvider (const DtWeatherStateProvider &orig)
 
const DtWeatherStateProvideroperator= (const DtWeatherStateProvider &orig)
 
 DtWeatherStateProvider ()
 

Constructor & Destructor Documentation

DtWeatherStateProvider::DtWeatherStateProvider ( const DtWeatherStateProvider orig)
private

Not implemented.

DtWeatherStateProvider::DtWeatherStateProvider ( )
private

Not implemented.

DtWeatherStateProvider::DtWeatherStateProvider ( const DtSimulationServices simManager)

constructor

virtual DtWeatherStateProvider::~DtWeatherStateProvider ( )
virtual

destructor

Member Function Documentation

const DtWeatherStateProvider& DtWeatherStateProvider::operator= ( const DtWeatherStateProvider orig)
private

Not implemented.

virtual bool DtWeatherStateProvider::init ( )
virtual

This is called by the environmental state manager immediately after it creates a weather state provider. Any other code that creates a weather state provider should call this before calling other functions.

virtual void DtWeatherStateProvider::tick ( )
virtual

Called by DtEnvironmentalStateManager::tick(). The default weather state provider does nothing here. It could be used to accumulate snow, or something.

virtual const DtSimulationServices* DtWeatherStateProvider::simManager ( ) const
virtual
static DtWeatherStateProvider* DtWeatherStateProvider::creator ( const DtSimulationServices simMgr)
static

The weatherStateProvider will be created by the environmentalStateManager using a factory, so that other weatherStateProviders can be used instead by registering a different creator function in the factory.

virtual std::vector<CloudStateSegment> DtWeatherStateProvider::cloudLayers ( const DtVector &  localPosition) const
virtual

Provides descriptions of each cloud layer. Not normally needed, but here in case a VRF component needs this detailed data, e.g. to find a cloud ceiling or something. Normally, visibility is the attribute of interest, and the visibility functions below use cloud layers in their calculations, so this cloud layer detail is not necessary.

Layers at a 2D location (i.e., above a point on the surface).

virtual double DtWeatherStateProvider::airVisibility ( const DtVector &  localPosition) const
virtual

Visibility of just the air (without clouds or precipitation). With weather areas, this is the value of visibility(). In meters.

virtual double DtWeatherStateProvider::visibility ( const DtVector &  localPosition) const
virtual

Visibility in meters. Accounts for base air visibility and precipitation (uses intensity in a formula).

virtual int DtWeatherStateProvider::visibilityObscurant ( const DtVector &  localPosition) const
virtual

Visibility obscurant at the given position.

virtual double DtWeatherStateProvider::averageVisibilityOnChord ( const DtChord path) const
virtual

Average visibility value along the given chord. This is visibility through the air (i.e., not water). The default computation finds all weather objects that the chord passes through. An attenuation value is calculated for air visibility and precipitation; these are averaged equally over the number of objects–there is no calculation of distance within each object. Clouds are not yet (VRF 4.8 IPB7) considered. These attenuations are added and then a net visibility is calculated.

virtual double DtWeatherStateProvider::airTemperatureAtAltitude ( const double  mslTemperature,
const double  altitude 
) const
virtual

Air temperature at an altitude, given the MSL temperature. Temperature is in degrees C; altitude is in meters.

virtual double DtWeatherStateProvider::airTemperature ( const DtVector &  localPosition) const
virtual

Air temperature in degrees C at the given 3D location. In the default implementation, the ambient temperature in a weather object is taken to be the MSL temperature. airTemperatureAtAltitude is used to compute the net temperature.

Reimplemented in MyWeatherStateProvider.

virtual double DtWeatherStateProvider::mslTemperatureFromAirTemperatureAtAltitude ( const double  airTemperature,
const double  altitude 
) const
virtual

Return MSL temperature, given an air temperature at a specific altitude. Temperature is in degrees C; altitude is in meters. Max valid altitude value is 10000m.

virtual double DtWeatherStateProvider::airPressureAtAltitude ( const double  mslPressure,
const double  altitude,
const double  mslTemperature 
) const
virtual

Air pressure at an altitude, given the MSL pressure and MSL temperature. Pressure is in kPa; altitude is in meters. temperature is in degrees C.

virtual double DtWeatherStateProvider::airPressure ( const DtVector &  localPosition) const
virtual

Air pressure at the given 3D location. In kiloPascals. Uses airTemperature(). In the default implementation, there is no pressure attribute in weather objects, so this function assumes a default MSL pressure of 101.321 kPa.

virtual double DtWeatherStateProvider::mslPressureFromAirPressureAtAltitude ( const double  airPressure,
const double  altitude,
const double  mslTemperature 
) const
virtual

Return MSL temperature, given an air temperature at a specific altitude and the msl temperature. Pressure is in kPa; altitude is in meters. temperature in degrees C. Max valid altitude value is 10000m.

virtual double DtWeatherStateProvider::airTemperatureAltitude ( const DtVector &  localPosition) const
virtual

Air temperature altitude in meters.

virtual double DtWeatherStateProvider::airPressureAltitude ( const DtVector &  localPosition) const
virtual

Air pressure altitude in meters.

virtual double DtWeatherStateProvider::humidity ( const DtVector &  localPosition) const
virtual

Humidity in ppmv.

virtual double DtWeatherStateProvider::relativeHumidity ( const DtVector &  localPosition) const
virtual

Percentage humidity. Returns a value 0 - 100. No information about this in the default implementation, so by default returns 10.0.

virtual double DtWeatherStateProvider::windSpeed ( const DtVector &  localPosition) const
virtual

Wind speed in mps.

virtual double DtWeatherStateProvider::windDirection ( const DtVector &  localPosition) const
virtual

Wind heading in radians.

virtual bool DtWeatherStateProvider::windSpeedAndDirectionAtAltitude ( const DtVector &  localPosition,
double  altMSL,
double windSpeed,
double windDiection 
) const
virtual

Gets both wind speed and direction.

virtual bool DtWeatherStateProvider::visibilityAndObscurantAtAltitude ( const DtVector &  localPosition,
double  altMSL,
double visibility,
int obscurant 
) const
virtual

Gets both visibility and obscurant.

virtual DtRwWindLevels DtWeatherStateProvider::windLevels ( const DtVector &  localPosition) const
virtual

Returns the wind levels object at the given location.

virtual DtVrfTurbulenceLevel DtWeatherStateProvider::airTurbulence ( const DtVector &  localPosition) const
virtual

Turbulence level.

virtual void DtWeatherStateProvider::lineQueryAtmosphericState ( const DtVector &  startPosition,
const DtVector &  endPosition,
double  minSegmentLength,
size_t  maxSegmentCount,
std::vector< AtmosphericStateSegment > &  atmosphericStateSegments 
) const
virtual

Query the atmospheric state along a line. The line is split into equal length segments and the atmospheric data is retrieved at sample positions.

Parameters
Input
startPositionthe coordinates of the query line's starting point.
endPositionthe coordinates of the query line's end point.
minSegmentLengththe minimal length of the segments, the query line will be split into. This is the minimal distance between the data sampling points along the line.
maxSegmentCountthe maximal number of segments, the query line will be split into. minSegmentLength and maxSegmentCount are used to determine the number and the positions of of the sampling points along the query line.
Output
atmosphericStateSegmentsa collection of AtmosphericStateSegment structures. Each AtmosphericStateSegment structure contains the atmospheric data - e.g. air pressure, air temperature, etc. taken at a sampling position along the query line. Each line segment is determined by the position of the sampling point. See the AtmosphericStateSegment declaration in the current file.
virtual void DtWeatherStateProvider::lineQueryCloudState ( const DtVector &  startPosition,
const DtVector &  endPosition,
std::vector< CloudStateSegment > &  cloudStateSegments,
double  tolerance = 5.0 
) const
virtual

Query the cloud layers state along a line. Returned are the segments along the line where there is cloud coverage, with the associated cloud layer data.

Note: For long query lines - the function may return incorrect intersection segments. That is due to the internal topographic conversions and the curvature of the earth. In these cases, it is suggested to split the query line into smaller sections and do multiple queries.

Parameters
Input
startPositionthe coordinates of the query line's starting point.
endPositionthe coordinates of the query line's end point.
tolerancethe minimum required thickness of a cloud layer, so to be included in the returned cloudStateSegments collection. The tolerance default value is 5m , and the minimal value is 0.5m.
Output
cloudStateSegmentsa collection of CloudStateSegment structures. Each CloudStateSegment structure contains the cloud layer data - e.g. cloud type, visibility, etc. for a section along the query line where there is a cloud coverage. The cloud parameters have the same value along the entire line segment. The line segments without cloud coverage are not included in the collection. Each line segment is determined by its starting position and length. See the CloudStateSegment declaration in the current file.
virtual bool DtWeatherStateProvider::lightningPresent ( const DtVector &  localPosition) const
virtual

Returns whether lightning is present.

virtual int DtWeatherStateProvider::blowingParticulateMatter ( const DtVector &  localPosition) const
virtual

Returns mm/hr precipitation. Note that for snow, this value should be about 10x what it would be for rain for the same amount of water.

virtual double DtWeatherStateProvider::precipitationIntensity ( const DtVector &  localPosition) const
virtual

Returns mm/hr precipitation. Note that for snow, this value should be about 10x what it would be for rain for the same amount of water.

virtual double DtWeatherStateProvider::averagePrecipitationIntensity ( const DtChord ) const
virtual

Returns mm/hr precipitation. Note that for snow, this value should be about 10x what it would be for rain for the same amount of water.

virtual DtVrfWeatherPrecipitationType DtWeatherStateProvider::precipitationType ( const DtVector &  localPosition) const
virtual

Returns mm/hr precipitation. Note that for snow, this value should be about 10x what it would be for rain for the same amount of water.

virtual double DtWeatherStateProvider::snowAccumulationDepth ( const DtVector &  localPosition) const
virtual

Returns mm/hr precipitation. Note that for snow, this value should be about 10x what it would be for rain for the same amount of water.

virtual double DtWeatherStateProvider::snowDepthOnRoads ( const DtVector &  localPosition) const
virtual

Returns mm/hr precipitation. Note that for snow, this value should be about 10x what it would be for rain for the same amount of water.

virtual double DtWeatherStateProvider::rainAccumulationDepth ( const DtVector &  localPosition) const
virtual

Returns mm/hr precipitation. Note that for snow, this value should be about 10x what it would be for rain for the same amount of water.

virtual void DtWeatherStateProvider::lineQueryPrecipitationState ( const DtVector &  startPosition,
const DtVector &  endPosition,
std::vector< PrecipitationStateSegment > &  precipitationStateSegments,
double  tolerance = 5.0 
) const
virtual

Query the precipitation state along a line. Returned are the segments along the line where there is precipitation, with the associated precipitation data.

Note: For long query lines - the function may return incorrect intersection segments. That is due to the internal topographic conversions and the curvature of the earth. In these cases, it is suggested to split the query line into smaller sections and do multiple queries.

Parameters
Input
startPositionthe coordinates of the query line's starting point.
endPositionthe coordinates of the query line's end point.
tolerancethe minimum required thickness of a cloud layer, so to be included in the returned cloudStateSegments collection. The tolerance default value is 5m , and the minimal value is 0.5m.
Output
precipitationStateSegmentsa collection of PrecipitationStateSegment structures. Each PrecipitationStateSegment structure contains the precipitation data - e.g. precipitation intensity, etc. for a section along the query line where there is a precipitation. The precipitation parameters have the same value along the entire line segment. The line segments without precipitation are not included in the collection. Each line segment is determined by its starting position and length. See the PrecipitationStateSegment declaration in the current file.
virtual double DtWeatherStateProvider::illuminationFromSky ( const DtVector &  localPosition) const
virtual

Illumination only from sun, moon, and stars. Returns a value [0-1] representing a fraction of full sunlight.

virtual double DtWeatherStateProvider::illuminationAtTime ( const DtVector &  localPosition,
const double  dateTime 
) const
virtual

This version of the illumination function calculates the light from sun/moon/stars at an arbitrary date-time.

virtual double DtWeatherStateProvider::underwaterVisibility ( const DtVector &  localPosition) const
virtual

Visibility distance in meters.

virtual double DtWeatherStateProvider::averageWaterVisibilityOnChord ( const DtChord path) const
virtual

Provides a visibility value that can be used for sensing along the chord (e.g., computing loss of contrast).

virtual double DtWeatherStateProvider::waterCurrentSpeed ( const DtVector &  localPosition) const
virtual

Visibility distance in meters.

virtual double DtWeatherStateProvider::waterCurrentDirection ( const DtVector &  localPosition) const
virtual

Visibility distance in meters.

virtual double DtWeatherStateProvider::waterTemperature ( const DtVector &  localPosition) const
virtual

Heading in radians.

virtual double DtWeatherStateProvider::tidalOffset ( const DtVector &  localPosition) const
virtual

Tidal offset in meters above the water surface in the database.

virtual unsigned int DtWeatherStateProvider::swellState ( const DtVector &  localPosition) const
virtual

Swell state according to the Douglas Sea Scale (integer 0 - 9)

virtual double DtWeatherStateProvider::swellDirection ( const DtVector &  localPosition) const
virtual

Visibility distance in meters.

virtual unsigned int DtWeatherStateProvider::seaState ( const DtVector &  localPosition) const
virtual

                                     Heading in radians.

Sea state according to the Douglas Sea Scale (integer 0 - 9)

virtual double DtWeatherStateProvider::seaDirection ( const DtVector &  localPosition) const
virtual

Visibility distance in meters.

virtual double DtWeatherStateProvider::choppiness ( const DtVector &  localPosition) const
virtual

                                   Heading in radians.

Wave choppiness (0..1).

virtual double DtWeatherStateProvider::surgeDepth ( const DtVector &  localPosition) const
virtual

Meters.

virtual double DtWeatherStateProvider::depthOffset ( const DtVector &  localPosition) const
virtual

Meters.

virtual double DtWeatherStateProvider::windFetch ( const DtVector &  localPosition) const
virtual

Meters.

virtual double DtWeatherStateProvider::thermoclineLayer1Depth ( const DtVector &  localPosition) const
virtual

Depths are the depth of the top of the thermocline. If the depth is 0, the layer is not present.

virtual double DtWeatherStateProvider::thermoclineLayer1Permeability ( const DtVector &  localPosition) const
virtual

Visibility distance in meters.

virtual double DtWeatherStateProvider::thermoclineLayer2Depth ( const DtVector &  localPosition) const
virtual

Visibility distance in meters.

virtual double DtWeatherStateProvider::thermoclineLayer2Permeability ( const DtVector &  localPosition) const
virtual

Visibility distance in meters.

virtual double DtWeatherStateProvider::thermoclineLayer3Depth ( const DtVector &  localPosition) const
virtual

Visibility distance in meters.

virtual double DtWeatherStateProvider::thermoclineLayer3Permeability ( const DtVector &  localPosition) const
virtual

Visibility distance in meters.

virtual double DtWeatherStateProvider::thermoclineLayer4Depth ( const DtVector &  localPosition) const
virtual

Visibility distance in meters.

virtual double DtWeatherStateProvider::thermoclineLayer4Permeability ( const DtVector &  localPosition) const
virtual

Visibility distance in meters.

virtual double DtWeatherStateProvider::thermoclineLayer5Depth ( const DtVector &  localPosition) const
virtual

Visibility distance in meters.

virtual double DtWeatherStateProvider::thermoclineLayer5Permeability ( const DtVector &  localPosition) const
virtual

Visibility distance in meters.

const DtSimulationServices* DtWeatherStateProvider::simulationServices ( ) const
inline
std::vector<DtChord> DtWeatherStateProvider::segmentsIntersectingPrecipitationAreas ( const DtVector &  startPosition,
const DtVector &  endPosition,
const std::vector< DtSimObjectReference > &  weatherObjects,
double  tolerance 
) const
protected

Check if a query chord intersects a list of weather objects Return an ordered vector of intersection sub-chords along the query chord The sub-chords are ordered based on the distance to the query chord starting point.

void DtWeatherStateProvider::setPrecipitationStateForWeatherObjectsSegments ( const std::vector< DtChord > &  chordIntersectingSegments,
const std::vector< DtSimObjectReference > &  weatherObjects,
std::vector< PrecipitationStateSegment > &  precipitationStateSegments,
std::vector< DtChord > &  globalWeatherChordIntersectingSegments,
double  tolerance 
) const
protected

Set the precipitation data for chords segments intersecting with the weather objects. Returns the chord segments outside the weather objects - i.e. falling into the global weather area.

void DtWeatherStateProvider::setPrecipitationStateForGlobalWeatherSegments ( const DtVector &  startPosition,
const std::vector< DtChord > &  globalWeatherChordIntersectingSegments,
const std::vector< DtSimObjectReference > &  weatherObjects,
std::vector< PrecipitationStateSegment > &  precipitationStateSegments,
double  tolerance 
) const
protected

Set the precipitation data for chords segments falling into the global weather area.

  • i.e not intersecting with the weather objects.
std::vector<DtChord> DtWeatherStateProvider::segmentsIntersectingCloudLayers ( const DtVector &  startPosition,
const DtVector &  endPosition,
const std::vector< DtSimObjectReference > &  weatherObjects,
double  tolerance 
) const
protected

Check if a query chord intersects the cloud layers within a list of weather objects Return an ordered vector of intersection sub-chords along the query chord The sub-chords are ordered based on the distance to the query chord starting point.

void DtWeatherStateProvider::setCloudStateForWeatherObjectsSegments ( const std::vector< DtChord > &  chordIntersectingSegments,
const std::vector< DtSimObjectReference > &  weatherObjects,
std::vector< CloudStateSegment > &  cloudStateSegments,
std::vector< DtChord > &  globalWeatherChordIntersectingSegments,
double  tolerance 
) const
protected

Set the cloud data for chords segments intersecting with the cloud layers within a list of weather objects. Returns the chord segments outside the weather objects - i.e. falling into the global weather area.

void DtWeatherStateProvider::setCloudStateForGlobalWeatherSegments ( const DtVector &  startPosition,
const std::vector< DtChord > &  globalWeatherChordIntersectingSegments,
const std::vector< DtSimObjectReference > &  weatherObjects,
std::vector< CloudStateSegment > &  cloudStateSegments,
double  tolerance 
) const
protected

Set the cloud data for chords segments falling into the global weather area.

  • i.e not intersecting with the cloud layers within a list of weather objects.
bool DtWeatherStateProvider::chordIntersectsExtent ( const DtChord chord,
const DtExtent extent,
DtPoint intersectionEntryPoint,
DtPoint intersectionExitPoint,
bool chordPt0InExtent,
bool chordPt1InExtent 
) const
protected

Check if a chord intersects or is contained entirely or partially within extent Return the intersection two end points Return flags indicating if the chord end points are within the extent.

virtual double DtWeatherStateProvider::defaultCloudVisibility ( ) const
protectedvirtual

The visibility in clouds. Default value is 45m, taken from Table 8 in Collins, "Military Geography for Professionals and the Public", p. 74; for dense fog.

Member Data Documentation

const DtSimulationServices* DtWeatherStateProvider::mySimulationServices
protected
double DtWeatherStateProvider::myKoschmiederConstant
protected


Constants for physical calculations that are computed from other constants, and cached to avoid recomputation.

Constant used to calculate visibility range from attenuation coefficient, and vice versa. Calculated from visual detection minimum contrast ratio.(see https://en.wikipedia.org/wiki/Visibility)


The documentation for this class was generated from the following file:

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)