VR-Forces 4.10 Class Documentation
 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. More...

Inheritance diagram for DtWeatherStateProvider:
Inheritance graph
[legend]

Public Member Functions

 DtWeatherStateProvider (const DtSimManager *simManager)
 constructor More...
 
virtual ~DtWeatherStateProvider ()
 destructor More...
 
virtual bool init ()
 This is called by the environmental state manager immediately after it creates a weather state provider. More...
 
virtual void tick ()
 Called by DtEnvironmentalStateManager::tick(). More...
 
virtual const DtSimManagersimManager () const
 
Atmosphere
virtual std::vector
< CloudStateSegment
cloudLayers (const DtVector &localPosition) const
 Provides descriptions of each cloud layer. More...
 
virtual double airVisibility (const DtVector &localPosition) const
 Visibility of just the air (without clouds or precipitation). More...
 
virtual double visibility (const DtVector &localPosition) const
 Visibility in meters. More...
 
virtual int visibilityObscurant (const DtVector &localPosition) const
 Visibility obscurant at the given position. More...
 
virtual double averageVisibilityOnChord (const DtChord &path) const
 Average visibility value along the given chord. More...
 
virtual double airTemperatureAtAltitude (const double mslTemperature, const double altitude) const
 Air temperature at an altitude, given the MSL temperature. More...
 
virtual double airTemperature (const DtVector &localPosition) const
 Air temperature in degrees C at the given 3D location. More...
 
virtual double mslTemperatureFromAirTemperatureAtAltitude (const double airTemperature, const double altitude) const
 Return MSL temperature, given an air temperature at a specific altitude. More...
 
virtual double airPressureAtAltitude (const double mslPressure, const double altitude, const double mslTemperature) const
 Air pressure at an altitude, given the MSL pressure and MSL temperature. More...
 
virtual double airPressure (const DtVector &localPosition) const
 Air pressure at the given 3D location. More...
 
virtual double mslPressureFromAirPressureAtAltitude (const double airPressure, const double altitude, const double mslTemperature) const
 Return MSL temperature, given an air temperature at a specific altitude and the msl temperature. More...
 
virtual double airTemperatureAltitude (const DtVector &localPosition) const
 Air temperature altitude in meters. More...
 
virtual double airPressureAltitude (const DtVector &localPosition) const
 Air pressure altitude in meters. More...
 
virtual bool airTemperatureAltitudeIsSeaLevel (const DtVector &localPosition) const
 Air temperature altitude is sea level flag. More...
 
virtual bool airPressureAltitudeIsSeaLevel (const DtVector &localPosition) const
 Air pressure altitude is sea level flag. More...
 
virtual double humidity (const DtVector &localPosition) const
 Humidity in ppmv. More...
 
virtual double relativeHumidity (const DtVector &localPosition) const
 Percentage humidity. More...
 
virtual double windSpeed (const DtVector &localPosition) const
 Wind speed in mps. More...
 
virtual double windDirection (const DtVector &localPosition) const
 Wind heading in radians. More...
 
virtual bool windSpeedAndDirectionAtAltitude (const DtVector &localPosition, double altMSL, double &windSpeed, double &windDiection) const
 Gets both wind speed and direction. More...
 
virtual bool visibilityAndObscurantAtAltitude (const DtVector &localPosition, double altMSL, double &visibility, int &obscurant) const
 Gets both visibility and obscurant. More...
 
virtual DtVrfTurbulenceLevel airTurbulence (const DtVector &localPosition) const
 Turbulence level. More...
 
virtual void lineQueryAtmosphericState (const DtVector &startPosition, const DtVector &endPosition, double minSegmentLength, size_t maxSegmentCount, std::vector< AtmosphericStateSegment > &atmosphericStateSegments) const
 Query the atmospheric state along a line. More...
 
virtual void lineQueryCloudState (const DtVector &startPosition, const DtVector &endPosition, std::vector< CloudStateSegment > &cloudStateSegments, double tolerance=5.0) const
 Query the cloud layers state along a line. More...
 
virtual bool lightningPresent (const DtVector &localPosition) const
 Returns whether lightning is present. More...
 
Precipitation

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

virtual double precipitationIntensity (const DtVector &localPosition) const
 Returns mm/hr precipitation. More...
 
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
 Query the precipitation state along a line. More...
 
Illumination
virtual double illuminationFromSky (const DtVector &localPosition) const
 Illumination only from sun, moon, and stars. More...
 
virtual double illuminationAtTime (const DtVector &localPosition, const double dateTime) const
 This version of the illumination function calculates the light from sun/moon/stars at an arbitrary date-time. More...
 
Water
virtual double underwaterVisibility (const DtVector &localPosition) const
 Visibility distance in meters. More...
 
virtual double averageWaterVisibilityOnChord (const DtChord &path) const
 Provides a visibility value that can be used for sensing along the chord (e.g., computing loss of contrast). More...
 
virtual double waterCurrentSpeed (const DtVector &localPosition) const
 
