![]() |
VR-Vantage 3.1 API Documentation
|
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 | |
| void | setLUTSizeDefaults () |
| bool | updateAtmospherics (ssSensor *sensor, double sensorAltitude=1.0, bool checkReload=true, bool setLUTSize=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 &Nx, unsigned int &Ny, unsigned int &Nc) |
| ssAtmosphericTable * | getSensorAtmosphericTablePointer (ssSensor *sensor) |
| Gets the atmospheric data table pointer for a particular sensor. | |
| float * | getSensorAtmosphericData (ssSensor *sensor, unsigned int &Nx, unsigned int &Ny, unsigned int &Nz, unsigned int &bins, unsigned int &comps) |
| 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 sources scaled by maxRadiance | |
| MANMADE_LIGHTSOURCE_TABLE * | getManMadeLightProperties (unsigned int &numLights) |
| gets the basic bulb properties for all the defined man-made light sources | |
| 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 | setSimulationTime (double simTime) |
| sets number of seconds since simulation began (currently independent of JRMTimeOfDay). | |
| double | getSimulationTime (void) |
| gets number of seconds since simulation began (currently independent of JRMTimeOfDay). | |
| int | getSensorAltitudeIndex (double alt) |
| gets ATM/ENV LUT index of altitude range for a given sensor altitude in meters. | |
| 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 | |
| bool | getAtmosphericTableChanged () const |
| check if the atmospheric table has changed (for use by external programs or plugins only) | |
| void | setAtmosphericTableChanged (bool state) |
| set if the atmospheric table has changed (for use by external programs or plugins only) | |
| 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 | setBathymetryTableFile (char *name) |
| sets the bathymetry table file name such as terrain/Sonar/Subsurface1DProfile.txt that defines the temp, pressure, salinity, etc. | |
| char * | getBathymetryTableFile () |
| gets the bathymetry table file name such as terrain/Sonar/Subsurface1DProfile.txt that defines the temp, pressure, salinity, etc. | |
| void | setMMLSTableFile (char *name) |
| sets the manmade light source table file name such as atm/mm_lsources.dat that defines the local lighting | |
| char * | getMMLSTableFile () |
| gets the manmade light source table file name such as atm/mm_lsources.dat that defines the local lighting | |
| 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 | setModtranAirMassCharacter (int coastalinfluence) |
| Modtran air mass character for haze model 3 (maritime) | |
| int | getModtranAirMassCharacter () |
| 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. | |
| JRMTIME | getUpdateTime () |
| description: gets the date/time corresponding to the current environment. | |
| 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 | setUseODLimit (bool flag) |
| sets the flag to use the OD limit in multiscat computations | |
| bool | getUseODLimit () |
| 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 | setPowRange (double p) |
| set power of i/(n-1) for range indexing. | |
| double | getPowRange () |
| get power of i/(n-1) for range indexing. | |
| void | setPowDensity (double p) |
| set power of -log(density) in ATM LUT. | |
| double | getPowDensity () |
| get power of -log(density) for range indexing. | |
| 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. | |
| void | setPowAltitude (double p) |
| set power of i/(n-1) for altitude indexing. | |
| double | getPowAltitude () |
| get power of i/(n-1) for altitude indexing. | |
| 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 | setLUTPrecomputationRange (bool lut_precomp_enable, double lut_tod_start, double lut_tod_end, double lut_tod_interval=0.25) |
| void | getLUTPrecomputationRange (bool &lut_precomp_enable, double &lut_tod_start, double &lut_tod_end, double &lut_tod_interval) |
| 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 | setMBNATM (bool onoff) |
| if(m_OriginalCode==false), this flag turns on the Modified B&N atmospheric LUT processing. | |
| bool | getMBNATM () |
| if(m_OriginalCode==false), this flag turns on the Modified B&N atmospheric LUT processing. | |
| void | setOriginalCode (bool onoff) |
| Reproduces code as of Sept. | |
| bool | getOriginalCode () |
| Find out whether to reproduce code as of Sept. | |
| void | setModRad (bool onoff) |
| Use Modtran/Radtran directly to fill LUTs (slow!!) | |
| bool | getModRad () |
| Use Modtran/Radtran directly to fill LUTs (slow!!) | |
| void | getAtmTableTransmission (ssSensor *sensor, double sensorAlt, double objectAlt, double objectRange, double &transmission, double &pathRadiance) |
| void | getLightSourceTableIrradiances (ssSensor *sensor, double objectAlt, double &ambientIrradiance, double &directIrradiance) |
| Gets the passband irradiance values for an object from the sensor's Light Source table. | |
| 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 *sigsim_cache_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. | |
| METIN * | 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. | |
| bool | isAtmosphereDirty () |
| returns true if the atmosphere needs to be updated | |
| void | setAtmosphereDirty () |
| indicates that atmosphere needs to be updated | |
| void | deferAtmosphericUpdates (bool flag) |
| tell ssEnvironment to defer atmospheric updates. | |
| bool | isAtmosphericUpdateDeferred () |
| return whether the atmospheric updates are defered or not | |
| void | setUpdateAtmospherics (bool flag) |
| Tell ssEnvironment to update the current state of the atmospherics. | |
| bool | isAtmosphericsUpdated () |
| isUpdateButtonPressed? | |
| void | setConstEratio (bool flag) |
| Tell ssEnvironment whether the refraction earth radius ratio should be fixed at 4/3. | |
| bool | isConstEratio () |
| has the refraction earth radius ratio been set to a constant 4/3? | |
| void | getRefractionProfile (ssSensor *sensor, double &n0, double &h0, ellipsoid &E) |
| gets the refraction profile (n0 [1], h0 [km], Ellipsoid) | |
| 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. | |
| double | getMeanWaveHeight () |
| double | computeSkyAngleExponent () |
| int | sigsimUpdateEnvironment (double alt_m) |
| bool | queryIrradianceCache (char *cacheDirectory) |
| Checks to see if there is a valid irradiance cache. | |
| void | saveIrradianceCache (char *cacheDirectory) |
| saves the irradiance cache. | |
| bool | isAtmosphereLutForSensorDirty (ssSensor *sensor) const |
| indicates that the atmosphere LUT and environment LUT need to be updated for the provided sensor | |
Private Member Functions | |
| void | interpolateFour (double fraction[2], double input1[4], double input2[4], double *output1, double *output2) |
| 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 | |
| void | checkSensorTimesChanged (bool explicitTimeChanged) |
| loops through sensors associated with all ATM LUTs to see if there are any which need to be flagged for update due to a time change | |
Private Attributes | |
| 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_simTime |
| bool | m_AtmTableChanged |
| 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_mmlsTableFile [SIGSIM_STRING_SIZE] |
| SigSim man-made light source file. | |
| char | m_bathymetryTableFile [SIGSIM_STRING_SIZE] |
| SigSim bathymetry table file. | |
| char | m_atmosphereStateFile [SIGSIM_STRING_SIZE] |
| SigSim atmosphere file. | |
| double | m_maxAltitude |
| maximum ATM LUT altitude in meters | |
| double | m_powAltitude |
| power of i/(n-1) for altitude indexing. | |
| double | m_maxRange |
| maximum ATM LUT range in meters | |
| double | m_powRange |
| power of i/(n-1) for range indexing. | |
| double | m_powDensity |
| power of (-log(density)) in ATM LUT. | |
| METIN * | m_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_useODLimit |
| switch to use optical depth restriction on max pathlength | |
| bool | m_MBNATM |
| BNN Mode. | |
| bool | m_constEratio |
| 4/3 refractive earth radius ratio | |
| bool | m_OriginalCode |
| bool | m_ModRad |
| 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 | |
| bool | m_lut_precomp_enable |
| Enables a range over which ENV/ATM LUTs will be pre-generated for all sensors, in a given atmosphere: | |
| double | m_lut_tod_start |
| double | m_lut_tod_end |
| double | m_lut_tod_interval |
| unsigned int | m_numberRanges |
| number of ground 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_deferAtmosphericUpdates |
| bool | m_updateAtmospherics |
| bool | m_visibilityRangeEnable |
| VisibilityRangeStruct | m_visibilityRange |
| double | m_maxStarRadiance |
| double | m_maxStarSize |
| Implementation * | m_impl |
Friends | |
| class | SigSimRT |
| class | ssMaterialSet |
class wrapper for metin and light sources in SigSim library for scene generation
| ssEnvironment::ssEnvironment | ( | ) |
constructor
| ssEnvironment::~ssEnvironment | ( | ) |
destructor
| void ssEnvironment::setLUTSizeDefaults | ( | ) |
| bool ssEnvironment::updateAtmospherics | ( | ssSensor * | sensor, |
| double | sensorAltitude = 1.0, |
||
| bool | checkReload = true, |
||
| bool | setLUTSize = 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
| 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. |
| float* ssEnvironment::getLightSourceData | ( | ssSensor * | sensor, |
| unsigned int & | Nx, | ||
| unsigned int & | Ny, | ||
| unsigned int & | Nc | ||
| ) |
| ssAtmosphericTable* ssEnvironment::getSensorAtmosphericTablePointer | ( | ssSensor * | sensor | ) |
Gets the atmospheric data table pointer for a particular sensor.
| sensor | - the pointer to the ssSensor |
| float* ssEnvironment::getSensorAtmosphericData | ( | ssSensor * | sensor, |
| unsigned int & | Nx, | ||
| unsigned int & | Ny, | ||
| unsigned int & | Nz, | ||
| unsigned int & | bins, | ||
| unsigned int & | comps | ||
| ) |
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) power of the negative log of the fog density 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) multiple scatter contribution
parameter: sensor - the sensor Nx - ground ranges Ny - object altitudes Nz - sensor altitudes bins - wavelengths comps - Components : Currently 4 : {Density, FogPrad, FogDelta, FogMulti}
Indexed as : (( z * Ny + y * Nbins + bin) * Nx + x) * Nc + c, which in passband mode devolves to (( z * Ny + y) * Nx + x) * Nc + c since Nbins=1 & bin=0, and which in spectral mode devolves to (( y * Nbins + bin) * Nx + x) * Nc + c since Nz=1, z=0 (sensor altitude is assumed common for whole table)
*return: float pointer to sensor atmospheric data
gets the spectral radiance for the sun disk at the top of atmosphere used to render the sun disk at the appropriate radiance level.
| sensor | |
| bins | - number of wavelengths |
gets the spectral radiance for the moon disk at the top of atmosphere used to render the moon disk at the appropriate radiance level.
| sensor | |
| bins | - number of wavelengths |
| float* ssEnvironment::getManMadeLightData | ( | ssSensor * | sensor, |
| unsigned int & | numLights, | ||
| unsigned int & | bins | ||
| ) |
gets the spectral radiance for all the defined man-made light sources scaled by maxRadiance
table is organized as float lightData[numLights][bins] - single component
| sensor | |
| numLights | - number of man made lights |
| bins | - number of spectral bins |
| MANMADE_LIGHTSOURCE_TABLE* ssEnvironment::getManMadeLightProperties | ( | unsigned int & | numLights | ) |
gets the basic bulb properties for all the defined man-made light sources
| numLights | - number of man made lights |
| int ssEnvironment::getNumberManMadeLights | ( | ) |
gets the number of man-made light sources defined in the atm/mm_lsources.dat file
gets the passband radiance for a particular man-made light source
| sensor | |
| lightNum | - index into the mm light data |
sets the current date
| day | |
| month | |
| year |
gets the current date
| day | |
| month | |
| year |
| void ssEnvironment::setTimeOfDay | ( | double | tod | ) |
set current time of day as 0.0 to 24.0
| 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
| JRMTIME ssEnvironment::getJRMTimeOfDay | ( | ) |
get current time of day as 0.0 to 24.0
set current time of day as 0.0 to 24.0
| 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::setSimulationTime | ( | double | simTime | ) |
sets number of seconds since simulation began (currently independent of JRMTimeOfDay).
| double ssEnvironment::getSimulationTime | ( | void | ) |
gets number of seconds since simulation began (currently independent of JRMTimeOfDay).
| int ssEnvironment::getSensorAltitudeIndex | ( | double | alt | ) |
gets ATM/ENV LUT index of altitude range for a given sensor altitude in meters.
| void ssEnvironment::setAtmosphereStateFile | ( | const char * | name | ) |
sets the atmospheric state file name for use with a user defined atmosphere
| name |
| char* ssEnvironment::getAtmosphereStateFile | ( | ) |
gets the atmospheric state file name for use with a user defined atmosphere
|
inline |
check if the atmospheric table has changed (for use by external programs or plugins only)
| name |
set if the atmospheric table has changed (for use by external programs or plugins only)
| name |
| 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
| name |
| char* ssEnvironment::getNightSkyTableFile | ( | ) |
gets the night sky table file name such as atm/stellar_sky.ir that defines the stars and/or planets
| void ssEnvironment::setBathymetryTableFile | ( | char * | name | ) |
sets the bathymetry table file name such as terrain/Sonar/Subsurface1DProfile.txt that defines the temp, pressure, salinity, etc.
at different sea depths.
| name |
| char* ssEnvironment::getBathymetryTableFile | ( | ) |
gets the bathymetry table file name such as terrain/Sonar/Subsurface1DProfile.txt that defines the temp, pressure, salinity, etc.
at different sea depths.
| void ssEnvironment::setMMLSTableFile | ( | char * | name | ) |
sets the manmade light source table file name such as atm/mm_lsources.dat that defines the local lighting
| name |
| char* ssEnvironment::getMMLSTableFile | ( | ) |
gets the manmade light source table file name such as atm/mm_lsources.dat that defines the local lighting
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.
| 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.
| void ssEnvironment::setMaxDiurnalTemperature | ( | double | tempMax | ) |
Set highest temperature for current date and position.
| tempMax | [degrees C] |
| void ssEnvironment::setMinDiurnalTemperature | ( | double | tempMin | ) |
Set lowest temperature for current date and position.
| tempMin | [degrees C] |
| double ssEnvironment::getMaxDiurnalTemperature | ( | ) |
get highest temperature for current date and position
| double ssEnvironment::getMinDiurnalTemperature | ( | ) |
get lowest temperature for current date and position
| void ssEnvironment::setCurrentAirTemperature | ( | double | Ta | ) |
Set current air temperature for use in calculating the Modtran atmosphere.
| Ta | [degC] |
| double ssEnvironment::getCurrentAirTemperature | ( | ) |
Get current air temperature for use in calculating the Modtran atmosphere.
\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
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.
| numberIntervals | |
| airTemperature | [degC] |
| 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
| numberIntervals | |
| airTemperature | [degC] |
| timeOfDays | [hours] |
| bool ssEnvironment::isUserDefinedAirTemperature | ( | ) |
Indicates whether user defined air temperatures are being used by the thermal solver.
| void ssEnvironment::disableUserDefinedAirTemperature | ( | ) |
Turns off the use of user defined air temperatures.
| void ssEnvironment::setModtranAtmModel | ( | const ModtranAtmModel | model | ) |
set the Modtran atmosphere model
| model |
| ModtranAtmModel ssEnvironment::getModtranAtmModel | ( | ) |
get the Modtran atmosphere model
| void ssEnvironment::setModtranHazeModel | ( | const ModtranHazeModel | haze | ) |
set the Modtran haze model
| haze |
| ModtranHazeModel ssEnvironment::getModtranHazeModel | ( | ) |
get the Modtran haze model
Modtran air mass character for haze model 3 (maritime)
| const | int coastalinfluence1-10 |
| int ssEnvironment::getModtranAirMassCharacter | ( | ) |
| void ssEnvironment::setModtranSeason | ( | const ModtranSeason | season | ) |
set the Modtran season
| season |
| ModtranSeason ssEnvironment::getModtranSeason | ( | ) |
get the Modtran season
| void ssEnvironment::setModtranVisibility | ( | double | vis | ) |
set the modtran visibility
| vis | [meters] |
| double ssEnvironment::getModtranVisibility | ( | ) |
get the modtran visibility
| void ssEnvironment::setWindVelocity | ( | double | windVelocity | ) |
set Modtran wind speed or velocity
| windVelocity | [meters/sec] |
| double ssEnvironment::getWindVelocity | ( | ) |
get Modtran wind speed or velocity
| void ssEnvironment::setWindDirection | ( | double | EofN | ) |
set direction from which wind is blowing [deg] East of North
| EofN |
| double ssEnvironment::getWindDirection | ( | ) |
get direction from which wind is blowing [deg] East of North
| void ssEnvironment::setRelativeHumidity | ( | double | relative_humidity | ) |
set the relative humidity
| relative_humidity | [ratio 0-1] |
| double ssEnvironment::getRelativeHumidity | ( | ) |
get the relative humidity
| void ssEnvironment::setGroundTemperature | ( | double | Tbackground | ) |
set the general ground temperature for background calcs
| Tbackground | [degK] |
| double ssEnvironment::getGroundTemperature | ( | ) |
get the general ground temperature for background calcs
| 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.
| 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.
| void ssEnvironment::setModtranClouds | ( | const ModtranClouds | clouds | ) |
sets the Modtran cloud type (c2Icld)
| 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.
| 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.
| layer | |
| altitude | [km] |
| waterDensity | [g/m3] |
| iceDensity | [g/m3] |
| rainRate | [mm/hr] |
Sets the Modtran c2e1 parameters for a layer: c2e1ZCLD, c2e1CLD, c2e1CLDICE, c2e1RR layer goes from 0 to numCloudLayers - 1.
| layer | |
| altitude | [km] |
| visibility | [m] |
| ModtranClouds ssEnvironment::getModtranClouds | ( | ) |
| void ssEnvironment::getCloudParameters | ( | int & | numCloudLayers, |
| float & | thickness, | ||
| float & | baseAltitude, | ||
| float & | extinctionScale, | ||
| float & | waterDensity | ||
| ) |
gets the Modtran c2a parameters: c2aNcralt, c2aCthik, c2aCalt, c2aCext, c2aCcolwd
| 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.
| 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
| lat | [degrees] |
| lon | [degrees] |
| void ssEnvironment::getGeodeticOrigin | ( | double & | lat, |
| double & | lon | ||
| ) |
get scenario latitude and longitude in degrees
| lat | [degrees] |
| lon | [degrees] |
| void ssEnvironment::setUpdateTime | ( | ) |
description: sets the update time to the current time and date.
SigSim call - DoEphemeris
| JRMTIME ssEnvironment::getUpdateTime | ( | ) |
description: gets the date/time corresponding to the current environment.
| bool ssEnvironment::isDayTime | ( | ) |
Returns true if it is day time.
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.
| 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.
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
| 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
| 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)) ).
| 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.
| 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.
| 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.
| 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.
| i | [unitless cosine] |
| j | [unitless cosine] |
| k | [unitless cosine] |
| double ssEnvironment::getMoonPhase | ( | ) |
Returns the moon phase 0=new, 1=quarter moon, 2=half, 3=3/4 full moon, 4=full moon.
| 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)
| 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)
| 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.
| 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.
| unsigned int ssEnvironment::getNumberWavelengths | ( | ) |
get the number of wavelength bins covering the Metin spectrum from 0.25 to 25 um
| 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.
| long ssEnvironment::getJulianDate | ( | ) |
Get the julian date corresponding to the current date.
| void ssEnvironment::setUpdateBuffer | ( | double | hours | ) |
sets the update interval used as time buffer for environment updates defaults to 5 minutes.
| [hours] |
| double ssEnvironment::getUpdateBuffer | ( | ) |
gets the update interval
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.
| flag |
| bool ssEnvironment::isSpectralMode | ( | ) |
returns true if spectral mode is selected.
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.
| flag |
| bool ssEnvironment::isAtmEnable | ( | ) |
returns true is atmosphere processing is on
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.
| flag |
| bool ssEnvironment::isScatterEnable | ( | ) |
returns true is atmospheric scattering processing is on
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.
| flag |
| bool ssEnvironment::isMultiScatterEnable | ( | ) |
returns true is atmospheric multiple scattering processing is on
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.
| flag |
| bool ssEnvironment::isRoundEarth | ( | ) |
sets the flag to use the OD limit in multiscat computations
| bool | flag |
| bool ssEnvironment::getUseODLimit | ( | ) |
| 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.
| scale |
| float ssEnvironment::getAtmExtinctionScale | ( | ) |
get the atmospheric extinction scale.
| 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.
| scale |
| float ssEnvironment::getAtmAmbientLightScale | ( | ) |
get the atmospheric Ambient Light scale.
| void ssEnvironment::setAtmSkyScale | ( | float | scale | ) |
set the atm sky scale factor to adjust the IR sky temperature
| scale |
| float ssEnvironment::getAtmSkyScale | ( | ) |
get the atm sky scale factor to adjust the IR sky temperature
set number of texture Ranges
| ranges |
| unsigned int ssEnvironment::getNumberRanges | ( | ) |
get number of texture Ranges used by the atm table.
set number of object altitudes Used by the atm and light source tables for the object altitude dimension.
| alts |
| unsigned int ssEnvironment::getNumberObjectAltitudes | ( | ) |
get number of object altitudes
| unsigned ssEnvironment::getNumberObjectAngles | ( | ) |
get number of object angles
set number of angles
| angles |
| unsigned int ssEnvironment::getNumberScatAngles | ( | ) |
get number of scatter angles
set number of scatter angles
| angles |
set number of altitudes Used by the atm table for the sensor altitude dimension.
| alts |
| unsigned int ssEnvironment::getNumberSensorAltitudes | ( | ) |
get number of altitudes
| void ssEnvironment::setMaxRange | ( | double | range | ) |
sets the max environment range or the sky dome radius Used by the atm table for the range dimension.
| range |
| double ssEnvironment::getMaxRange | ( | ) |
gets the max environment range or the sky dome radius
| void ssEnvironment::setPowRange | ( | double | p | ) |
set power of i/(n-1) for range indexing.
| double | power |
| double ssEnvironment::getPowRange | ( | ) |
get power of i/(n-1) for range indexing.
| void ssEnvironment::setPowDensity | ( | double | p | ) |
set power of -log(density) in ATM LUT.
| double | power |
| double ssEnvironment::getPowDensity | ( | ) |
get power of -log(density) for range indexing.
| void ssEnvironment::setMaxAltitude | ( | double | maximum | ) |
set maximum altitude for both the sensor and object altitude dimensions of the atm table.
| maximum | altitude |
| double ssEnvironment::getMaxAltitude | ( | ) |
get maximum altitude for both the sensor and object altitude dimensions of the atm table.
| void ssEnvironment::setPowAltitude | ( | double | p | ) |
set power of i/(n-1) for altitude indexing.
| double | power |
| double ssEnvironment::getPowAltitude | ( | ) |
get power of i/(n-1) for altitude indexing.
| double ssEnvironment::getRangeScale | ( | ) |
get inverse maximum Range scaled by the number of ranges
| double ssEnvironment::getObjectAltitudeScale | ( | ) |
get inverse of maximum object altitude scaled by number of object altitudes
| 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.
| 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.
| rate |
| double ssEnvironment::getRainTemp | ( | ) |
get rain temperature [degC]
| void ssEnvironment::setRainTemp | ( | double | temp | ) |
set rain temperature [degC]
| temp |
| double ssEnvironment::getSensorAltitudeScale | ( | ) |
get inverse of maximum sensor altitude scaled by number of sensor altitudes
| void ssEnvironment::setUpdateInterval | ( | double | deltaHours | ) |
set the update interval used by the thermal solver to generate new temperatures
| 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
| void ssEnvironment::setLUTPrecomputationRange | ( | bool | lut_precomp_enable, |
| double | lut_tod_start, | ||
| double | lut_tod_end, | ||
| double | lut_tod_interval = 0.25 |
||
| ) |
| bool | enable/disable |
| double | starting TOD |
| double | ending TOD |
| double | TOD interval |
| void ssEnvironment::getLUTPrecomputationRange | ( | bool & | lut_precomp_enable, |
| double & | lut_tod_start, | ||
| double & | lut_tod_end, | ||
| double & | lut_tod_interval | ||
| ) |
| 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.
| sensor | - the sensor |
| numBins | - number of spectral bins |
| maxOptDepth | - maximum optical depth for each spectral bin |
Tells whether the ATM LUT is modified B&N mode or original rectangular mode.
| sensor | - pointer to the sensor |
if(m_OriginalCode==false), this flag turns on the Modified B&N atmospheric LUT processing.
| bool ssEnvironment::getMBNATM | ( | ) |
if(m_OriginalCode==false), this flag turns on the Modified B&N atmospheric LUT processing.
| bool ssEnvironment::getOriginalCode | ( | ) |
Find out whether to reproduce code as of Sept.
2012
| bool ssEnvironment::getModRad | ( | ) |
Use Modtran/Radtran directly to fill LUTs (slow!!)
| void ssEnvironment::getAtmTableTransmission | ( | ssSensor * | sensor, |
| double | sensorAlt, | ||
| double | objectAlt, | ||
| double | objectRange, | ||
| double & | transmission, | ||
| double & | pathRadiance | ||
| ) |
| void ssEnvironment::getLightSourceTableIrradiances | ( | ssSensor * | sensor, |
| double | objectAlt, | ||
| double & | ambientIrradiance, | ||
| double & | directIrradiance | ||
| ) |
Gets the passband irradiance values for an object from the sensor's Light Source table.
| sensor | |
| objectAlt | |
| ambientIrradiance | |
| directIrradiance |
set the diurnal cache method to use the fast version that uses the ssAtmospheric table information rather than the SigSim version.
| flag |
| bool ssEnvironment::isGenerateFastDiurnalCache | ( | ) |
returns true if the fast diurnal cache method is to be used.
| void ssEnvironment::setWaterVaporPartialPressureScaleFactor | ( | double | wvpp | ) |
| wvpp |
| double ssEnvironment::getWaterVaporPartialPressureForCurrentTimeOfDay | ( | ) |
| double ssEnvironment::findClosestDefaultWaterVaporPartialPressure | ( | char * | sigsim_data_dir, |
| double | wvpp | ||
| ) |
| sigsim_data_dir | |
| wvpp |
| void ssEnvironment::setSeasonBasedOnLocation | ( | ) |
Set the season used by Modtran using the current location.
| int ssEnvironment::useModcardParamsToGenerateCorrespondingATMState | ( | char * | sigsim_data_dir, |
| char * | sigsim_cache_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.
| sigsim_data_dir | |
| outfilebasename |
| 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.
| bool ssEnvironment::isAtmosphereDirty | ( | ) |
returns true if the atmosphere needs to be updated
| void ssEnvironment::setAtmosphereDirty | ( | ) |
indicates that atmosphere needs to be updated
tell ssEnvironment to defer atmospheric updates.
Avoids unwanted updates for multiple API calls
| bool ssEnvironment::isAtmosphericUpdateDeferred | ( | ) |
return whether the atmospheric updates are defered or not
Tell ssEnvironment to update the current state of the atmospherics.
| bool ssEnvironment::isAtmosphericsUpdated | ( | ) |
isUpdateButtonPressed?
Tell ssEnvironment whether the refraction earth radius ratio should be fixed at 4/3.
| bool ssEnvironment::isConstEratio | ( | ) |
has the refraction earth radius ratio been set to a constant 4/3?
| void ssEnvironment::getRefractionProfile | ( | ssSensor * | sensor, |
| double & | n0, | ||
| double & | h0, | ||
| ellipsoid & | E | ||
| ) |
gets the refraction profile (n0 [1], h0 [km], Ellipsoid)
generate a Modtran based lookup table of visible range in the different sensor bands
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.
| double ssEnvironment::getMeanWaveHeight | ( | ) |
| double ssEnvironment::computeSkyAngleExponent | ( | ) |
| int ssEnvironment::sigsimUpdateEnvironment | ( | double | alt_m | ) |
| bool ssEnvironment::queryIrradianceCache | ( | char * | cacheDirectory | ) |
Checks to see if there is a valid irradiance cache.
If so, it loads it.
| JRM | data directory. |
| void ssEnvironment::saveIrradianceCache | ( | char * | cacheDirectory | ) |
saves the irradiance cache.
| JRM | data directory. |
indicates that the atmosphere LUT and environment LUT need to be updated for the provided sensor
|
private |
|
private |
sets the sensor's max light level based on the maximum or minimum irradiance thru out the diurnal cycle.
| sensor |
|
private |
generates the diurnal cache used by the thermal solver - this uses the ssAtmospheric table to quickly generate the diurnal cache
|
private |
fills SigSim's metin structure with default values
inserts a sensor atmospheric table into the sensor source map
| sensor |
|
private |
set the julian date - user should use setDate
| long | julian [day] |
|
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.
|
private |
indicates that atmosphere has been updated
|
private |
indicates that atmosphere luts need to be updated
loops through sensors associated with all ATM LUTs to see if there are any which need to be flagged for update due to a time change
|
friend |
|
friend |
|
private |
current date
|
private |
|
private |
|
private |
current time 0 - 24 hours
|
private |
|
private |
|
private |
|
private |
minimum time change in hours needed to engage change in time check
|
private |
SigSim night sky table file.
|
private |
SigSim man-made light source file.
|
private |
SigSim bathymetry table file.
|
private |
SigSim atmosphere file.
|
private |
maximum ATM LUT altitude in meters
|
private |
power of i/(n-1) for altitude indexing.
|
private |
maximum ATM LUT range in meters
|
private |
power of i/(n-1) for range indexing.
|
private |
power of (-log(density)) in ATM LUT.
|
private |
SigSim meterological info.
|
private |
use the sun for the lighting/atm calculations.
|
private |
use the both the sun and moon for the lighting/atm calculations.
|
private |
spectral mode flag - set false for normal IG mode
|
private |
atmosphere enable master
|
private |
scattering enable master
|
private |
multi scattering enable master
|
private |
round earth enable master
|
private |
switch to use optical depth restriction on max pathlength
|
private |
BNN Mode.
|
private |
4/3 refractive earth radius ratio
|
private |
|
private |
|
private |
flag to determine if this atmospheric data needs to be updated.
|
private |
flag to indicate that the geodetic location has changed to get sun/moon position to update.
|
private |
flag to determine if the fast diurnal cache should be used rather than the SigSim version
|
private |
Enables a range over which ENV/ATM LUTs will be pre-generated for all sensors, in a given atmosphere:
|
private |
|
private |
|
private |
|
private |
number of ground ranges in lut
|
private |
number of object altitudes
|
private |
number of object angles
|
private |
number of sensor altitudes
|
private |
number of scatter angles
|
private |
scale factor to increase/decrease the visiblity
|
private |
scale factor to increase/decrease the ambient light
|
private |
scale factor to increase/decrease tm sky scale factor to adjust the IR sky temperature
|
private |
indicates whether to use user defined temperatures
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |