VR-Vantage 3.0 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
ssEnvironment Class Reference

class wrapper for metin and light sources in SigSim library for scene generation More...

Classes

struct  VisibilityRangeStruct
 structure with visibility range information. More...

Public Types

enum  ModtranAtmModel {
  Tropical = 1, MidLatitudeSummer = 2, MidLatitudeWinter = 3, SubArcticSummer = 4,
  SubArcticWinter = 5, USStandard = 6, UserDefinedAtm = 7
}
 Atmosphere models defined by MODTRAN. More...
enum  ModtranHazeModel {
  NoAerosol = -1, NoHaze = 0, Rural_23km = 1, Rural_5km = 2,
  NavyMaritime = 3, Maritime_32km = 4, Urban_5km = 5, Tropospheric_50km = 6,
  UserDefine = 7, Fog_200m = 8, Fog_500m = 9, Desert = 10
}
 Haze models defined by MODTRAN. More...
enum  ModtranSeason { AutoSelect = 0, Summer = 1, Winter = 2 }
 Season defined by MODTRAN. More...
enum  ModtranClouds {
  NoClouds = 0, Cumulus = 1, Altostratus = 2, Stratus = 3,
  Stratocumulus = 4, Nimbostratus = 5, Stratus_Drizzle = 6, Nimbostratus_Light = 7,
  Nimbostratus_Moderate = 8, Cumulus_Heavy = 9, Cumulus_Extreme = 10, Standard_Cirrus = 18,
  Subvisual_Cirrus = 19
}
 Clouds defined by MODTRAN. More...

Public Member Functions

 ssEnvironment ()
 constructor
 ~ssEnvironment ()
 destructor
bool updateAtmospherics (ssSensor *sensor, double sensorAltitude=500.0, bool checkReload=true)
 This is the main method that goes thru and updates atmospheric and light source state data for a sensor.
float * getLightSourceData (ssSensor *sensor, unsigned int &x, unsigned int &y, unsigned int &c)
 gets the current source irradiance data for a sensor there are 4 floating point components per table location the first is the ambient light component the second is the diffuse or directional light component the 3rd is the specular directional component the 4th is the earth shine directional component the 5th is the sky shine directional component
ssAtmosphericTablegetSensorAtmosphericTablePointer (ssSensor *sensor)
 Gets the atmospheric data table pointer for a particular sensor.
float * getSensorAtmosphericData (ssSensor *sensor, unsigned int &x, unsigned int &y, unsigned int &z, unsigned int &bins, unsigned int &comp)
 gets current atmospheric data for a sensor that provides the fog density and color for any point in space based on the geodetic position on the earth using a layered Modtran atmosphere model.
float * getSunDiskRadiance (ssSensor *sensor, unsigned int &bins)
 gets the spectral radiance for the sun disk at the top of atmosphere used to render the sun disk at the appropriate radiance level.
float * getMoonDiskRadiance (ssSensor *sensor, unsigned int &bins)
 gets the spectral radiance for the moon disk at the top of atmosphere used to render the moon disk at the appropriate radiance level.
float * getManMadeLightData (ssSensor *sensor, unsigned int &numLights, unsigned int &bins)
 gets the spectral radiance for all the defined man-made light source scaled by maxRadiance
int getNumberManMadeLights ()
 gets the number of man-made light sources defined in the atm/mm_lsources.dat file
double getManMadeLightRadiance (ssSensor *sensor, int lightNum)
 gets the passband radiance for a particular man-made light source
void setDate (unsigned int day, unsigned int month, unsigned int year)
 sets the current date
void getDate (unsigned int &day, unsigned int &month, unsigned int &year)
 gets the current date
void setTimeOfDay (double tod)
 set current time of day as 0.0 to 24.0
double getTimeOfDay ()
 get current time of day as 0.0 to 24.0
JRMTIME getJRMTimeOfDay ()
 get current time of day as 0.0 to 24.0
void setJRMTimeOfDay (JRMTIME time)
 set current time of day as 0.0 to 24.0
void setAtmosphereStateFile (const char *name)
 sets the atmospheric state file name for use with a user defined atmosphere
char * getAtmosphereStateFile ()
 gets the atmospheric state file name for use with a user defined atmosphere
void setNightSkyTableFile (char *name)
 sets the night sky table file name such as atm/stellar_sky.ir that defines the stars and/or planets
char * getNightSkyTableFile ()
 gets the night sky table file name such as atm/stellar_sky.ir that defines the stars and/or planets
void setAirGroundTempCalcMode (bool Calc_Ta_Tback)
 Set air and ground temperature calculation mode.
bool getAirGroundTempCalcMode ()
 Get air and ground temperature calculation mode.
void setMaxDiurnalTemperature (double tempMax)
 Set highest temperature for current date and position.
void setMinDiurnalTemperature (double tempMin)
 Set lowest temperature for current date and position.
double getMaxDiurnalTemperature ()
 get highest temperature for current date and position
double getMinDiurnalTemperature ()
 get lowest temperature for current date and position
void setCurrentAirTemperature (double Ta)
 Set current air temperature for use in calculating the Modtran atmosphere.
double getCurrentAirTemperature ()
 Get current air temperature for use in calculating the Modtran atmosphere.
void setAirModelOption (int air_model_option)
int setUserDefinedAirTemperatures (int numberIntervals, double *airTemperature)
 This method sets the user-defined air temperatures use by thermal solvers.
int setUserDefinedAirTemperatures (int numberIntervals, double *airTemperature, double *timeOfDays)
 This method sets the user-defined air temperatures use by thermal solvers.
bool isUserDefinedAirTemperature ()
 Indicates whether user defined air temperatures are being used by the thermal solver.
void disableUserDefinedAirTemperature ()
 Turns off the use of user defined air temperatures.
void setModtranAtmModel (const ModtranAtmModel model)
 set the Modtran atmosphere model
ModtranAtmModel getModtranAtmModel ()
 get the Modtran atmosphere model
void setModtranHazeModel (const ModtranHazeModel haze)
 set the Modtran haze model
ModtranHazeModel getModtranHazeModel ()
 get the Modtran haze model
void setModtranSeason (const ModtranSeason season)
 set the Modtran season
ModtranSeason getModtranSeason ()
 get the Modtran season
void setModtranVisibility (double vis)
 set the modtran visibility
double getModtranVisibility ()
 get the modtran visibility
void setWindVelocity (double windVelocity)
 set Modtran wind speed or velocity
double getWindVelocity ()
 get Modtran wind speed or velocity
void setWindDirection (double EofN)
 set direction from which wind is blowing [deg] East of North
double getWindDirection ()
 get direction from which wind is blowing [deg] East of North
void setRelativeHumidity (double relative_humidity)
 set the relative humidity
double getRelativeHumidity ()
 get the relative humidity
void setGroundTemperature (double Tbackground)
 set the general ground temperature for background calcs
double getGroundTemperature ()
 get the general ground temperature for background calcs
void setAtmosphericPressure (double Pressure)
 set the Air pressure at surface.
double getAtmosphericPressure ()
 get the Air pressure at surface.
void setModtranClouds (const ModtranClouds clouds)
 sets the Modtran cloud type (c2Icld)
void setCloudParameters (int numCloudLayers, float thickness, float baseAltitude, float extinctionScale, float waterDensity)
 Sets the Modtran c2a parameters: c2aNcralt, c2aCthik, c2aCalt, c2aCext, c2aCcolwd m_metinPtr->mc.c2aCthik = thickness; // Cloud vertical thickness [km], or <0=use default (or user-spec in 2E1 if c2aNcralt>3) m_metinPtr->mc.c2aCalt = baseAltitude; // Cloud base altitude [km], or <0=use default (or user-spec in 2E1 if c2aNcralt>3) m_metinPtr->mc.c2aCext = extinctionScale; // [<=0] = do not scale extinction coeffs, [>0]=cloud H2O vert extinction [km-1] m_metinPtr->mc.c2aCcolwd = waterDensity; // Water droplet vertical column density [km g/m3], or if [<], do not scale.
void setCloudLayerParameters (int layer, float altitude, float waterDensity, float iceDensity, float rainRate)
 Sets the Modtran c2e1 parameters for a layer: c2e1ZCLD, c2e1CLD, c2e1CLDICE, c2e1RR layer goes from 0 to numCloudLayers - 1 m_metinPtr->mc.c2e1ZCLD[layer] = altitude; // User-defined cloud altitude [km] above ground m_metinPtr->mc.c2e1CLD[layer] = waterDensity; // User-defined cloud liquid water density [g/m3] at c2e1ZCLD alt.
void setCloudLayerParameters (int layer, float altitude, float visibility)
 Sets the Modtran c2e1 parameters for a layer: c2e1ZCLD, c2e1CLD, c2e1CLDICE, c2e1RR layer goes from 0 to numCloudLayers - 1.
ModtranClouds getModtranClouds ()
void getCloudParameters (int &numCloudLayers, float &thickness, float &baseAltitude, float &extinctionScale, float &waterDensity)
 gets the Modtran c2a parameters: c2aNcralt, c2aCthik, c2aCalt, c2aCext, c2aCcolwd
void getCloudLayerParameters (int layer, float &altitude, float &waterDensity, float &iceDensity, float &rainRate)
 Sets the Modtran c2e1 parameters for a layer: c2e1ZCLD, c2e1CLD, c2e1CLDICE, c2e1RR.
void setGeodeticOrigin (double lat, double lon)
 set scenario latitude and longitude in degrees
void getGeodeticOrigin (double &lat, double &lon)
 get scenario latitude and longitude in degrees
void setUpdateTime ()
 description: sets the update time to the current time and date.
bool isDayTime ()
 Returns true if it is day time.
void setUseSun (bool flag)
 set flag to use the sun for the lighting and atmospheric calculations otherwise use the moon.
bool isUsingSun ()
 returns true if using the sun for the lighting and atmospheric calculations otherwise returns false if using the moon.
void setUseBothSunMoon (bool flag)
 set flag to use the sun and moon for the lighting and atmospheric calculations otherwise use the sun or moon depending on the m_useSun flag
bool getUseBothSunMoon ()
 get flag to use the sun and moon for the lighting and atmospheric calculations otherwise use the sun or moon depending on the m_useSun flag
double getNightTimeConstant ()
 Returns the constant C for GPU ENVELOPE_MODE2 temperature equation Tsurf = Tbase + dTcos * fmax( fmax(norm*sunvec,0), C*(1 - fmax(norm*sunmax,0)) ).
double getSkyAngleFactor ()
 Returns the constant ratio between horizon-looking sky irradiance and upward-looking sky irradiance.
void getSunMaxPosition (double &i, double &j, double &k)
 Returns the sun position at local noon - coord sys is ENU.
void getSunPlaneVectorENU (double &i, double &j, double &k)
 Reads the METIN structure to get the SEU sunplane vector, and translates it to ENU.
void getSunPosition (double &i, double &j, double &k)
 Returns the sun position - coord sys is ENU.
void getMoonPosition (double &i, double &j, double &k)
 Returns the moon position - coord sys is ENU.
bool getSunMoonPosition (double &i, double &j, double &k)
 Returns either the sun or the moon position depending on whether it is night or day - coord sys is ENU.
double getMoonPhase ()
 Returns the moon phase 0=new, 1=quarter moon, 2=half, 3=3/4 full moon, 4=full moon.
void getStarPosition (int starNum, double &i, double &j, double &k, double &temperature, double &attenuation)
 Returns the star position for the requested star.
void getStarPositionRadiance (ssSensor *sensor, int starNum, double &i, double &j, double &k, double &radiance)
 Returns the star position and scaled radiance for the requested star.
void initMaxStarParameters (ssSensor *sensor, double maxSize=5.0, int starNum=-1)
 Initializes the maximum star parameters for scaling the light point size typically it is Polaris, the North Star - starNum of -1 will choose the North Star from the stellar_sky.ir file.
double getMaxStarRadiance ()
 get the radiance of the maximum star.
void getStarPositionRadiance (ssSensor *sensor, int starNum, double &i, double &j, double &k, double &radiance, double &size)
 Returns the star position and scaled radiance for the requested star.
unsigned int getNumberStars ()
 Returns the number of stars.
unsigned int getNumberWavelengths ()
 get the number of wavelength bins covering the Metin spectrum from 0.25 to 25 um
double * getWavelengthsArray ()
 get the non-uniform wavelength array covering the Metin spectrum from 0.25 to 25 um All wavelengths specified are at center of wavelength bin.
long getJulianDate ()
 Get the julian date corresponding to the current date.
void setUpdateBuffer (double hours)
 sets the update interval used as time buffer for environment updates defaults to 5 minutes.
double getUpdateBuffer ()
 gets the update interval
void setSpectralMode (bool flag)
 set the spectral mode flag.
bool isSpectralMode ()
 returns true if spectral mode is selected.
void setAtmEnable (bool flag)
 sets the atmosphere enable parameter to turn atmosphere processing on/off This causes the atmospheric update to be much faster because the atm table is not regenerated.
bool isAtmEnable ()
 returns true is atmosphere processing is on
void setScatterEnable (bool flag)
 sets the scattering enable parameter to turn scattering processing on/off in the shader This causes the atmospheric update to be much faster because the scattering calculations are skipped.
bool isScatterEnable ()
 returns true is atmospheric scattering processing is on
void setMultiScatterEnable (bool flag)
 sets the scattering enable parameter to turn multiple scattering processing on/off in the shader This causes the atmospheric update to be much faster because the multiple scattering calculations are skipped.
bool isMultiScatterEnable ()
 returns true is atmospheric multiple scattering processing is on
void setRoundEarth (bool flag)
 sets the scattering enable parameter to turn round earth processing on/off in the shader With round earth enabled, each line of sight used to generated the atm table is adjusted for the curvature of the earth giving a more accurate result, but it does add to the regeneration time.
bool isRoundEarth ()
void setAtmExtinctionScale (float scale)
 set the atmospheric extinction scale.
float getAtmExtinctionScale ()
 get the atmospheric extinction scale.
void setAtmAmbientLightScale (float scale)
 set the atmospheric Ambient Light scale.
float getAtmAmbientLightScale ()
 get the atmospheric Ambient Light scale.
void setAtmSkyScale (float scale)
 set the atm sky scale factor to adjust the IR sky temperature
float getAtmSkyScale ()
 get the atm sky scale factor to adjust the IR sky temperature
void setNumberRanges (unsigned int ranges)
 set number of texture Ranges
unsigned int getNumberRanges ()
 get number of texture Ranges used by the atm table.
void setNumberObjectAltitudes (unsigned int alts)
 set number of object altitudes Used by the atm and light source tables for the object altitude dimension.
unsigned int getNumberObjectAltitudes ()
 get number of object altitudes
unsigned getNumberObjectAngles ()
 get number of object angles
void setNumberObjectAngles (unsigned int angles)
 set number of angles
unsigned int getNumberScatAngles ()
 get number of scatter angles
void setNumberScatAngles (unsigned int angles)
 set number of scatter angles
void setNumberSensorAltitudes (unsigned int alts)
 set number of altitudes Used by the atm table for the sensor altitude dimension.
unsigned int getNumberSensorAltitudes ()
 get number of altitudes
void setMaxRange (double range)
 sets the max environment range or the sky dome radius Used by the atm table for the range dimension.
double getMaxRange ()
 gets the max environment range or the sky dome radius
void setMaxAltitude (double maximum)
 set maximum altitude for both the sensor and object altitude dimensions of the atm table.
double getMaxAltitude ()
 get maximum altitude for both the sensor and object altitude dimensions of the atm table.
double getRangeScale ()
 get inverse maximum Range scaled by the number of ranges
double getObjectAltitudeScale ()
 get inverse of maximum object altitude scaled by number of object altitudes
double getRainRate ()
 get Rain rate [mm/hr], or [<=0] if using user-defined rain rate in card2E1.
void setRainRate (double rate)
 set Rain rate [mm/hr], or [<=0] if using user-defined rain rate in card2E1.
double getRainTemp ()
 get rain temperature [degC]
void setRainTemp (double temp)
 set rain temperature [degC]
double getSensorAltitudeScale ()
 get inverse of maximum sensor altitude scaled by number of sensor altitudes
void setUpdateInterval (double deltaHours)
 set the update interval used by the thermal solver to generate new temperatures
double getUpdateInterval ()
 get the update interval used by the thermal solver to generate new temperatures
void getSensorPolarATMLUTData (ssSensor *sensor, unsigned int &numSensAlts, unsigned int &numObjAngles, unsigned int &numScatAngles, unsigned int &numBins, float **xmitData, float **pradData, float **sradData, float **mradData)
 Gets the atmospheric data for a particular sensor.
void getSensorMaxOptDepth (ssSensor *sensor, unsigned int &numBins, float **maxOptDepth)
 Gets the max optical depth for a particular sensor.
bool isMBNATM (ssSensor *sensor)
 Tells whether the ATM LUT is modified B&N mode or original rectangular mode.
void getTransmission (ssSensor *sensor, double sensorGeoC[3], double sensorOrient[3], double entityGeoC[3], double **transmission, double **pathRadiance, double **scatterRadiance)
 gets the transmission properties of a LOS between a sensor and an object.
void getTransmission (ssSensor *sensor, double objectAlt, double objectRange, double **transmission, double **pathRadiance, double **scatterRadiance)
 gets the transmission properties of a LOS between a sensor and an object.
void getAtmTableTransmission (ssSensor *sensor, double objectAlt, double objectRange, double &transmission, double &pathRadiance)
 Gets the transmission properties of a LOS between a sensor and an object from the sensor's atmospheric table.
void getLightSourceTableIrradiances (ssSensor *sensor, double objectAlt, double &ambientIrradiance, double &diffuseIrradiance)
 Gets the passband irradiance values for an object from the sensor's Light Source table.
double saveRangeTransCompare (ssSensor *sensor, double objectAlt)
 compare the SigSimC and SigSimRT atmospherics.
void setGenerateFastDiurnalCache (bool flag)
 set the diurnal cache method to use the fast version that uses the ssAtmospheric table information rather than the SigSim version.
bool isGenerateFastDiurnalCache ()
 returns true if the fast diurnal cache method is to be used.
void setWaterVaporPartialPressureScaleFactor (double wvpp)
double getWaterVaporPartialPressureForCurrentTimeOfDay ()
double findClosestDefaultWaterVaporPartialPressure (char *sigsim_data_dir, double wvpp)
void setSeasonBasedOnLocation ()
 Set the season used by Modtran using the current location.
int useModcardParamsToGenerateCorrespondingATMState (char *sigsim_data_dir, char *outfilebasename)
 This method takes the current settings in the MODCARD structure and generates a new asc and mcd file accordingly.
bool getEnvIrradianceRatios (double &EsundirRatio, double &EsundifRatio, double &EskyRatio, double &EearthRatio)
 description: Reads the environmental cache for the current tod and returns irradiances divided by sum of irradiances.
bool getEnvIrradianceAverageRatios (double &EsundirAveRatio, double &EsundifAveRatio, double &EskyAveRatio, double &EearthAveRatio)
 description: Reads the environmental cache for the current tod and returns irradiance averages divided by sum of irradiances.
METINgetMetinPtr ()
 gets the SigSim Metin pointer WARNING: This method will be moved to private in an upcoming release to avoid the possibilty of users corrupting the underlining data structure which is used in SigSim.
bool isAtmosphereDirty ()
 returns true if the atmosphere needs to be updated
void setAtmosphereDirty ()
 indicates that atmosphere needs to be updated
void setUseUpdateButton (bool flag)
 tell ssEnvironment whether update button is used
bool isUseUpdateButton ()
 return whether the update button is used or not
void setUpdateButtonPressed (bool flag)
 Tell ssEnvironment that the update button has been pressed.
bool isUpdateButtonPressed ()
 has the update button been pressed?
void setVisibilityRangeEnable (bool state)
 generate a Modtran based lookup table of visible range in the different sensor bands
void initVisibilityRange (SigSimRT *ss)
 generate a sensor based lookup table for the modtran derived maximum ranges
void releaseVisibilityRange ()
 release the visibility range lookup table
bool getVisibilityRange (float visibleRange, ssSensor *sensor, float &sensorRange, float cloudCoverage, bool isGroundFog, float &visiblityEmissionFactor)
 based on a visible range return the modtran derived range for the active sensor
void getCloudProperties (ssSensor *sensor, float &humidity, float &extinction, float &lightResponse, float &ambientLightResponse, float &secondaryLightResponse, float &density)
 prototype function to derive sensor band cloud characteristics based on the active sensor and the attributes from the visible band.

Private Member Functions

void interpolateEight (double fraction[3], double input1[8], double input2[8], double *output1, double *output2)
void setAutoLightLevel (ssSensor *sensor)
 sets the sensor's max light level based on the maximum or minimum irradiance thru out the diurnal cycle.
bool generateDiurnalCache ()
 generates the diurnal cache used by the thermal solver - this uses the ssAtmospheric table to quickly generate the diurnal cache
void loadDefaults ()
 fills SigSim's metin structure with default values
bool insertSensorAtmosphericTable (ssSensor *sensor)
 inserts a sensor atmospheric table into the sensor source map
void setJulianDate (long julian)
 set the julian date - user should use setDate
double timeHasChangedSinceLastUpdate ()
 Compares current time to the last update time returns 0.0 if current time is within the update interval as last update timeotherwise amount of change.
void clrAtmosphereDirty ()
 indicates that atmosphere has been updated
void setAtmosphereLutsDirty ()
 indicates that atmosphere luts need to be updated

Private Attributes

double m_maxRange
 sky dome radius in meters
unsigned int m_day
 current date
unsigned int m_month
unsigned int m_year
JRMTIME m_timeOfDay
 current time 0 - 24 hours
JRMTIME m_lastUpdate
double m_updateBuffer
 minimum time change in hours needed to engage change in time check
char m_nightSkyTableFile [SIGSIM_STRING_SIZE]
 SigSim night sky table file.
char m_atmosphereStateFile [SIGSIM_STRING_SIZE]
 SigSim atmosphere file.
double m_maxAltitude
 maximum altitude computed for atmosphere
METINm_metinPtr
 SigSim meterological info.
bool m_useSun
 use the sun for the lighting/atm calculations.
bool m_useBothSunMoon
 use the both the sun and moon for the lighting/atm calculations.
bool m_spectralMode
 spectral mode flag - set false for normal IG mode
bool m_atmEnable
 atmosphere enable master
bool m_scatterEnable
 scattering enable master
bool m_multiScatterEnable
 multi scattering enable master
bool m_roundEarth
 round earth enable master
bool m_dirty
 flag to determine if this atmospheric data needs to be updated.
bool m_geodeticLocationDirty
 flag to indicate that the geodetic location has changed to get sun/moon position to update.
bool m_generateFastDiurnalCache
 flag to determine if the fast diurnal cache should be used rather than the SigSim version
unsigned int m_numberRanges
 number of ranges in lut
unsigned int m_numObjectAltitudes
 number of object altitudes
unsigned int m_numObjectAngles
 number of object angles
unsigned int m_numSensorAltitudes
 number of sensor altitudes
unsigned int m_numScatAngles
 number of scatter angles
float m_atmExtinctionScale
 scale factor to increase/decrease the visiblity
float m_atmAmbientLightScale
 scale factor to increase/decrease the ambient light
float m_atmSkyScale
 scale factor to increase/decrease tm sky scale factor to adjust the IR sky temperature
bool m_isUserDefinedAirTemperature
 indicates whether to use user defined temperatures
bool m_useUpdateButton
bool m_updateButtonPressed
bool m_visibilityRangeEnable
VisibilityRangeStruct m_visibilityRange
double m_maxStarRadiance
double m_maxStarSize
Implementation * m_impl

Friends

class SigSimRT
class ssRadar
class ssMaterialSet

Detailed Description

class wrapper for metin and light sources in SigSim library for scene generation

Member Enumeration Documentation

Atmosphere models defined by MODTRAN.

Enumerator:
Tropical 
MidLatitudeSummer 
MidLatitudeWinter 
SubArcticSummer 
SubArcticWinter 
USStandard 
UserDefinedAtm 

Haze models defined by MODTRAN.

Enumerator:
NoAerosol 
NoHaze 
Rural_23km 
Rural_5km 
NavyMaritime 
Maritime_32km 
Urban_5km 
Tropospheric_50km 
UserDefine 
Fog_200m 
Fog_500m 
Desert 

Season defined by MODTRAN.

Enumerator:
AutoSelect 
Summer 
Winter 

Clouds defined by MODTRAN.

Enumerator:
NoClouds 
Cumulus 
Altostratus 
Stratus 
Stratocumulus 
Nimbostratus 
Stratus_Drizzle 
Nimbostratus_Light 
Nimbostratus_Moderate 
Cumulus_Heavy 
Cumulus_Extreme 
Standard_Cirrus 
Subvisual_Cirrus 

Constructor & Destructor Documentation

ssEnvironment::ssEnvironment ( )

constructor

ssEnvironment::~ssEnvironment ( )

destructor

Member Function Documentation

bool ssEnvironment::updateAtmospherics ( ssSensor sensor,
double  sensorAltitude = 500.0,
bool  checkReload = true 
)

This is the main method that goes thru and updates atmospheric and light source state data for a sensor.

The update only occurs if necessary due to a change in the environmental state such as the time of day or any change that causes a dirty atmosphere, sensor, or table. SigSim calls - GetLOSAtmospherics UpdateEnvironment

Parameters
sensor- sensor to update
sensorAltitude- if spectral mode only this sensor Altitude is used for the atm table.
checkReload- if using multiple sensors like rgb this forces a reload to occur.
Returns
bool - returns true if the update was necessary
float* ssEnvironment::getLightSourceData ( ssSensor sensor,
unsigned int x,
unsigned int y,
unsigned int c 
)

gets the current source irradiance data for a sensor there are 4 floating point components per table location the first is the ambient light component the second is the diffuse or directional light component the 3rd is the specular directional component the 4th is the earth shine directional component the 5th is the sky shine directional component

table is organized as float lightSourceData[y][x][comp]

Parameters
sensor
x- dimension in the x direction - number of spectral bins
y- dimension in the y direction - number of altitudes
c- number of components
Returns
*float - array of data
ssAtmosphericTable* ssEnvironment::getSensorAtmosphericTablePointer ( ssSensor sensor)

Gets the atmospheric data table pointer for a particular sensor.

Parameters
sensor- the pointer to the ssSensor
Returns
- ssAtmosphericTable pointer to sensor atmospheric data table
float* ssEnvironment::getSensorAtmosphericData ( ssSensor sensor,
unsigned int x,
unsigned int y,
unsigned int z,
unsigned int bins,
unsigned int comp 
)

gets current atmospheric data for a sensor that provides the fog density and color for any point in space based on the geodetic position on the earth using a layered Modtran atmosphere model.

there are 4 floating point components per table location 1) Square root of the fog density (the square root is used to increase the accuracy at long ranges) 2) fog color including scattering away from the sun (cosine = -1.0) 3) additional change in scattering color looking directly at the sun (cosine = 1.0) 4) exponential factor to match the scattering color when the cosine of the sun angle is 0.75

table is organized as float atmData[z][y][x][bins][comp]

Parameters
sensor
x- dimension in the x direction - number of ranges
y- dimension in the y direction - number of object altitudes
z- dimension in the z direction - number of sensor altitudes
bins- number of sets of components - number of spectral bins
comp- number of components
Returns
float
float* ssEnvironment::getSunDiskRadiance ( ssSensor sensor,
unsigned int bins 
)

gets the spectral radiance for the sun disk at the top of atmosphere used to render the sun disk at the appropriate radiance level.

Parameters
sensor
bins- number of wavelengths
Returns
float *[unitless - irradiance W/cm2 scaled by PI and maxRadiance]
float* ssEnvironment::getMoonDiskRadiance ( ssSensor sensor,
unsigned int bins 
)

gets the spectral radiance for the moon disk at the top of atmosphere used to render the moon disk at the appropriate radiance level.

Parameters
sensor
bins- number of wavelengths
Returns
float *[unitless - irradiance W/cm2 scaled by PI and maxRadiance]
float* ssEnvironment::getManMadeLightData ( ssSensor sensor,
unsigned int numLights,
unsigned int bins 
)

gets the spectral radiance for all the defined man-made light source scaled by maxRadiance

table is organized as float lightData[numLights][bins] - single component

Parameters
sensor
numLights- number of man made lights
bins- number of spectral bins
Returns
*float [unitless - radiance W/cm2/sr scaled by maxRadiance]
int ssEnvironment::getNumberManMadeLights ( )

gets the number of man-made light sources defined in the atm/mm_lsources.dat file

Returns
int number of defined man made light sources
double ssEnvironment::getManMadeLightRadiance ( ssSensor sensor,
int  lightNum 
)

gets the passband radiance for a particular man-made light source

  • scaled by maxRadiance
Parameters
sensor
lightNum- index into the mm light data
Returns
double [unitless - radiance W/cm2/sr scaled by maxRadiance]
void ssEnvironment::setDate ( unsigned int  day,
unsigned int  month,
unsigned int  year 
)

sets the current date

Parameters
day
month
year
void ssEnvironment::getDate ( unsigned int day,
unsigned int month,
unsigned int year 
)

gets the current date

Parameters
day
month
year
void ssEnvironment::setTimeOfDay ( double  tod)

set current time of day as 0.0 to 24.0

Parameters
tod[hours]. Time is in 0-23.99 hr format and corresponds to the local time at the given geodetic lat/lon, where every geodetic point in the same time zone has the same local time. The time zones are defined such that longitude 0 is in the center of a 15-degree time zone, such that every 15-degree longitudinal interval, starting at longitude 7.5, comprises another separate time zone.
double ssEnvironment::getTimeOfDay ( )

get current time of day as 0.0 to 24.0

Returns
double [hours]. Time is in 0-23.99 hr format and corresponds to the local time at the given geodetic lat/lon, where every geodetic point in the same time zone has the same local time. The time zones are defined such that longitude 0 is in the center of a 15-degree time zone, such that every 15-degree longitudinal interval, starting at longitude 7.5, comprises another separate time zone.
JRMTIME ssEnvironment::getJRMTimeOfDay ( )

get current time of day as 0.0 to 24.0

Returns
JRMTIME ([julian],[hours]). Time is in 0-23.99 hr format and corresponds to the local time at the given geodetic lat/lon, where every geodetic point in the same time zone has the same local time. The time zones are defined such that longitude 0 is in the center of a 15-degree time zone, such that every 15-degree longitudinal interval, starting at longitude 7.5, comprises another separate time zone.
void ssEnvironment::setJRMTimeOfDay ( JRMTIME  time)

set current time of day as 0.0 to 24.0

Parameters
time([julian],[hours]). Time is in 0-23.99 hr format and corresponds to the local time at the given geodetic lat/lon, where every geodetic point in the same time zone has the same local time. The time zones are defined such that longitude 0 is in the center of a 15-degree time zone, such that every 15-degree longitudinal interval, starting at longitude 7.5, comprises another separate time zone.
void ssEnvironment::setAtmosphereStateFile ( const char *  name)

sets the atmospheric state file name for use with a user defined atmosphere

Parameters
name
char* ssEnvironment::getAtmosphereStateFile ( )

gets the atmospheric state file name for use with a user defined atmosphere

Returns
char *
void ssEnvironment::setNightSkyTableFile ( char *  name)

sets the night sky table file name such as atm/stellar_sky.ir that defines the stars and/or planets

Parameters
name
char* ssEnvironment::getNightSkyTableFile ( )

gets the night sky table file name such as atm/stellar_sky.ir that defines the stars and/or planets

Returns
char *
void ssEnvironment::setAirGroundTempCalcMode ( bool  Calc_Ta_Tback)

Set air and ground temperature calculation mode.

TRUE - Calculate Ta (current air temperature) and Tbackground using {Tamin, Tamax} boundaries and time-of-day. FALSE - Use Ta and Tbackgound as entered manually by user, unless either is <3degK.

Parameters
Calc_Ta_Tback
bool ssEnvironment::getAirGroundTempCalcMode ( )

Get air and ground temperature calculation mode.

TRUE - Calculate Ta (current air temperature) and Tbackground using {Tamin, Tamax} boundaries and time-of-day. FALSE - Use Ta and Tbackgound as entered manually by user, unless either is <3degK.

Returns
bool
void ssEnvironment::setMaxDiurnalTemperature ( double  tempMax)

Set highest temperature for current date and position.

Parameters
tempMax[degrees C]
void ssEnvironment::setMinDiurnalTemperature ( double  tempMin)

Set lowest temperature for current date and position.

Parameters
tempMin[degrees C]
double ssEnvironment::getMaxDiurnalTemperature ( )

get highest temperature for current date and position

Returns
double [degrees C]
double ssEnvironment::getMinDiurnalTemperature ( )

get lowest temperature for current date and position

Returns
double [degrees C]
void ssEnvironment::setCurrentAirTemperature ( double  Ta)

Set current air temperature for use in calculating the Modtran atmosphere.

Parameters
Ta[degC]
double ssEnvironment::getCurrentAirTemperature ( )

Get current air temperature for use in calculating the Modtran atmosphere.

Returns
double [degC]
void ssEnvironment::setAirModelOption ( int  air_model_option)
 \param air_model_option

Sets SigSimC diurnal air model type : air_model_option = 1 : Linear interpolation between lowpoint at sunrise-1 and highpoint at sunset-3 hours. air_model_option = 2 : cubic interpolation between lowpoint at sunrise-1 and highpoint at sunset-3 hours. air_model_option = 3 : cosine interpolation with highpoint at sunset-3 hours. Does not look at sunrise time. air_model_option = 4 : hybrid interpolation which follows cosine between sunrise and sunset, but linear decay after sunset.

 \return   void
int ssEnvironment::setUserDefinedAirTemperatures ( int  numberIntervals,
double *  airTemperature 
)

This method sets the user-defined air temperatures use by thermal solvers.

The AirGroundTempCalcMode is set to FALSE. The min and max diurnal temperatures are set based on the temperatures provided User defined temperatures can be disabled by passing in 0 for numberIntervals. The number of intervals must be set to (int)floor(24.0/m_updateInterval), where m_updateInterval is set by the user, in units of hours. All points are spaced equally in time. The airTemperature input array has to be pre-allocated and filled, then passed in. The calling method controls the memory allocation/deallocation. The first interval corresponds to local time 0.0 hours (local midnight). The table is always 24 hours long, regardless of the spinup time.

Parameters
numberIntervals
airTemperature[degC]
Returns
int // return 0 if ok, 1 if numberIntervals is not the same as 24 / env_update_interval or the internal array can't be allocated.
int ssEnvironment::setUserDefinedAirTemperatures ( int  numberIntervals,
double *  airTemperature,
double *  timeOfDays 
)

This method sets the user-defined air temperatures use by thermal solvers.

The AirGroundTempCalcMode is set to FALSE. The min and max diurnal temperatures are set based on the temperatures provided User defined temperatures can be disabled by passing in 0 for numberIntervals. This method is more flexible than the one above and allows for variation in the spacing between temperature points and starting times. The timeOfDays array should contain values between 0.0 and 24.0

Parameters
numberIntervals
airTemperature[degC]
timeOfDays[hours]
Returns
int // return 0 if ok, 1 if numberIntervals is not greater than zero or the internal array can't be allocated.
bool ssEnvironment::isUserDefinedAirTemperature ( )

Indicates whether user defined air temperatures are being used by the thermal solver.

Returns
bool
void ssEnvironment::disableUserDefinedAirTemperature ( )

Turns off the use of user defined air temperatures.

void ssEnvironment::setModtranAtmModel ( const ModtranAtmModel  model)

set the Modtran atmosphere model

Parameters
model
ModtranAtmModel ssEnvironment::getModtranAtmModel ( )

get the Modtran atmosphere model

Returns
ModtranAtmModel
void ssEnvironment::setModtranHazeModel ( const ModtranHazeModel  haze)

set the Modtran haze model

Parameters
haze
ModtranHazeModel ssEnvironment::getModtranHazeModel ( )

get the Modtran haze model

Returns
ModtranHazeModel
void ssEnvironment::setModtranSeason ( const ModtranSeason  season)

set the Modtran season

Parameters
season
ModtranSeason ssEnvironment::getModtranSeason ( )

get the Modtran season

Returns
ModtranSeason
void ssEnvironment::setModtranVisibility ( double  vis)

set the modtran visibility

Parameters
vis[meters]
double ssEnvironment::getModtranVisibility ( )

get the modtran visibility

Returns
double [meters]
void ssEnvironment::setWindVelocity ( double  windVelocity)

set Modtran wind speed or velocity

Parameters
windVelocity[meters/sec]
double ssEnvironment::getWindVelocity ( )

get Modtran wind speed or velocity

Returns
double [meters/sec]
void ssEnvironment::setWindDirection ( double  EofN)

set direction from which wind is blowing [deg] East of North

Parameters
EofN
double ssEnvironment::getWindDirection ( )

get direction from which wind is blowing [deg] East of North

Returns
double
void ssEnvironment::setRelativeHumidity ( double  relative_humidity)

set the relative humidity

Parameters
relative_humidity[ratio 0-1]
double ssEnvironment::getRelativeHumidity ( )

get the relative humidity

Returns
double [ratio 0-1]
void ssEnvironment::setGroundTemperature ( double  Tbackground)

set the general ground temperature for background calcs

Parameters
Tbackground[degK]
double ssEnvironment::getGroundTemperature ( )

get the general ground temperature for background calcs

Returns
double [degK]
void ssEnvironment::setAtmosphericPressure ( double  Pressure)

set the Air pressure at surface.

If >0, this overrides 1st-layer pressure given by default model profiles 1-6.

Parameters
Pressure[mb]
double ssEnvironment::getAtmosphericPressure ( )

get the Air pressure at surface.

If >0, this overrides 1st-layer pressure given by default model profiles 1-6.

Returns
double [mb]
void ssEnvironment::setModtranClouds ( const ModtranClouds  clouds)

sets the Modtran cloud type (c2Icld)

Parameters
clouds
void ssEnvironment::setCloudParameters ( int  numCloudLayers,
float  thickness,
float  baseAltitude,
float  extinctionScale,
float  waterDensity 
)

Sets the Modtran c2a parameters: c2aNcralt, c2aCthik, c2aCalt, c2aCext, c2aCcolwd m_metinPtr->mc.c2aCthik = thickness; // Cloud vertical thickness [km], or <0=use default (or user-spec in 2E1 if c2aNcralt>3) m_metinPtr->mc.c2aCalt = baseAltitude; // Cloud base altitude [km], or <0=use default (or user-spec in 2E1 if c2aNcralt>3) m_metinPtr->mc.c2aCext = extinctionScale; // [<=0] = do not scale extinction coeffs, [>0]=cloud H2O vert extinction [km-1] m_metinPtr->mc.c2aCcolwd = waterDensity; // Water droplet vertical column density [km g/m3], or if [<], do not scale.

Parameters
numCloudLayers
thickness[km]
baseAltitude[km]
extinctionScale
waterDensity[km g/m3]
void ssEnvironment::setCloudLayerParameters ( int  layer,
float  altitude,
float  waterDensity,
float  iceDensity,
float  rainRate 
)

Sets the Modtran c2e1 parameters for a layer: c2e1ZCLD, c2e1CLD, c2e1CLDICE, c2e1RR layer goes from 0 to numCloudLayers - 1 m_metinPtr->mc.c2e1ZCLD[layer] = altitude; // User-defined cloud altitude [km] above ground m_metinPtr->mc.c2e1CLD[layer] = waterDensity; // User-defined cloud liquid water density [g/m3] at c2e1ZCLD alt.

m_metinPtr->mc.c2e1CLDICE[layer] = iceDensity; // User-defined cloud ice particle density [g/m3] at c2e1ZCLD alt. m_metinPtr->mc.c2e1RR[layer]= rainRate; // User-defined Rain rate [mm/hr] at c2e1ZCLD alt.

Parameters
layer
altitude[km]
waterDensity[g/m3]
iceDensity[g/m3]
rainRate[mm/hr]
void ssEnvironment::setCloudLayerParameters ( int  layer,
float  altitude,
float  visibility 
)

Sets the Modtran c2e1 parameters for a layer: c2e1ZCLD, c2e1CLD, c2e1CLDICE, c2e1RR layer goes from 0 to numCloudLayers - 1.

Parameters
layer
altitude[km]
visibility[m]
ModtranClouds ssEnvironment::getModtranClouds ( )
Returns
ModtranClouds
void ssEnvironment::getCloudParameters ( int numCloudLayers,
float &  thickness,
float &  baseAltitude,
float &  extinctionScale,
float &  waterDensity 
)

gets the Modtran c2a parameters: c2aNcralt, c2aCthik, c2aCalt, c2aCext, c2aCcolwd

Parameters
numCloudLayers
thickness[km]
baseAltitude[km]
extinctionScale
waterDensity[km g/m3]
void ssEnvironment::getCloudLayerParameters ( int  layer,
float &  altitude,
float &  waterDensity,
float &  iceDensity,
float &  rainRate 
)

Sets the Modtran c2e1 parameters for a layer: c2e1ZCLD, c2e1CLD, c2e1CLDICE, c2e1RR.

Parameters
layer
altitude[km]
waterDensity[g/m3]
iceDensity[g/m3]
rainRate[mm/hr]
void ssEnvironment::setGeodeticOrigin ( double  lat,
double  lon 
)

set scenario latitude and longitude in degrees

Parameters
lat[degrees]
lon[degrees]
void ssEnvironment::getGeodeticOrigin ( double &  lat,
double &  lon 
)

get scenario latitude and longitude in degrees

Parameters
lat[degrees]
lon[degrees]
void ssEnvironment::setUpdateTime ( )

description: sets the update time to the current time and date.

SigSim call - DoEphemeris

bool ssEnvironment::isDayTime ( )

Returns true if it is day time.

Returns
bool
void ssEnvironment::setUseSun ( bool  flag)

set flag to use the sun for the lighting and atmospheric calculations otherwise use the moon.

Usually this would be set to isDayTime(). This is over-ridden by the m_useBothSunMoon flag.

Parameters
flag
bool ssEnvironment::isUsingSun ( )

returns true if using the sun for the lighting and atmospheric calculations otherwise returns false if using the moon.

This is over-ridden by the m_useBothSunMoon flag.

Returns
bool
void ssEnvironment::setUseBothSunMoon ( bool  flag)

set flag to use the sun and moon for the lighting and atmospheric calculations otherwise use the sun or moon depending on the m_useSun flag

Parameters
flag
bool ssEnvironment::getUseBothSunMoon ( )

get flag to use the sun and moon for the lighting and atmospheric calculations otherwise use the sun or moon depending on the m_useSun flag

Returns
bool
double ssEnvironment::getNightTimeConstant ( )

Returns the constant C for GPU ENVELOPE_MODE2 temperature equation Tsurf = Tbase + dTcos * fmax( fmax(norm*sunvec,0), C*(1 - fmax(norm*sunmax,0)) ).

Returns
double
double ssEnvironment::getSkyAngleFactor ( )

Returns the constant ratio between horizon-looking sky irradiance and upward-looking sky irradiance.

void ssEnvironment::getSunMaxPosition ( double &  i,
double &  j,
double &  k 
)

Returns the sun position at local noon - coord sys is ENU.

Parameters
i[unitless cosine]
j[unitless cosine]
k[unitless cosine]
void ssEnvironment::getSunPlaneVectorENU ( double &  i,
double &  j,
double &  k 
)

Reads the METIN structure to get the SEU sunplane vector, and translates it to ENU.

/param i - East /param j - North /param k - Up

void ssEnvironment::getSunPosition ( double &  i,
double &  j,
double &  k 
)

Returns the sun position - coord sys is ENU.

Parameters
i[unitless cosine]
j[unitless cosine]
k[unitless cosine]
void ssEnvironment::getMoonPosition ( double &  i,
double &  j,
double &  k 
)

Returns the moon position - coord sys is ENU.

Parameters
i[unitless cosine]
j[unitless cosine]
k[unitless cosine]
bool ssEnvironment::getSunMoonPosition ( double &  i,
double &  j,
double &  k 
)

Returns either the sun or the moon position depending on whether it is night or day - coord sys is ENU.

Parameters
i[unitless cosine]
j[unitless cosine]
k[unitless cosine]
Returns
bool
double ssEnvironment::getMoonPhase ( )

Returns the moon phase 0=new, 1=quarter moon, 2=half, 3=3/4 full moon, 4=full moon.

Returns
double - amount of moon showing from 0.0 to 4.0
void ssEnvironment::getStarPosition ( int  starNum,
double &  i,
double &  j,
double &  k,
double &  temperature,
double &  attenuation 
)

Returns the star position for the requested star.

     - coord sys is ENU  (east-north-up)
Parameters
starNum
i[unitless cosine]
j[unitless cosine]
k[unitless cosine]
temperature[degrees K] distribution temperature of equivalent blackbody
attenuation[steradians] Attenuation coefficient for a stellar irradiance.
void ssEnvironment::getStarPositionRadiance ( ssSensor sensor,
int  starNum,
double &  i,
double &  j,
double &  k,
double &  radiance 
)

Returns the star position and scaled radiance for the requested star.

     - coord sys is ENU (east-north-up)
Parameters
sensor
starNum
i[unitless cosine]
j[unitless cosine]
k[unitless cosine]
radiance[unitless - radiance W/cm2/sr scaled by maxRadiance]
void ssEnvironment::initMaxStarParameters ( ssSensor sensor,
double  maxSize = 5.0,
int  starNum = -1 
)

Initializes the maximum star parameters for scaling the light point size typically it is Polaris, the North Star - starNum of -1 will choose the North Star from the stellar_sky.ir file.

double ssEnvironment::getMaxStarRadiance ( )

get the radiance of the maximum star.

void ssEnvironment::getStarPositionRadiance ( ssSensor sensor,
int  starNum,
double &  i,
double &  j,
double &  k,
double &  radiance,
double &  size 
)

Returns the star position and scaled radiance for the requested star.

     - coord sys is ENU (east-north-up)
  This variant also returns the size of the light point to render.
Parameters
sensor
starNum
i[unitless cosine]
j[unitless cosine]
k[unitless cosine]
radiance[unitless - radiance W/cm2/sr scaled by maxRadiance]
size- relative size
unsigned int ssEnvironment::getNumberStars ( )

Returns the number of stars.

Returns
unsigned int
unsigned int ssEnvironment::getNumberWavelengths ( )

get the number of wavelength bins covering the Metin spectrum from 0.25 to 25 um

Returns
unsigned int
double* ssEnvironment::getWavelengthsArray ( )

get the non-uniform wavelength array covering the Metin spectrum from 0.25 to 25 um All wavelengths specified are at center of wavelength bin.

Returns
*double [um]
long ssEnvironment::getJulianDate ( )

Get the julian date corresponding to the current date.

Returns
long
void ssEnvironment::setUpdateBuffer ( double  hours)

sets the update interval used as time buffer for environment updates defaults to 5 minutes.

Parameters
[hours]
double ssEnvironment::getUpdateBuffer ( )

gets the update interval

Returns
double [hours]
void ssEnvironment::setSpectralMode ( bool  flag)

set the spectral mode flag.

The spectral mode flag only changes the atm table to remove the dependency on sensor altitude. The is done because the table becomes unmanageable with the spectral wavelength dimension added. This means the table must be regenerated every frame that the sensor altitude changes. The generation is much faster, but it may be difficult to guarantee that it would regenerate within a real-time frame time. So the flag is false typically false for real-time rendering.

Parameters
flag
bool ssEnvironment::isSpectralMode ( )

returns true if spectral mode is selected.

Returns
bool
void ssEnvironment::setAtmEnable ( bool  flag)

sets the atmosphere enable parameter to turn atmosphere processing on/off This causes the atmospheric update to be much faster because the atm table is not regenerated.

Parameters
flag
bool ssEnvironment::isAtmEnable ( )

returns true is atmosphere processing is on

Returns
bool
void ssEnvironment::setScatterEnable ( bool  flag)

sets the scattering enable parameter to turn scattering processing on/off in the shader This causes the atmospheric update to be much faster because the scattering calculations are skipped.

Parameters
flag
bool ssEnvironment::isScatterEnable ( )

returns true is atmospheric scattering processing is on

Returns
bool
void ssEnvironment::setMultiScatterEnable ( bool  flag)

sets the scattering enable parameter to turn multiple scattering processing on/off in the shader This causes the atmospheric update to be much faster because the multiple scattering calculations are skipped.

Parameters
flag
bool ssEnvironment::isMultiScatterEnable ( )

returns true is atmospheric multiple scattering processing is on

Returns
bool
void ssEnvironment::setRoundEarth ( bool  flag)

sets the scattering enable parameter to turn round earth processing on/off in the shader With round earth enabled, each line of sight used to generated the atm table is adjusted for the curvature of the earth giving a more accurate result, but it does add to the regeneration time.

Parameters
flag
bool ssEnvironment::isRoundEarth ( )
Returns
bool
void ssEnvironment::setAtmExtinctionScale ( float  scale)

set the atmospheric extinction scale.

This scale factor has the affect of adjusting the modtran extinction coefficients to give change in visibility without the need to generate a new atmospheric model. It defaults to 1.0 which causes no modification to the Modtran model.

Parameters
scale
float ssEnvironment::getAtmExtinctionScale ( )

get the atmospheric extinction scale.

Returns
float
void ssEnvironment::setAtmAmbientLightScale ( float  scale)

set the atmospheric Ambient Light scale.

This flag has the affect of adjusting the ambient light level to account for upwelling irradiance. It defaults to 1.0.

Parameters
scale
float ssEnvironment::getAtmAmbientLightScale ( )

get the atmospheric Ambient Light scale.

Returns
float
void ssEnvironment::setAtmSkyScale ( float  scale)

set the atm sky scale factor to adjust the IR sky temperature

Parameters
scale
float ssEnvironment::getAtmSkyScale ( )

get the atm sky scale factor to adjust the IR sky temperature

Returns
float
void ssEnvironment::setNumberRanges ( unsigned int  ranges)

set number of texture Ranges

Parameters
ranges
unsigned int ssEnvironment::getNumberRanges ( )

get number of texture Ranges used by the atm table.

Returns
unsigned int
void ssEnvironment::setNumberObjectAltitudes ( unsigned int  alts)

set number of object altitudes Used by the atm and light source tables for the object altitude dimension.

Parameters
alts
unsigned int ssEnvironment::getNumberObjectAltitudes ( )

get number of object altitudes

Returns
unsigned int
unsigned ssEnvironment::getNumberObjectAngles ( )

get number of object angles

Returns
unsigned int
void ssEnvironment::setNumberObjectAngles ( unsigned int  angles)

set number of angles

Parameters
angles
unsigned int ssEnvironment::getNumberScatAngles ( )

get number of scatter angles

Returns
unsigned int
void ssEnvironment::setNumberScatAngles ( unsigned int  angles)

set number of scatter angles

Parameters
angles
void ssEnvironment::setNumberSensorAltitudes ( unsigned int  alts)

set number of altitudes Used by the atm table for the sensor altitude dimension.

Parameters
alts
unsigned int ssEnvironment::getNumberSensorAltitudes ( )

get number of altitudes

Returns
unsigned int
void ssEnvironment::setMaxRange ( double  range)

sets the max environment range or the sky dome radius Used by the atm table for the range dimension.

Parameters
range
double ssEnvironment::getMaxRange ( )

gets the max environment range or the sky dome radius

Returns
double
void ssEnvironment::setMaxAltitude ( double  maximum)

set maximum altitude for both the sensor and object altitude dimensions of the atm table.

Parameters
maximumaltitude
double ssEnvironment::getMaxAltitude ( )

get maximum altitude for both the sensor and object altitude dimensions of the atm table.

Returns
maximum altitude
double ssEnvironment::getRangeScale ( )

get inverse maximum Range scaled by the number of ranges

Returns
double
double ssEnvironment::getObjectAltitudeScale ( )

get inverse of maximum object altitude scaled by number of object altitudes

Returns
double
double ssEnvironment::getRainRate ( )

get Rain rate [mm/hr], or [<=0] if using user-defined rain rate in card2E1.

Used to top of cloud when cloud is present; when no clouds, rain rate used to 6km.

Returns
double
void ssEnvironment::setRainRate ( double  rate)

set Rain rate [mm/hr], or [<=0] if using user-defined rain rate in card2E1.

Used to top of cloud when cloud is present; when no clouds, rain rate used to 6km.

Parameters
rate
double ssEnvironment::getRainTemp ( )

get rain temperature [degC]

Returns
double
void ssEnvironment::setRainTemp ( double  temp)

set rain temperature [degC]

Parameters
temp
double ssEnvironment::getSensorAltitudeScale ( )

get inverse of maximum sensor altitude scaled by number of sensor altitudes

Returns
double
void ssEnvironment::setUpdateInterval ( double  deltaHours)

set the update interval used by the thermal solver to generate new temperatures

Parameters
deltaHours[hours] // number of hours between updates - defaults to 0.25
double ssEnvironment::getUpdateInterval ( )

get the update interval used by the thermal solver to generate new temperatures

Returns
double [hours]
void ssEnvironment::getSensorPolarATMLUTData ( ssSensor sensor,
unsigned int numSensAlts,
unsigned int numObjAngles,
unsigned int numScatAngles,
unsigned int numBins,
float **  xmitData,
float **  pradData,
float **  sradData,
float **  mradData 
)

Gets the atmospheric data for a particular sensor.

/param sensor - the point to the sensor /param numSensAlts /param numObjAngles /param numScatAngles /param numBins /param xmitData - transmission data /param pradData - path radiance data /param sradData /param mradData

void ssEnvironment::getSensorMaxOptDepth ( ssSensor sensor,
unsigned int numBins,
float **  maxOptDepth 
)

Gets the max optical depth for a particular sensor.

Parameters
sensor- the sensor
numBins- number of spectral bins
maxOptDepth- maximum optical depth for each spectral bin
bool ssEnvironment::isMBNATM ( ssSensor sensor)

Tells whether the ATM LUT is modified B&N mode or original rectangular mode.

Parameters
sensor- pointer to the sensor
Returns
- bool flag
void ssEnvironment::getTransmission ( ssSensor sensor,
double  sensorGeoC[3],
double  sensorOrient[3],
double  entityGeoC[3],
double **  transmission,
double **  pathRadiance,
double **  scatterRadiance 
)

gets the transmission properties of a LOS between a sensor and an object.

This uses the SigSim call GetLOSAtmosphericsKE.

Parameters
sensor
sensorGeoC
sensorOrient
entityGeoC
transmission
pathRadiance
scatterRadiance
void ssEnvironment::getTransmission ( ssSensor sensor,
double  objectAlt,
double  objectRange,
double **  transmission,
double **  pathRadiance,
double **  scatterRadiance 
)

gets the transmission properties of a LOS between a sensor and an object.

This uses the SigSim call GetLOSAtmosphericsKE.

Parameters
sensor
objectAlt
objectRange
transmission
pathRadiance
scatterRadiance
void ssEnvironment::getAtmTableTransmission ( ssSensor sensor,
double  objectAlt,
double  objectRange,
double &  transmission,
double &  pathRadiance 
)

Gets the transmission properties of a LOS between a sensor and an object from the sensor's atmospheric table.

Parameters
sensor
objectAlt
objectRange
transmission
pathRadiance
void ssEnvironment::getLightSourceTableIrradiances ( ssSensor sensor,
double  objectAlt,
double &  ambientIrradiance,
double &  diffuseIrradiance 
)

Gets the passband irradiance values for an object from the sensor's Light Source table.

Parameters
sensor
objectAlt
ambientIrradiance
diffuseIrradiance
double ssEnvironment::saveRangeTransCompare ( ssSensor sensor,
double  objectAlt 
)

compare the SigSimC and SigSimRT atmospherics.

WARNING: the path radiance may not match due to the fogRatio being used in SigSimRT.

Parameters
sensor
objectAlt
Returns
double
void ssEnvironment::setGenerateFastDiurnalCache ( bool  flag)

set the diurnal cache method to use the fast version that uses the ssAtmospheric table information rather than the SigSim version.

Parameters
flag
bool ssEnvironment::isGenerateFastDiurnalCache ( )

returns true if the fast diurnal cache method is to be used.

Returns
bool
void ssEnvironment::setWaterVaporPartialPressureScaleFactor ( double  wvpp)
Parameters
wvpp
double ssEnvironment::getWaterVaporPartialPressureForCurrentTimeOfDay ( )
Returns
double
double ssEnvironment::findClosestDefaultWaterVaporPartialPressure ( char *  sigsim_data_dir,
double  wvpp 
)
Parameters
sigsim_data_dir
wvpp
Returns
double
void ssEnvironment::setSeasonBasedOnLocation ( )

Set the season used by Modtran using the current location.

int ssEnvironment::useModcardParamsToGenerateCorrespondingATMState ( char *  sigsim_data_dir,
char *  outfilebasename 
)

This method takes the current settings in the MODCARD structure and generates a new asc and mcd file accordingly.

The files are placed in the atm subdirectory of the sigsim data directory with the supplied base file name.

Parameters
sigsim_data_dir
outfilebasename
Returns
int
bool ssEnvironment::getEnvIrradianceRatios ( double &  EsundirRatio,
double &  EsundifRatio,
double &  EskyRatio,
double &  EearthRatio 
)

description: Reads the environmental cache for the current tod and returns irradiances divided by sum of irradiances.

parameter: tod (time-of-day) [hrs]

return: true if successful

bool ssEnvironment::getEnvIrradianceAverageRatios ( double &  EsundirAveRatio,
double &  EsundifAveRatio,
double &  EskyAveRatio,
double &  EearthAveRatio 
)

description: Reads the environmental cache for the current tod and returns irradiance averages divided by sum of irradiances.

parameter: none

return: true if successful

METIN* ssEnvironment::getMetinPtr ( )

gets the SigSim Metin pointer WARNING: This method will be moved to private in an upcoming release to avoid the possibilty of users corrupting the underlining data structure which is used in SigSim.

So if this method is used, please inform JRM of the needed information and get methods will be added to provide the needed data.

Returns
METIN
bool ssEnvironment::isAtmosphereDirty ( )

returns true if the atmosphere needs to be updated

Returns
bool
void ssEnvironment::setAtmosphereDirty ( )

indicates that atmosphere needs to be updated

void ssEnvironment::setUseUpdateButton ( bool  flag)

tell ssEnvironment whether update button is used

bool ssEnvironment::isUseUpdateButton ( )

return whether the update button is used or not

void ssEnvironment::setUpdateButtonPressed ( bool  flag)

Tell ssEnvironment that the update button has been pressed.

bool ssEnvironment::isUpdateButtonPressed ( )

has the update button been pressed?

void ssEnvironment::setVisibilityRangeEnable ( bool  state)

generate a Modtran based lookup table of visible range in the different sensor bands

void ssEnvironment::initVisibilityRange ( SigSimRT ss)

generate a sensor based lookup table for the modtran derived maximum ranges

void ssEnvironment::releaseVisibilityRange ( )

release the visibility range lookup table

bool ssEnvironment::getVisibilityRange ( float  visibleRange,
ssSensor sensor,
float &  sensorRange,
float  cloudCoverage,
bool  isGroundFog,
float &  visiblityEmissionFactor 
)

based on a visible range return the modtran derived range for the active sensor

void ssEnvironment::getCloudProperties ( ssSensor sensor,
float &  humidity,
float &  extinction,
float &  lightResponse,
float &  ambientLightResponse,
float &  secondaryLightResponse,
float &  density 
)

prototype function to derive sensor band cloud characteristics based on the active sensor and the attributes from the visible band.

void ssEnvironment::interpolateEight ( double  fraction[3],
double  input1[8],
double  input2[8],
double *  output1,
double *  output2 
)
private
void ssEnvironment::setAutoLightLevel ( ssSensor sensor)
private

sets the sensor's max light level based on the maximum or minimum irradiance thru out the diurnal cycle.

Parameters
sensor
bool ssEnvironment::generateDiurnalCache ( )
private

generates the diurnal cache used by the thermal solver - this uses the ssAtmospheric table to quickly generate the diurnal cache

Returns
bool
void ssEnvironment::loadDefaults ( )
private

fills SigSim's metin structure with default values

bool ssEnvironment::insertSensorAtmosphericTable ( ssSensor sensor)
private

inserts a sensor atmospheric table into the sensor source map

Parameters
sensor
Returns
bool
void ssEnvironment::setJulianDate ( long  julian)
private

set the julian date - user should use setDate

Parameters
longjulian [day]
double ssEnvironment::timeHasChangedSinceLastUpdate ( )
private

Compares current time to the last update time returns 0.0 if current time is within the update interval as last update timeotherwise amount of change.

Returns
double
void ssEnvironment::clrAtmosphereDirty ( )
private

indicates that atmosphere has been updated

void ssEnvironment::setAtmosphereLutsDirty ( )
private

indicates that atmosphere luts need to be updated

Friends And Related Function Documentation

friend class SigSimRT
friend
friend class ssRadar
friend
friend class ssMaterialSet
friend

Member Data Documentation

double ssEnvironment::m_maxRange
private

sky dome radius in meters

unsigned int ssEnvironment::m_day
private

current date

unsigned int ssEnvironment::m_month
private
unsigned int ssEnvironment::m_year
private
JRMTIME ssEnvironment::m_timeOfDay
private

current time 0 - 24 hours

JRMTIME ssEnvironment::m_lastUpdate
private
double ssEnvironment::m_updateBuffer
private

minimum time change in hours needed to engage change in time check

char ssEnvironment::m_nightSkyTableFile[SIGSIM_STRING_SIZE]
private

SigSim night sky table file.

char ssEnvironment::m_atmosphereStateFile[SIGSIM_STRING_SIZE]
private

SigSim atmosphere file.

double ssEnvironment::m_maxAltitude
private

maximum altitude computed for atmosphere

METIN* ssEnvironment::m_metinPtr
private

SigSim meterological info.

bool ssEnvironment::m_useSun
private

use the sun for the lighting/atm calculations.

bool ssEnvironment::m_useBothSunMoon
private

use the both the sun and moon for the lighting/atm calculations.

bool ssEnvironment::m_spectralMode
private

spectral mode flag - set false for normal IG mode

bool ssEnvironment::m_atmEnable
private

atmosphere enable master

bool ssEnvironment::m_scatterEnable
private

scattering enable master

bool ssEnvironment::m_multiScatterEnable
private

multi scattering enable master

bool ssEnvironment::m_roundEarth
private

round earth enable master

bool ssEnvironment::m_dirty
private

flag to determine if this atmospheric data needs to be updated.

bool ssEnvironment::m_geodeticLocationDirty
private

flag to indicate that the geodetic location has changed to get sun/moon position to update.

bool ssEnvironment::m_generateFastDiurnalCache
private

flag to determine if the fast diurnal cache should be used rather than the SigSim version

unsigned int ssEnvironment::m_numberRanges
private

number of ranges in lut

unsigned int ssEnvironment::m_numObjectAltitudes
private

number of object altitudes

unsigned int ssEnvironment::m_numObjectAngles
private

number of object angles

unsigned int ssEnvironment::m_numSensorAltitudes
private

number of sensor altitudes

unsigned int ssEnvironment::m_numScatAngles
private

number of scatter angles

float ssEnvironment::m_atmExtinctionScale
private

scale factor to increase/decrease the visiblity

float ssEnvironment::m_atmAmbientLightScale
private

scale factor to increase/decrease the ambient light

float ssEnvironment::m_atmSkyScale
private

scale factor to increase/decrease tm sky scale factor to adjust the IR sky temperature

bool ssEnvironment::m_isUserDefinedAirTemperature
private

indicates whether to use user defined temperatures

bool ssEnvironment::m_useUpdateButton
private
bool ssEnvironment::m_updateButtonPressed
private
bool ssEnvironment::m_visibilityRangeEnable
private
VisibilityRangeStruct ssEnvironment::m_visibilityRange
private
double ssEnvironment::m_maxStarRadiance
private
double ssEnvironment::m_maxStarSize
private
Implementation* ssEnvironment::m_impl
private

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


Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)