13 #ifndef _ssEnvironment_
14 #define _ssEnvironment_
38 MidLatitudeSummer = 2,
39 MidLatitudeWinter = 3,
56 Tropospheric_50km = 6,
81 Nimbostratus_Light = 7,
82 Nimbostratus_Moderate = 8,
86 Subvisual_Cirrus = 19,
116 void setLUTSizeDefaults();
135 bool updateAtmospherics(
ssSensor* sensor,
double sensorAltitude = 1.0,
bool checkReload =
true,
bool setLUTSize =
true);
152 float *getLightSourceData(
ssSensor *sensor,
unsigned int &Nx,
unsigned int &Ny,
unsigned int &Nc);
191 float* getSensorAtmosphericData(
ssSensor* sensor,
192 unsigned int &Nx,
unsigned int &Ny,
unsigned int &Nz,
193 unsigned int &bins,
unsigned int &comps);
204 float* getSunDiskRadiance(
ssSensor* sensor,
unsigned int& bins);
215 float* getMoonDiskRadiance(
ssSensor* sensor,
unsigned int& bins);
229 float* getManMadeLightData(
ssSensor* sensor,
230 unsigned int& numLights,
unsigned int& bins);
248 int getNumberManMadeLights();
259 double getManMadeLightRadiance(
ssSensor* sensor,
int lightNum);
270 void setDate(
unsigned int day,
unsigned int month,
unsigned int year);
280 void getDate(
unsigned int& day,
unsigned int& month,
unsigned int& year);
288 void setTimeOfDay(
double tod);
296 double getTimeOfDay();
312 void setJRMTimeOfDay(
JRMTIME time);
320 void setSimulationTime(
double simTime);
328 double getSimulationTime(
void);
336 int getSensorAltitudeIndex(
double alt);
344 void setAtmosphereStateFile(
const char*
name);
352 char* getAtmosphereStateFile();
360 bool getAtmosphericTableChanged()
const
362 return m_AtmTableChanged;
371 void setAtmosphericTableChanged(
bool state)
373 m_AtmTableChanged = state;
383 void setNightSkyTableFile(
char*
name);
392 char* getNightSkyTableFile();
401 void setBathymetryTableFile(
char*
name);
410 char* getBathymetryTableFile();
419 void setMMLSTableFile(
char*
name);
428 char* getMMLSTableFile();
438 void setAirGroundTempCalcMode(
bool Calc_Ta_Tback);
448 bool getAirGroundTempCalcMode();
456 void setMaxDiurnalTemperature(
double tempMax);
464 void setMinDiurnalTemperature(
double tempMin);
472 double getMaxDiurnalTemperature();
480 double getMinDiurnalTemperature();
488 void setCurrentAirTemperature(
double Ta);
496 double getCurrentAirTemperature();
510 void setAirModelOption(
int air_model_option);
529 int setUserDefinedAirTemperatures(
int numberIntervals,
double* airTemperature);
546 int setUserDefinedAirTemperatures(
int numberIntervals,
double* airTemperature,
double* timeOfDays);
554 bool isUserDefinedAirTemperature();
561 void disableUserDefinedAirTemperature();
569 void setModtranAtmModel(
const ModtranAtmModel model);
577 ModtranAtmModel getModtranAtmModel();
585 void setModtranHazeModel(
const ModtranHazeModel haze);
593 ModtranHazeModel getModtranHazeModel();
601 void setModtranAirMassCharacter(
int coastalinfluence);
609 int getModtranAirMassCharacter();
617 void setModtranSeason(
const ModtranSeason season);
625 ModtranSeason getModtranSeason();
633 void setModtranVisibility(
double vis);
641 double getModtranVisibility();
649 void setWindVelocity(
double windVelocity);
657 double getWindVelocity();
665 void setWindDirection(
double EofN);
673 double getWindDirection();
681 void setRelativeHumidity(
double relative_humidity);
689 double getRelativeHumidity();
697 void setGroundTemperature(
double Tbackground);
705 double getGroundTemperature();
713 void setAtmosphericPressure(
double Pressure);
721 double getAtmosphericPressure();
729 void setModtranClouds(
const ModtranClouds clouds);
746 void setCloudParameters(
int numCloudLayers,
float thickness,
float baseAltitude,
float extinctionScale,
float waterDensity);
763 void setCloudLayerParameters(
int layer,
float altitude,
float waterDensity,
float iceDensity,
float rainRate);
774 void setCloudLayerParameters(
int layer,
float altitude,
float visibility);
781 ModtranClouds getModtranClouds();
792 void getCloudParameters(
int& numCloudLayers,
float& thickness,
float& baseAltitude,
float& extinctionScale,
float& waterDensity);
804 void getCloudLayerParameters(
int layer,
float& altitude,
float& waterDensity,
float& iceDensity,
float& rainRate);
813 void setGeodeticOrigin(
double lat,
double lon);
822 void getGeodeticOrigin(
double& lat,
double& lon);
831 void setUpdateTime();
857 void setUseSun(
bool flag);
876 void setUseBothSunMoon(
bool flag);
885 bool getUseBothSunMoon();
893 double getNightTimeConstant();
901 double getSkyAngleFactor();
911 void getSunMaxPosition(
double& i,
double& j,
double& k);
922 void getSunPlaneVectorENU(
double& i,
double& j,
double& k);
932 void getSunPosition(
double& i,
double& j,
double& k);
942 void getMoonPosition(
double& i,
double& j,
double& k);
954 bool getSunMoonPosition(
double& i,
double& j,
double& k);
963 double getMoonPhase();
977 void getStarPosition(
int starNum,
double& i,
double& j,
double& k,
978 double& temperature,
double& attenuation);
992 void getStarPositionRadiance(
ssSensor* sensor,
int starNum,
double& i,
double& j,
double& k,
double& radiance);
1000 void initMaxStarParameters(
ssSensor* sensor,
double maxSize = 5.0,
int starNum = -1);
1008 double getMaxStarRadiance();
1025 void getStarPositionRadiance(
ssSensor* sensor,
int starNum,
double& i,
double& j,
double& k,
double& radiance,
double&
size);
1033 unsigned int getNumberStars();
1041 unsigned int getNumberWavelengths();
1050 double* getWavelengthsArray();
1058 long getJulianDate();
1067 void setUpdateBuffer(
double hours);
1075 double getUpdateBuffer();
1089 void setSpectralMode(
bool flag);
1097 bool isSpectralMode();
1107 void setAtmEnable(
bool flag);
1125 void setScatterEnable(
bool flag);
1133 bool isScatterEnable();
1143 void setMultiScatterEnable(
bool flag);
1151 bool isMultiScatterEnable();
1162 void setRoundEarth(
bool flag);
1170 bool isRoundEarth();
1178 void setUseODLimit(
bool flag);
1186 bool getUseODLimit();
1197 void setAtmExtinctionScale(
float scale);
1205 float getAtmExtinctionScale();
1214 void setAtmAmbientLightScale(
float scale);
1222 float getAtmAmbientLightScale();
1230 void setAtmSkyScale(
float scale);
1238 float getAtmSkyScale();
1246 void setNumberRanges(
unsigned int ranges);
1254 unsigned int getNumberRanges();
1263 void setNumberObjectAltitudes(
unsigned int alts);
1271 unsigned int getNumberObjectAltitudes();
1279 unsigned getNumberObjectAngles();
1287 void setNumberObjectAngles(
unsigned int angles);
1296 unsigned int getNumberScatAngles();
1304 void setNumberScatAngles(
unsigned int angles);
1313 void setNumberSensorAltitudes(
unsigned int alts);
1321 unsigned int getNumberSensorAltitudes();
1330 void setMaxRange(
double range);
1338 double getMaxRange();
1346 void setPowRange(
double p);
1354 double getPowRange();
1362 void setPowDensity(
double p);
1370 double getPowDensity();
1380 void setMaxAltitude(
double maximum);
1389 double getMaxAltitude();
1397 void setPowAltitude(
double p);
1405 double getPowAltitude();
1413 double getRangeScale();
1421 double getObjectAltitudeScale();
1430 double getRainRate();
1439 void setRainRate(
double rate);
1447 double getRainTemp();
1455 void setRainTemp(
double temp);
1463 double getSensorAltitudeScale();
1471 void setUpdateInterval(
double deltaHours);
1479 double getUpdateInterval();
1489 void setLUTPrecomputationRange(
bool lut_precomp_enable,
double lut_tod_start,
double lut_tod_end,
double lut_tod_interval = 0.25);
1499 void getLUTPrecomputationRange(
bool& lut_precomp_enable,
double& lut_tod_start,
double& lut_tod_end,
double& lut_tod_interval);
1521 void getSensorPolarATMLUTData(
ssSensor* sensor,
unsigned int& numSensAlts,
unsigned int& numObjAngles,
unsigned int& numScatAngles,
unsigned int& numBins,
1522 float** xmitData,
float** pradData,
float** sradData,
float** mradData);
1533 void getSensorMaxOptDepth(
ssSensor* sensor,
unsigned int& numBins,
float** maxOptDepth);
1551 void setMBNATM(
bool onoff);
1567 void setOriginalCode(
bool onoff);
1574 bool getOriginalCode();
1581 void setModRad(
bool onoff);
1605 void getTransmission(
ssSensor* sensor,
1606 double sensorGeoC[3],
double sensorOrient[3],
double entityGeoC[3],
1607 double** transmission,
double** pathRadiance,
double** scatterRadiance);
1621 void getTransmission(
ssSensor* sensor,
double objectAlt,
double objectRange,
1622 double** transmission,
double** pathRadiance,
double** scatterRadiance);
1634 double saveRangeTransCompare(
ssSensor* sensor,
double objectAlt);
1635 #endif // _LOS_Prop_
1651 void getAtmTableTransmission(
ssSensor* sensor,
double sensorAlt,
double objectAlt,
double objectRange,
double& transmission,
double& pathRadiance);
1664 void getLightSourceTableIrradiances(
ssSensor* sensor,
double objectAlt,
1665 double& ambientIrradiance,
double& directIrradiance);
1674 void setGenerateFastDiurnalCache(
bool flag);
1682 bool isGenerateFastDiurnalCache();
1690 void setWaterVaporPartialPressureScaleFactor(
double wvpp);
1698 double getWaterVaporPartialPressureForCurrentTimeOfDay();
1708 double findClosestDefaultWaterVaporPartialPressure(
char* sigsim_data_dir,
double wvpp);
1716 void setSeasonBasedOnLocation();
1729 int useModcardParamsToGenerateCorrespondingATMState(
char* sigsim_data_dir,
char* sigsim_cache_dir,
char* outfilebasename);
1741 bool getEnvIrradianceRatios(
double& EsundirRatio,
double& EsundifRatio,
double& EskyRatio,
double& EearthRatio);
1752 bool getEnvIrradianceAverageRatios(
double& EsundirAveRatio,
double& EsundifAveRatio,
double& EskyAveRatio,
double& EearthAveRatio);
1765 METIN* getMetinPtr();
1773 bool isAtmosphereDirty();
1780 void setAtmosphereDirty();
1788 void deferAtmosphericUpdates(
bool flag);
1795 bool isAtmosphericUpdateDeferred();
1802 void setUpdateAtmospherics(
bool flag);
1809 bool isAtmosphericsUpdated();
1816 void setConstEratio(
bool flag);
1823 bool isConstEratio();
1830 void getRefractionProfile(
ssSensor* sensor,
double& n0,
double& h0,
ellipsoid& E);
1837 void setVisibilityRangeEnable(
bool state);
1845 void initVisibilityRange(
SigSimRT* ss);
1852 void releaseVisibilityRange();
1859 bool getVisibilityRange(
float visibleRange,
ssSensor* sensor,
float& sensorRange,
1860 float cloudCoverage,
bool isGroundFog,
float& visiblityEmissionFactor);
1867 void getCloudProperties(
ssSensor* sensor,
float& humidity,
float& extinction,
float& lightResponse,
1868 float& ambientLightResponse,
float& secondaryLightResponse,
float& density);
1873 double getMeanWaveHeight();
1878 double computeSkyAngleExponent();
1889 int sigsimUpdateEnvironment(
double alt_m);
1898 bool queryIrradianceCache(
char* cacheDirectory);
1906 void saveIrradianceCache(
char* cacheDirectory);
1915 bool isAtmosphereLutForSensorDirty(
ssSensor* sensor)
const;
1918 void interpolateFour(
double fraction[2],
double input1[4],
double input2[4],
double* output1,
double* output2);
1919 void interpolateEight(
double fraction[3],
double input1[8],
double input2[8],
double* output1,
double* output2);
1930 void setAutoLightLevel(
ssSensor* sensor);
1939 bool generateDiurnalCache();
1946 void loadDefaults();
1955 bool insertSensorAtmosphericTable(
ssSensor* sensor);
1963 void setJulianDate(
long julian);
1973 double timeHasChangedSinceLastUpdate();
1980 void clrAtmosphereDirty();
1988 void setAtmosphereLutsDirty();
1996 void checkSensorTimesChanged(
bool explicitTimeChanged);
2116 struct Implementation;
2120 #endif // _ssEnvironment_