virtual double waterCurrentDirection (const DtVector &localPosition) const
 
virtual double waterTemperature (const DtVector &localPosition) const
 Heading in radians. More...
 
virtual double tidalOffset (const DtVector &localPosition) const
 Tidal offset in meters above the water surface in the database. More...
 
virtual bool tidalDirection (const DtVector &localPosition) const
 If T, tide is giong in; F = tide is going out. More...
 
virtual unsigned int swellState (const DtVector &localPosition) const
 Swell state according to the Douglas Sea Scale (integer 0 - 9) More...
 
virtual double swellDirection (const DtVector &localPosition) const
 
virtual unsigned int seaState (const DtVector &localPosition) const
 Heading in radians. More...
 
virtual double seaDirection (const DtVector &localPosition) const
 
virtual double choppiness (const DtVector &localPosition) const
 Heading in radians. More...
 
virtual double surgeDepth (const DtVector &localPosition) const
 Meters. More...
 
virtual double thermoclineLayer1Depth (const DtVector &localPosition) const
 Depths are the depth of the top of the thermocline. More...
 
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 DtSimManager *simMgr)
 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. More...
 

Protected Member Functions

std::vector< DtPointchordIntersectsPointsPrecipitationAreas (const DtVector &startPosition, const DtVector &endPosition, const std::vector< DtSharedVrfObjectReference > &weatherObjects) const
 Check if a chord intersects a list of weather objects Return an ordered vector of intersection points along the chord The points are ordered based on the distance to the chord starting point. More...
 
void setChordPrecipitationStateWeatherObjects (const std::vector< DtPoint > &chordIntersectingPoints, const std::vector< DtSharedVrfObjectReference > &weatherObjects, std::vector< PrecipitationStateSegment > &precipitationStateSegments, std::vector< DtChord > &globalWeatherChordSegments, double tolerance=5.0) const
 Set the precipitation data for chords segments intersecting with the weather objects. More...
 
void setChordPrecipitationStateGlobalWeather (const DtPoint &startPosition, const std::vector< DtChord > &globalWeatherChordSegments, const std::vector< DtSharedVrfObjectReference > &weatherObjects, std::vector< PrecipitationStateSegment > &precipitationStateSegments) const
 Set the precipitation data for chords segments falling into the global weather area. More...
 
std::vector< DtPointchordIntersectsPointsCloudLayers (const DtVector &startPosition, const DtVector &endPosition, const std::vector< DtSharedVrfObjectReference > &weatherObjects) const
 Check if a chord intersects the cloud layers within a list of weather objects Return an ordered vector of intersection points along the chord The points are ordered based on the distance to the chord starting point. More...
 
void setChordCloudStateWeatherObjects (const std::vector< DtPoint > &chordIntersectingPoints, const std::vector< DtSharedVrfObjectReference > &weatherObjects, std::vector< CloudStateSegment > &cloudStateSegments, std::vector< DtChord > &globalWeatherChordSegments, double tolerance=5.0) const
 Set the cloud data for chords segments intersecting with the cloud layers within a list of weather objects. More...
 
void setChordCloudStateGlobalWeather (const DtPoint &startPosition, const std::vector< DtChord > &globalWeatherChordSegments, const std::vector< DtSharedVrfObjectReference > &weatherObjects, std::vector< CloudStateSegment > &cloudStateSegments) const
 Set the cloud data for chords segments falling into the global weather area. More...
 
bool chordIntersectsExtent (const DtChord &chord, const DtExtent &extent, DtVector &intersectionPosition, double &intersectionLengt) const
 Check if a chord intersects or is contained entirely or partially within extent Return the starting intersection point between the chord and the extent, and the length of the cord segment intersecting with the extent. More...
 
bool chordIntersectsExtent (const DtChord &chord, const DtExtent &extent, DtPoint &intersectionEntryPoint, DtPoint &intersectionExitPoint) const
 Check if a chord intersects or is contained entirely or partially within extent Return the intersection two end points. More...
 
virtual double defaultCloudVisibility () const
 The visibility in clouds. More...
 

Protected Attributes

const DtSimManagermySimManager
 
double myKoschmiederConstant
 

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

 

Private Member Functions

 DtWeatherStateProvider (const DtWeatherStateProvider &orig)
 Not implemented. More...
 
const DtWeatherStateProvideroperator= (const DtWeatherStateProvider &orig)
 
 DtWeatherStateProvider ()
 

Detailed Description

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.

Constructor & Destructor Documentation

DtWeatherStateProvider::DtWeatherStateProvider ( const DtWeatherStateProvider orig)
private

Not implemented.

DtWeatherStateProvider::DtWeatherStateProvider ( )
private
DtWeatherStateProvider::DtWeatherStateProvider ( const DtSimManager simManager)

constructor

virtual DtWeatherStateProvider::~DtWeatherStateProvider ( )
virtual

destructor

Member Function Documentation

const DtWeatherStateProvider& DtWeatherStateProvider::operator= ( const DtWeatherStateProvider orig)
private
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 DtSimManager* DtWeatherStateProvider::simManager ( ) const
virtual
static DtWeatherStateProvider* DtWeatherStateProvider::creator ( const DtSimManager 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 bool DtWeatherStateProvider::airTemperatureAltitudeIsSeaLevel ( const DtVector localPosition) const
virtual

Air temperature altitude is sea level flag.

virtual bool DtWeatherStateProvider::airPressureAltitudeIsSeaLevel ( const DtVector localPosition) const
virtual

Air pressure altitude is sea level flag.

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 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.

Parameters
Input
startPositionthe coordinates of the query line's starting point.
endPositionthe coordinates of the query line's end point.
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 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
virtual DtVrfWeatherPrecipitationType DtWeatherStateProvider::precipitationType ( const DtVector localPosition) const
virtual
virtual double DtWeatherStateProvider::snowAccumulationDepth ( const DtVector localPosition) const
virtual
virtual double DtWeatherStateProvider::snowDepthOnRoads ( const DtVector localPosition) const
virtual
virtual double DtWeatherStateProvider::rainAccumulationDepth ( const DtVector localPosition) const
virtual
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.

Parameters
Input
startPositionthe coordinates of the query line's starting point.
endPositionthe coordinates of the query line's end point.
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
virtual double DtWeatherStateProvider::waterCurrentDirection ( const DtVector localPosition) const
virtual
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 bool DtWeatherStateProvider::tidalDirection ( const DtVector localPosition) const
virtual

If T, tide is giong in; F = tide is going out.

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
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
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::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
virtual double DtWeatherStateProvider::thermoclineLayer2Depth ( const DtVector localPosition) const
virtual
virtual double DtWeatherStateProvider::thermoclineLayer2Permeability ( const DtVector localPosition) const
virtual
virtual double DtWeatherStateProvider::thermoclineLayer3Depth ( const DtVector localPosition) const
virtual
virtual double DtWeatherStateProvider::thermoclineLayer3Permeability ( const DtVector localPosition) const
virtual
virtual double DtWeatherStateProvider::thermoclineLayer4Depth ( const DtVector localPosition) const
virtual
virtual double DtWeatherStateProvider::thermoclineLayer4Permeability ( const DtVector localPosition) const
virtual
virtual double DtWeatherStateProvider::thermoclineLayer5Depth ( const DtVector localPosition) const
virtual
virtual double DtWeatherStateProvider::thermoclineLayer5Permeability ( const DtVector localPosition) const
virtual
std::vector<DtPoint> DtWeatherStateProvider::chordIntersectsPointsPrecipitationAreas ( const DtVector startPosition,
const DtVector endPosition,
const std::vector< DtSharedVrfObjectReference > &  weatherObjects 
) const
protected

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

void DtWeatherStateProvider::setChordPrecipitationStateWeatherObjects ( const std::vector< DtPoint > &  chordIntersectingPoints,
const std::vector< DtSharedVrfObjectReference > &  weatherObjects,
std::vector< PrecipitationStateSegment > &  precipitationStateSegments,
std::vector< DtChord > &  globalWeatherChordSegments,
double  tolerance = 5.0 
) 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::setChordPrecipitationStateGlobalWeather ( const DtPoint startPosition,
const std::vector< DtChord > &  globalWeatherChordSegments,
const std::vector< DtSharedVrfObjectReference > &  weatherObjects,
std::vector< PrecipitationStateSegment > &  precipitationStateSegments 
) 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<DtPoint> DtWeatherStateProvider::chordIntersectsPointsCloudLayers ( const DtVector startPosition,
const DtVector endPosition,
const std::vector< DtSharedVrfObjectReference > &  weatherObjects 
) const
protected

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

void DtWeatherStateProvider::setChordCloudStateWeatherObjects ( const std::vector< DtPoint > &  chordIntersectingPoints,
const std::vector< DtSharedVrfObjectReference > &  weatherObjects,
std::vector< CloudStateSegment > &  cloudStateSegments,
std::vector< DtChord > &  globalWeatherChordSegments,
double  tolerance = 5.0 
) 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::setChordCloudStateGlobalWeather ( const DtPoint startPosition,
const std::vector< DtChord > &  globalWeatherChordSegments,
const std::vector< DtSharedVrfObjectReference > &  weatherObjects,
std::vector< CloudStateSegment > &  cloudStateSegments 
) 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,
DtVector intersectionPosition,
double intersectionLengt 
) const
protected

Check if a chord intersects or is contained entirely or partially within extent Return the starting intersection point between the chord and the extent, and the length of the cord segment intersecting with the extent.

bool DtWeatherStateProvider::chordIntersectsExtent ( const DtChord chord,
const DtExtent extent,
DtPoint intersectionEntryPoint,
DtPoint intersectionExitPoint 
) const
protected

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

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 DtSimManager* DtWeatherStateProvider::mySimManager
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 Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)