VR-Vantage 3.1 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
sigsim.h
Go to the documentation of this file.
1 
2 /* © 1998 JRM Technologies, Inc.*/
3 
4 #ifndef _SIGSIM_H_
5 #define _SIGSIM_H_
6 
7 #include "JRMDefines.h"
8 #include "JRMlibrary.h"
9 #include "Ellipsoid.h"
10 #include "atm_common.h"
11 #include "SigSimDefines.h"
12 
13 #ifdef USEMODRAD
14  #include "modrad_common.h"
15  #include "SSModRadStruct.h"
16 #endif
17 
18 #include "SigSimStructs.h"
19 #include "mmlsources.h"
20 #include "Radar.h"
21 
22 
23 #if SIGSIM_PRODUCT == SIGSIM3A
24 //TODO: These header files not present for SenSim4/SigSim7, do we need going forward...
25 //#include "Sonar.h"
26 //#include "RFsig.h"
27 #endif
28 
29 #include "sigsimDLLstub.h"
30 
31 #ifdef __cplusplus
32 extern "C"
33 {
34 #endif
35 
36 /* ================================ LICENSING ================================================================= */
37 
38 // check the registration license, the preferred method
39 // if policiesMsg is sepcified as non-NULL, then upon success it receives a human-readable string with details regarding the acquired license (e.g. activation / expiration times, usage / maintenance periods, etc.)
40 SIGSIM_API int SigSimRegistrationCheck(char *const policiesMsg, const size_t policiesMsgSize);
41 // check the registration license, the old method
42 SIGSIM_API int reg_check(const char* iRegPath);
43 SIGSIM_API const char *getSigSimVersion();
44 //SIGSIM_API int SigSimCheckExpirationDate(char *expirationDate);
45 
46 
47 /* ============================== MATERIAL SYSTEMS =================================================== */
48 
49 #if 0
50 typedef struct
51 {
52  double k; // thermal conductivity [W/m/degK]
53  double cp; // specific heat [J/kg/degK]
54  double rho; // density [kg/m3]
55  double eps; // emissivity [unitless]
56  double tau; // transmissivity [unitless]
57 } MTLPROP;
58 
59 typedef struct
60 {
61  double D; // thickness [m]
62  long N; // number of nodes [unitless]
63  double dt; // time step [s]
64  double Eb; // back-side irradiance [W/m2]
65  double Ef; // front-side irradiance [W/m2]
66  double Tinit; // Initial node temperatures [degK]
67  double deltaTthresh; // Threshhold for stopping [degK] - change in temperature
68  double lambda; // wavelength [um]
69 } THERMALSCENARIO;
70 #endif
71 
73 {
74  io, // Infrared & Optical
75  rf // RadioFrequency
76 };
77 
79 {
80  un, // Unpolarized
81  hh, // Incident Horizontally Polarized, Reflected Horizontally Polarized
82  hv, // Incident Horizontally Polarized, Reflected Vertically Polarized
83  vh, // Incident Vertically Polarized, Reflected Horizontally Polarized
84  vv // Incident Vertically Polarized, Reflected Vertically Polarized
85 };
86 
87 
88 typedef enum
89 {
90  SIGSIM_PHONG = -1, // Supported as of SS4.8. Just a more convenient set of params which are converted to Phong params
91  ORIGINAL_PHONG = 0, // Supported as of SS4.8. The traditional, non-energy-conserving, fixed-angle Phong model, with max shininess=128.
92  SANDFORD_ROBERTSON = 1, // Supported as of SS4.8.
93  BECKMANN = 2, // Supported as of SS4.9.
94  PHONG = 3, // Supported as of SS4.8. An energy-conserving, angle-dependent Phong model, of unlimited shininess.
95  UDRADAR = 4,
96  SONAR = 5,
98 } BRDF_MODEL;
99 
100 typedef struct
101 {
102  //double Amin; // [unitless] minimum evap area ratio (already exists in mp_table and isn't time dependent).
103  double DeltaAsun; // [unitless] solar-dependent delta-evaparea
104  double H; // [unitless] derivative of convection coeff w.r.t. angle, divided by convect coeff
105  double W; // [unitless] derivative of evap coeff w.r.t. temperature, divided by evap coeff / dTcos
106  double EconvZV; // [unitless] ratio of (V-Z) convection flux difference to total flux Etot
107  double EconvZA; // [unitless] ratio of (Z-Air) convection flux difference to total flux Etot
108  double Eevap; // [unitless] ratio of evap flux contribution (for up normal) to total flux Etot
109  double DeltaT2; // [degK] 2nd-order dTcos = full dTcos * [Etot/Q_diff(V,d,0,t)] * [Etot/Q_diff(V,d,0,t)]
110 } GPUCOEFF2; // Set of 2nd-order GPU Factor material-dependent coefficients for a given normal
111 
112 typedef struct
113 {
114  jrmbool ORDER2FLAG; // [bool] Input Flag to control whether 2nd-order mode 2 contributions should be included in SigSimC predicted Tsurf result.
115  double absorbratio; // [unitless] Input ratio of aS to eL used as approximation to real ratio in Q_diff calculation for SigSimC predicted Tsurf result.
116  double d; // [unitless] Calculated Backside irradiance factor : 0 = no backside irradiance, 1 = backside irradiance possible.
117  double c; // [unitless] Calculated Sky irradiance horizon factor.
118  double DCCN, DCCH; // [unitless] Calculated conduction factors to be multiplied by (1 + dTcos/(Tncos+CTOK)) and added in to Qdiff Numerator and Denominator.
119  GPUCOEFF2 gpu2; // [unitless] current-time 2nd-order arrays for the sun-tracking normal
120 } GPUFACTOR; // Set of GPU Factor coefficients for a given material
121 
122 typedef struct
123 {
124  // Material System Input Attributes
125  char matl[50]; // Material System name
126  double alt; // [m] Altitude of material system
127  int bc1; // [enum] Type of boundary condition applied to top surface of mat sys.
128  double T1; // [degC] Temperature parameter for top surface boundary condition. Meaning depends on bc1 setting.
129  double V1; // [m/s] Convection speed parameter for top surface boundary condition. Meaning depends on bc1 setting.
130  double Q1; // [W/m2] Constant Heat Load applied to top surface of mat sys.
131  int bc2; // [enum] Type of boundary condition applied to bottom surface of mat sys.
132  double T2; // [degC] Temperature parameter for bottom surface boundary condition. Meaning depends on bc2 setting.
133  double V2; // [m/s] Convection speed parameter for bottom surface boundary condition. Meaning depends on bc2 setting.
134  double Q2; // [W/m2] Constant Heat Load applied to bottom surface of mat sys.
135  VECTOR norm; // [unitless] Surface normal vector of top surface of material system, pointing outwards
136  double shadowflag; // [unitless] Shadow flag is = 1 for completely shaded system, 0 for completely exposed system.
137  double Tback; // [degC] Background and initial material system temperatures in [deg C]
138  int thermal_solver_mode;// [enum] SOLVER_MODE NORMAL_USED CACHE_MODE
139  // 0 Steady-state MS-file-given No cache
140  // 1 Full-Transient MS-file-given No cache
141  // 2 Full-Transient From GPU No cache
142  // 3 Steady-state MS-file-given Use cache as found
143  // 4 Full-Transient MS-file-given Use cache as found
144  // 5 Full-Transient From GPU Use cache as found
145  // 6 Steady-state MS-file-given Generate/fill cache, then Use cache as found.
146  // 7 Full-Transient MS-file-given Generate/fill cache, then Use cache as found.
147  // 8 Full-Transient From GPU Generate/fill cache, then Use cache as found.
148  int num_layers; // [#] Number of "pure material" layers in this material system.
149  char material_type[50]; // name of other file to extract intrinsic physical prop values
150  char *layer_matl_name; // Array of "Pure material" filenames from which to extract intrinisic physical prop values for each layer.
151  double d; // [m] Thickness of material system as a whole.
152  double p; // [kg/m3] Mass density of material system as a whole.
153  double kt; // [W/m/degK] Thermal Conductivity of material system as a whole.
154  double ch; // [J/kg/degK] Specific Heat Capacity of material system as a whole.
155  double lhf; // [J/kg] Latent heat of fusion (currently unsupported 080924)
156  double lhs; // [J/kg] Latent heat of sublimation (currently unsupported 080924)
157  double lhv; // [J/kg] Latent heat of vaporization (currently unsupported 080924)
158  double rtype; // [unitless] Surface normal dependence of aerodynamic heating.
159  double stan; // [unitless] Stanton Number for aerodynamic heating.
160  double vac; // [m/s] Speed of sound in medium.
161 
162  // "Pure Material" Layer Bulk Attributes
163  double *layer_p; // [kg/m3] Mass density of pure material at layer j.
164  double *layer_kt; // [W/m/degK] Thermal conductivity of pure material at layer j.
165  double *layer_ch; // [J/kg/degK] Specific heat capacity of pure material at layer j.
166  double *layer_dx; // [m] Node spacing within pure material at layer j.
167  double *layer_d; // [m] Thickness of pure material at layer j.
168  int *layer_numnodes;// [#] Stores the number of nodes in layer j.
169 
170  // Nodal Mesh Bulk Attributes
171  int num_nodes; // [#] Number of nodes in material system.
172  double dx; // [m] Average node spacing.
173  double dt; // [s] Time step for nodal solution.
174  double *dxi; // [m] Thickness of node i.
175  double *pi; // [kg/m3] Mass density of node i.
176  double *kti; // [W/m/degK] Thermal Conductivity of node i.
177  double *chi; // [J/kg/degK] Specific Heat Capacity of node i.
178  double *T; // [degC] Calculated instantaneous Full Temperature of node i.
179  double *Tbase; // [degC] Calculated instantaneous Diffuse-Only Temperature of node i.
180 
181  // Bulk surface optical scalars -- apply to first layer only, so always understood to be layer 0
182  double aS; // [unitless] Solar absorptivity = spectral average of emissivity over range 0.2-3.0 um.
183  double eL; // [unitless] Lambertian emissivity = spectral average of emissivity over range 0.2-25um.
184  double angleDHR; // [deg] Angle at which DHR was measured.
185  BRDF_MODEL BRDFmodel; // [enum] BRDF model to use (e.g. Phong, SigSim (Modified Phong), Sandford-Robertson).
186 
187  // Array surface Optical/BRDF Model parameters -- apply to first layer only, so always understood to be layer 0
188  long nspecrecs; // [#] Number of spectral records (sets of parameters for a given wavelength bin)
189  double *lambda_um; // [um] Middle wavelength of wavelength bin.
190  /* //------- Original --------
191  double *DHR;
192  double *percentSpec;
193  double *lobe_width;
194  double *SRe;
195  double *SRpd;
196  double *SRb;
197  double *SRel;
198  double *PhongA;
199  double *PhongD;
200  double *PhongS;
201  double *PhongShine;
202  */
203  // --------- New ------------
204  enum ReflectType *reflectflag; // [enum] Flag to show whether this record's data is for EO/IR band use or RF use.
205  enum Polarization *polarflag; // [enum] Polarization component flag.
206  double *param1; // reflectflag='io': JRM DHR [unitless 0-1]. // reflectflag='rf': Constant term [dB] in Ulaby/Dobson RCS
207  double *param2; // reflectflag='io': JRM Percent Specular [unitless 0-100]. // reflectflag='rf': Coefficient [dB] of exponential term in Ulaby/Dobson RCS
208  double *param3; // reflectflag='io': JRM Lobe Width [degrees, full angle]. // reflectflag='rf': Zenith multiplier [unitless] in exponent of Ulaby/Dobson RCS
209  double *param4; // reflectflag='io': SR Lobe Width Parameter [unitless]. // reflectflag='rf': Coefficient [dB] of cosine term in Ulaby/Dobson RCS
210  double *param5; // reflectflag='io': SR Hemispherical Emissivity [unitless 0-1].// reflectflag='rf': Zenith multiplier [unitless] in cosine argument of Ulaby/Dobson RCS
211  double *param6; // reflectflag='io': SR Grazing Angle Parameter [unitless]. // reflectflag='rf': Constant phase [rad] in cosine argument of Ulaby/Dobson RCS
212  double *param7; // reflectflag='io': Transmittance [unitless 0-1]. // reflectflag='rf': Constant term [dB] in Ulaby/Dobson RCS Standard Deviation
213  double *param8; // reflectflag='io': Phong Ambient [unitless 0-1]. // reflectflag='rf': Coefficient [dB] of exponential term in Ulaby/Dobson RCS Standard Deviation
214  double *param9; // reflectflag='io': Phong Diffuse [unitless 0-1]. // reflectflag='rf': Zenith multiplier [unitless] in exponent of Ulaby/Dobson RCS Standard Deviation
215  double *param10;// reflectflag='io': Phong Specular [unitless 0-1]. // [unused]
216  double *param11;// reflectflag='io': Phong Shininess [unitless 0-127]. // [unused]
217 
218  // Internal-use computed material system quantities for Thermal Models
219  double Tncos; // [degC] Instantaneous Base surface temperature (solver modes 0,2,3,5,6,8}, or Full temperature (modes 1,4,7).
220  double dTcos; // [degC] Instantaneous Difference between solar-loaded and base temperature, to be multiplied by a normal-dependent GPU factor.
221  double QdiffH; // [unitless] Instantaneous Qdiff denominator (sun-tracking) for mode 2 processing.
222  double dTcosInit; // [degC] Midnight value of dTcos for use in mode 2 GPU factor conduction term. (CF081103).
223  double Tsurf; // [degC] Instantaneous Full surface temperature (all modes).
224  int TempCacheMode; // [enum] 0=Don't use cache, 1=Use Cache only, 2=Fill Cache (forward full cycle to current), then set mode to 1.
225  int nelements; // [#] Number of elements in diurnal cache arrays. nelements=(long)floor(DIURNAL/metin->env_update_interval).
226  double *TncosCache; // [degC] Tncos diurnal cache array. First element is at time-of-day 0:00.
227  double *dTcosCache; // [degC] dTcos diurnal cache array. First element is at time-of-day 0:00.
228  double *QdiffHCache; // [unitless] Qdiff denominator (sun-tracking) time-dependent array for mode 2 processing.
229  double *TsurfaceCache; // [degC] Tsurface diurnal cache array. First element is at time-of-day 0:00.
230  JRMTIME last_update; // [time] Last date and time of day for which the material system has been updated.
231  double F0, FN_1; // [W/m2] Energy balance at top and bottom surfaces
232  double dFdt0,dFdtN_1; // [W/m2/s] Time derivative of flux balance at top and bottom surfaces.
233  double dFdT0,dFdTN_1; // [W/m2/degK] Temperature derivative of flux balance at top and bottom surfaces.
234  double diffusenormkmin; // [unitless] Cosine of angle between local up direction and horizon, at this altitude.
235  GPUFACTOR gpu; // [unitless] Coefficients of solver mode 2 expansion.
236  GPUCOEFF2 *gpu2Cache; // [unitless] Material-and-time-dependent arrays for mode 2 processing.
237 
238  // Evapotranspiration parameters
239  int soil_type; // [enum] 0 for no moisture, = 1 for soil moisture model, = 2 for foliage model
240  double Esunmax; // [W/m2] Maximum value of direct sunlight used to open stomata on plants
241  double evapareamin; // [m2/m2] Minimum fraction of leaf area exposed for evaporation (stomata closed).
242  double evapareamax; // [m2/m2] Maximum fraction of leaf area exposed for evaporation (stomata open).
243 
244  // BEGIN Unused wetness model info
245  int num_nodesw; // Number of moisture nodes
246  double dsurf; // Depth of surface moisture
247  double dbulk; // Depth of bulk moisture layers
248  double *W; // Pointer to moisture nodes
249  double saa; // Solar Absorptivity equation coefficients
250  double sab; // Solar Absorptivity equation coefficients
251  int cond_type; // Flag for Conduction equation, cond_type = 0 is A+B(Cube root of W), cond type = 1 is A*W^2+b*W+C
252  int cond_coeff_num; // Number of Conduction coefficient equations
253  double *kw; // Lists for Conduction equation coefficients. Coefficients are valid for >= kw
254  double *ka; // Lists for Conduction equation coefficients. Coefficients are valid for >= kw
255  double *kb; // Lists for Conduction equation coefficients. Coefficients are valid for >= kw
256  double *kc; // Lists for Conduction equation coefficients. Coefficients are valid for >= kw
257  int cap_coeff_num; // Number of Capacitive coefficient equations
258  double *pcw; // Lists for Conduction equation coefficients. Coefficients are valid for >= kw
259  double *pca; // Lists for Conduction equation coefficients. Coefficients are valid for >= kw
260  double *pcb; // Lists for Conduction equation coefficients. Coefficients are valid for >= kw
261  double *pcc; // Lists for Conduction equation coefficients. Coefficients are valid for >= kw
262  // END unused wetness model info
263 
264  // SigSim Computed output radiometric quantities for material system surface
269  double Mtotal_surf;
270  double Radiance;
271 
272  // Old members for backward compatibility
273  int ec1;
275  double elwir;
276  double emwir;
277  double rnir;
278  double dif;
279  double spec;
280  double shine;
281  double h;
282 
283  // Internal flags
285  int matl_link; // Material System Thermal Coupling link to another material system
286 
287 } MATL_PROP_TABLE; // material system properties defined in SigSim Material System File.doc
288 
289 typedef struct
290 {
291  BRDF_MODEL brdfType; // BRDF model in use here.
292  int numberParameters; // number of parameters for a particular BRDF
293  long numberWavelengths; // number of wavelength bins
294  double *parameter; // pointer to parameters per wavelength. 2D array indexed as parameter[param_index*numberWavelengths+wavelength_index].
295  double *Lemis; // [W/cm2/sr/um] Spectral Thermally Emitted Radiance (not OpenGL scaled). Sizeof(numberWavelengths).
296  double *Lrefl; // [W/cm2/sr/um] Spectral Reflected Radiance (not OpenGL scaled). Sizeof(numberWavelengths).
298 
299 #define NUM_SSP_PARAMS 5
300 #define NUM_OP_PARAMS 4
301 #define NUM_P_PARAMS 5
302 #define NUM_SR_PARAMS 5
303 #define NUM_BK_PARAMS 5
304 
305 /* //----- Parameter Descriptions for each supported BRDF_TYPE -----------
306 
307  BRDF_TYPE param_index MTL source param Description
308  --------- ----------- ---------------- -----------
309  SIGSIM_PHONG 0 1 JRM DHR [unitless 0-1]
310  SIGSIM_PHONG 1 2 JRM Percent Specular [unitless 0-100]
311  SIGSIM_PHONG 2 3 JRM Lobe Width [degrees, full angle]
312  SIGSIM_PHONG 3 NotSpectral JRM AngleDHR [degrees]
313  SIGSIM_PHONG 4 6 SR Grazing Angle Parameter (b) [unitless 0-1]
314  ORIGINAL_PHONG 0 8 (df1) Phong Ambient [unitless 0-1]
315  ORIGINAL_PHONG 1 9 (df1,2) Phong Diffuse [unitless 0-1]
316  ORIGINAL_PHONG 2 10 (df1,2) Phong Specular [unitless 0-1]
317  ORIGINAL_PHONG 3 11 (df3) Phong Shininess [unitless 0-128]
318  PHONG 0 8 Phong Ambient [unitless 0-1]
319  PHONG 1 9 Phong Diffuse [unitless 0-1]
320  PHONG 2 10 Phong Specular [unitless 0-1]
321  PHONG 3 11 Phong Shininess [unitless 0-infty]
322  PHONG 4 6 SR Grazing Angle Parameter (b) [unitless 0-1]
323  SANDFORD_ROBERTSON 0 Derived SR Total diffuse reflectance [unitless 0-1]
324  SANDFORD_ROBERTSON 1 4 SR Lobe Width Parameter (w or omega) [unitless 0-1]
325  SANDFORD_ROBERTSON 2 5 SR Total Emissivity (epsilon) [unitless 0-1]
326  SANDFORD_ROBERTSON 3 6 SR Grazing Angle Parameter (b) [unitless 0-1]
327  SANDFORD_ROBERTSON 4 7 SR Total Transmissivity (t) [unitless 0-1]
328  BECKMANN 0 Derived SR Total diffuse reflectance [unitless 0-1]
329  BECKMANN 1 Derived BK Lobe Width Parameter (m) [unitless 0-1]
330  BECKMANN 2 5 SR Total Emissivity (epsilon) [unitless 0-1]
331  BECKMANN 3 6 SR Grazing Angle Parameter (b) [unitless 0-1]
332  BECKMANN 4 7 SR Total Transmissivity (t) [unitless 0-1]
333 //------------------------------------------------------------------------ */
334 
335 // Allocate_MATL_SPECTRAL_TABLE_Arrays allocates memory for MATL_SPECTRAL_TABLE arrays.
336 // INPUTS : mst=pointer to single MATL_SPECTRAL_TABLE whose arrays are to be allocated.
337 // brdf_type indirectly specifies how many parameters will be allocated at each wavelength. See SigSimStructs.h
338 // nlambda=number of wavelengths (array elements) desired.
339 // RETURNS: SIGSIM_MEMORY_ALLOCATION_ERROR if arrays cannot be allocated.
340 // SIGSIM_SUCCESS otherwise.
341 // Allocate_MATL_PROP_TABLE_SpectralArrays() allocates memory for nspecrecs elements of the following arrays :
342 // lambda_um, reflectflag, polarflag, and params[1-11]. Sets mp_table->nspecrecs=nspecrecs.
344 SIGSIM_API int RemoveMATL_PROP_TABLEFromArray(MATL_PROP_TABLE **mp_table, int *nmatls, int index_to_remove);
351 SIGSIM_API int Free_MatlPropTables(MATL_PROP_TABLE **mp_table, long num_matls);
352 SIGSIM_API int Free_MatlPropTable_Arrays(MATL_PROP_TABLE *mp_table); // Frees arrays for SINGLE mp_table
353 SIGSIM_API int Free_MatlSpecTableArrays(MATL_SPECTRAL_TABLE *mst); // Frees just the spectral arrays.
355 long GetMPIndex(MATL_PROP_TABLE mp_table, enum ReflectType RT, enum Polarization PL, double lambda);
356 
357 
358 // CreateAggregateMaterial inputs an MS file, and creates an aggregate material file and MS record as weighted averages
359 // of the properties of the 1st layer materials. The aggregate MS record is appended to the end of the original MS file.
360 // The spectral density of the desired aggregate material is suppled via the input spectrum.
361 // INPUTS : ms_indir is the directory off of sigsim_data_directory where the MS file can be found.
362 // ms_infile is the name of the MS file
363 // histogram_infile is the name of a file containing a 1D array of histogram values (one per line) giving the relative
364 // proportions of the MS records in a swatch of the surface. These will be normalized and used as weighting factors.
365 // The histogram_infile must be located at sigsim_data_dir/ms_indir/histogram_infile.
366 // sigsim_data_dir is the root of the data directory, under which the ms_indir and mtl directories must be found.
367 // spectrum supplies the desired spectral density.
368 // OUTPUTS: (1) A material file "(ms_infile)Aggregate.mtl", to be found in the sigsim_data_dir/mtl directory.
369 // (2) A material system (MS) record "(ms_infile)Aggregate", to be found as the last entry in the original MS file.
370 // NOTES : This routine assumes there are no polarized EO/IR records or unpolarized RF records. It currently defines the cutoff
371 // between EOIR and RF as 26.0 microns.
372 SIGSIM_API int CreateAggregateMaterial(char *ms_indir, char *ms_infile, char *histogram_infile, char *sigsim_data_dir, SPECTRAL_DOMAIN spectrum);
373 
374 // SIGSIM_API int ComputeSpectralReflectanceParameters(long matl_index, MATL_PROP_TABLE *mp_table, BRDF_MODEL brdf_type, SPECTRAL_DOMAIN spectrum, MATL_SPECTRAL_TABLE *mst) ;
375 
376 
377 
378 /* =================================== ENVIRONMENT ===================================================== */
379 
380 typedef struct
381 {
382  char body[50];
383  double zenith; // [deg] zenith angle measured at scenario geodetic_loc for met_proc_modes<0; declination angle from celestial plane for met_proc_modes>0.
384  double azimuth; // [unitless real] = [dB]/4 for met_proc_modes<0, right ascension [hours 0-24] about celestial plane measured from equinox (clockwise when looking at zenith) for met_proc_modes>0
385  double Tcolor; // [degK] distribution temperature of equivalent blackbody
386  double atten; // [unitless] Attenuation coefficient for a stellar irradiance = projected solid angle fraction = (star radius / star distance from earth)^2
387  double band_rad;// [W/cm2/sr] bandpass radiance for given sensor (applicable when met_proc_mode=1or2 and PaintStars=TRUE in UpdateSensorPassbandAndOGLEnvironment, or when PaintSky=TRUE).
388  double OGL_rad; // [unitless 0-1] // scaled bandpass radiance for given sensor (applicable when met_proc_mode=1or2 and PaintStars=TRUE in UpdateSensorPassbandAndOGLEnvironment, or when PaintSky=TRUE).
389 } CELESTIAL_TABLE;
390 
391 /* ---- Disk File Format for Stellar Light Source Table ---
392 
393  Create flat, ASCII, tab-delimited text file, with header as follows:
394 
395  'StarID Decl RAngle Temperature Attenuation'
396 
397  and each subsequent record containing the following:
398 
399  Field 1 : star ID // [string] Identifier
400  Field 2 : declination // [deg] declination angle
401  Field 3 : azimuth // [hrs 0-24] azimuth angle
402  Field 4 : Tcolor // [degK] distribution temperature of equivalent blackbody
403  Field 5 : atten // [unitless] Attenuation coefficient = solid angle of star as seen from earth observer, divided by 4PI sr.
404 
405  ------------------------------------------------------ */
406 
407 typedef struct
408 {
409  double Esun; // [W/m2] Full-band solar direct Irradiance
410  double Esun_diffuse; // [W/m2] Full-band solar diffuse Irradiance
411  double Esky; // [W/m2] Full-band sky Irradiance
412  //double Emmls_diffuse; // [W/m2] Full-band man-made light sources Irradiance (removed CF090121)
413  double Earthshine; // [W/m2] Full-band nominal upwelling Earthshine Irradiance
414  //double Evapmax; // [W/m2] Full-band maximum evapotranspiration (without area ratio) (removed CF090121)
415  //double Econvect; // [W/m2] Full-band natural convected heat gain or loss depending on wind velocity and temp difference between air and nominal ground material. (removed CF090121)
416  double Ta; // [degC] Air temperature at ground
417  double Tback; // [degC] Ground temperature
418  VECTOR sun; // [unitless -1->1] cosine {x,y,z} components of unit vector toward Solar source in local South,East,Up system at metin {lat,lon}
419 } THERMAL_CACHE;
420 
421 typedef struct
422 {
423  GEOCENTRIC_LOCATION geoc_loc; // Position of terrain LOS intersection, if needed.
424  long nmatls; // number of materials in the mp_table array
425  MATL_PROP_TABLE *mp_table; // array of material property data (size = nmatls)
426  double *mp_fraction; // array of material property fractions (size = nmatls)
427 #ifdef _SIGSIM_SONAR_H_
428  SUBSURFACE_1DPROFILE *bathymetry; // bathymetry data at this location (pointer to single struct, not an array).
429 #endif
430 } SIMPLE_BACKGROUND_SPEC; // SIMPLE_BACKGROUND_SPEC : If mp_table and bathymetry are both null, this location is in atmosphere or space.
431 
432 #define NUM_SOURCE_TYPES 14
433 
434 typedef enum
435 {
450 } SOURCE_TYPE; // BE SURE TO CHANGE NUM_SOURCE_TYPES if you add any.
451 
452 typedef enum
453 {
455  HORIZONTAL, // Relative to projection of horizontal direction
456  // on plane perpendicular to Poynting vector.
457  VERTICAL // Relative to projection of vertical direction
458  // on plane perpendicular to Poynting vector.
459 } POLARIZATION;
460 
461 typedef struct
462 {
463  // Dynamic input attributes
464  jrmbool Do_Ephemeris; // TRUE=Have SigSim calculate ephemeris; FALSE=user-specified ephemeris.
465  jrmbool Atm3D; // TRUE=3D atmospherics (uses ATM_COLUMN array); FALSE=1D atmospherics (uses ATMCOEF array)
466  jrmbool Use_Default; // TRUE=MOD/RADCARDs will be overwritten with ATM_DEFAULT info
467  jrmbool Use_Columns; // TRUE=MOD/RADCARDs will be overwritten with ATM_COLUMN info
468  jrmbool FastSS; // TRUE=Use new scattered irradiance computation. FALSE=Use older LOS / volumetric integrals.
469  jrmbool AddMS; // TRUE=Include multiple scattering contribution to all scattering returns.
470  jrmbool Calc_Ta_Tback; // 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.
471  EPHEMERIS fm; // Ephemeris data
472  ATMCOEF *atm; // holds array of extinction coefficient and path radiance coefficients by wavelength and layer.
473  ATMINFO inf; // holds information about layer and wavelength bands captured by ATMCOEF.
474  ATM_COLUMN *col; // Columnar atmospheric data
475  int ncolumns; // number of columns of atmospheric data
476  ATM_DEFAULT atm_default; // Default atmospheric input data (always used for Met(4x), used for atmosphere if Use_Default=TRUE).
477  Datapoint *UserDefinedTa; // [degC] array of user-defined air temperatures (y) at known times-of-day (x)
478  int NumUserDefinedTa; // Number of elements of UserDefinedTa array.
479  int air_temp_model; // air_temp_model
480  // air_model_option = 1 : Linear interpolation between lowpoint at sunrise+LAGNIGHT and highpoint at noon+LAGDAY hours.
481  // air_model_option = 2 : cubic interpolation between lowpoint at sunrise+LAGNIGHT and highpoint at noon+LAGDAY hours.
482  // air_model_option = 3 : cosine interpolation with highpoint at noon+LAGDAY hours. Does not look at sunrise time.
483  // air_model_option = 4 : hybrid (Thales) interpolation which follows cosine between sunrise and sunset, but linear decay after sunset.
484  // air_model_option = 5 : Parton/Logan model : http://apsrunet.apsim.info/svn/apsim/trunk/Tests/SugarTest/HourlyTE/1%20Transpiration%20efficiency/Step2/Stage%202/parton-diurnal%20temp.pdf
485 
486 #ifdef USEMODRAD
487  MODCARD mc; // Modtran input cards
488  RADCARD rc; // Radtran input cards
489 #endif
490  CELESTIAL_TABLE *celestial_table; // Array of stellar positions and temperatures for met_proc_modes>0
491  long num_bodies; // Number of stars in celestial_table used when met_proc_mode>0
492  MANMADE_LIGHTSOURCE_TABLE* mm_lstable; // Array of manmade light sources
493  int num_mm_lsources; // Number of manmade light sources
494  double lastTa; // [degC] air temp at which light sources last computed. To be set only by mmlsource_irradiation routine.
495  CELESTIAL_TABLE *met4x_astro; // Array of stellar positions and temperatures for met_proc_modes<0
496  long num_met4x_bodies; // Number of stars in celestial_table used when met_proc_mode<0
497  CELESTIAL_TABLE *sky_table; // Array of sky scattered irradiance lines of sight and temperatures used when PaintSky=TRUE in UpdateSensorPassbandAndOGLEnvironment
498  long num_sky_LOS; // Number of sky lines of sight in sky_table. Used when PaintSky=TRUE in UpdateSensorPassbandAndOGLEnvironment
499  int met_proc_mode; // [>0]=Use Modtran/Radtran-based meteorology and new stellar irradiance, [>2]:Use Mod/Radtran meteorology, but no star irradiances, [<0]=Use old Met4x meteorology and night_sky_file, [<-2] no star irradiance.
500  double env_update_interval; // [hrs] Time-step for re-calculating environmental irradiances
501  double thermal_spin_up_time; // [hrs] Number of hours over which the material systems should be "spun up" prior to thermal prediction. (72 hrs recommended).
502  SIMPLE_BACKGROUND_SPEC *background; // If null, then unused. If used, its geocentric location should be set to metin.fm location.
503 
504  // SigSim Output/Computed attributes
505  THERMAL_CACHE *tc; // Diurnal array. #elements is floor(HOURS_PER_DAY/env_update_interval)
506  double Emax; // [W/m2] Maximum value over diurnal cycle of sum of irradiances, calculated during THERMAL_CACHE spinup.
507  double EsunAve, EsundifAve, EskyAve, EarthAve; // [W/m2] Average values over diurnal cycle, calculated during THERMAL_CACHE spinup. Note that EsunAve is converted to along-path by division by sun.k!
508  double Esun, Esun_diffuse, Esky, Earth; // [W/m2] Full-band Irradiances
509  double Esky_zenith, Esky_horizon; // [W/cm2] Full-band Irradiances
510  double Emmls; // [W/m2] Full-band Irradiances from manmade light sources
511  int nbands; // [unitless]
512  BAND *band; // Array of bands for atmospherics
513  double *solarTOA, *lunarTOA; // [W/m2/um] Top-Of-Atmosphere spectral irradiances
514  double *solarDWlayer, *solarUWlayer;// [W/m2/um] Solar downwelling/upwelling At-layer scattered irradiances
515  double *lunarDWlayer, *lunarUWlayer;// [W/m2/um] Lunar downwelling/upwelling At-layer scattered irradiances
516  double *thermalDWlayer, *thermalUWlayer;// [W/m2/um] Earth/Sky downwelling/upwelling At-layer thermal irradiances
517  double *directSolar, *diffuseSolar; // [W/m2/um] At-Object solar spectral irradiances
518  double *directLunar, *diffuseLunar; // [W/m2/um] At-Object lunar spectral irradiances
519  double *diffuseSky; // [W/m2/um] At-Object atmospheric thermal spectral irradiances
520  double *diffuseEarthshine; // [W/m2/um] At-Object earthshine spectral irradiance
521  double *diffuseStars; // [W/m2/um] At-Object star spectral irradiance
522  double *diffuseAirglow; // [W/m2/um] At-Object airglow (nightglow) irradiance
523  double *diffuseUrbanLights; // [W/m2/um] At-Object man-made spectral irradiance
524  double *diffuseManmadeLS; // [W/m2/um] At-Object man-made LS spectral irradiance
525  double *trans; // [unitless 0-1] Spectral Transmittance over path (temporary : changes with each sensor path)
526  double *pathrad; // [W/cm2/sr/um] Spectral Path Radiance over path (temporary : changes with each sensor path)
527  double *scatrad; // [W/cm2/sr/um] Spectral Scattered Source Radiance over path (temporary : changes with each sensor path)
528  double *rainRCS; // [m-1 sr-1] Spectral rain backscatter volume cross section averaged over path (temporary : changes with each sensor path)
529 } METIN;
530 
531 int SkyRadiance(GEODETIC_LOCATION GeoD, double ax, double bx, METIN *metin, int num_entries, CELESTIAL_TABLE *LOS, jrmbool hitflag);
532 int WriteMetinDiurnalIrradiances(METIN *metin, char *filename);
533 int ReadMetinDiurnalIrradiances(METIN *metin, char *filename);
534 int AllocateMetinSkyTable(METIN *metin);
536 void SetupHomogeneousAtmosphere(METIN *metin, int resetMetin, double ScatCoefficient0, double ScatCoefficient1, double ExtinctCoefficient,
537  int ConstThruLayers, double SolarIrrad, double LunarIrrad);
538 
543 SIGSIM_API int Free_Metin_Arrays(METIN *metin); // Frees just the spectral arrays.
548 SIGSIM_API void MetinSetDefaults(METIN *metin);
550 SIGSIM_API int LoadATMFromPreFilledMetin(char *sigsim_data_dir, char* sigsim_cache_dir, char *atmcoef_file, char *modcard_file, METIN *metin, jrmbool atm_reset);
552 SIGSIM_API int FillMetinDiurnalIrradiances(METIN *metin, double alt_m);
553 SIGSIM_API int SetBandStructure(int *nbands, BAND** band, long* nlambda, double** lambda, char c1Modtrn);
554 SIGSIM_API int SetupAtmosphericProfile(jrmbool atmreset, jrmbool dumcol, char *sigsim_data_dir, char* sigsim_cache_dir, char *atm_file, char *modcard_file, long nlayers, METIN *metin);
555 SIGSIM_API int AllocateAndFillMetinBackgroundSpec(char *sigsim_data_dir, METIN *metin, char *bathymetry_file, char *ms_file);
556 
557 //SIGSIM_API int UpdateEnvironment(double alt, METIN *metin)
558 
559 #ifdef _MMLS_H_
560 SIGSIM_API int UpdateSingleSourceRadiance(MANMADE_LIGHTSOURCE_TABLE *mm_lstable, METIN *metin, VECTOR SurfacePositionNED, VECTOR SurfaceNormalNED);
561 SIGSIM_API int mmlsource_irradiation(METIN* met);
562 #endif // _MMLS_H_
563 
564 
565 
566 /* ================================== SENSORS ========================================================== */
567 
568 typedef enum
569 {
570  EO_Blue = -3,
571  EO_Green = -2,
572  EO_Red = -1,
573  EO = 0,
574  IR,
590 } SENSOR_TYPE;
591 
592 typedef struct
593 {
594  double ThreshDetect; // [unitless 0-1] Detection Threshhold
595  double ThreshClassify; // [unitless 0-1] Classification Threshhold
596  double ThreshRecognize; // [unitless 0-1] Recognition Threshhold
597  double ThreshIdentify; // [unitless 0-1] Identification Threshhold
598  double PersistenceTime; // [s] Time over which TA status is considered valid.
599 } TA_PROPS;
600 
601 typedef struct
602 {
603  // Input attributes
607  BAND band; // [microns] passband low, high and bin width
608  SPECTRAL_DOMAIN spectrum; // Derived from band.
609  SPECTRUM response; // [um, unitless] Sensor spectral response curve filled by FillSensorResponse() routine.
610  jrmbool ApplyResponse; // [bool] TRUE if spectral response curve is to be applied to at-aperture radiances.
611  double gain; // [unitless] sensor gain
612  double level; // [unitless] sensor level
613  int ntracks; // Number of TRACKS in track array
614  TRACK *track; // Expected trajectory
615  VECTOR ned_linear_velocity; // [m/s] Current linear velocity
616  VECTOR ned_linear_acceleration; // [m/s2] Current linear acceleration
617  VECTOR ned_angular_velocity; // [rad/s] Current angular velocity. Magnitude gives speed clockwise about direction
618  VECTOR ned_angular_acceleration; // [rad/s2] Current angular acceleration. Magnitude gives accel clockwise about direction
619  VECTOR frd_angular_velocity; // [rad/s] Current angular velocity in body FRD system.
620  TA_PROPS TA; // [TA_PROPS] Target acquisition threshholds and persistence time.
621 
622  // EOIR Parameters
623  double Tmax, Tmin; // [degC] max/min thermal sensor dynamic range Tapparent
624  double max_light_level; // [uW/cm2] max NVG sensor light level
625  double NEDT; // [degK] noise-equivalent temperature
626  double pitch; // [cm] detector pitch (EOIR) or actual antenna length (RF)
627 
628  // RF Parameters
629  double PemitterW; // [W] Power of active sensor antenna
630  double TGain,RGain; // [unitless] Transmitter/Receiver Antenna Gains
631  double FCemitterHz; // [Hz] Center frequency of emitter (derived from band)
632  double BWemitterHz; // [Hz] Bandwidth of emitter
633  double ChannelResolutionHz; // [Hz] Receiver Channel resolution
634  double PulseWidth; // [s] Pulse width in seconds
635  double PRF; // [Hz] Pulse repetition frequency (foveal)
636  double NFPRF; // [Hz] Pulse repetition frequency (nonfoveal)
637  double BeamWidth; // [rad] Beam or spot width
638  double SysTemp; // [degK] radar system temperature
639  double TransmitterPolarizationAngle;// [deg] Polarization Angle [H=0, V=90, U=45]
640  double ReceiverPolarizationAngle; // [deg] Polarization Angle [H=0, V=90, U=45]
641  jrmbool MotionCompensation; // [bool] Takes into account ownship motion and filters zero-velocity contacts.
642 
643 #ifdef _SIGSIM_RADAR_H_
644  TRANSMITTER_RECEIVER *transmitter; // Array of Transmitted RF power density distributions. Number of elements=spectrum.nlambda.
645  TRANSMITTER_RECEIVER *receiver; // Array of RF receiver acceptance/efficiency distribution. Number of elements=spectrum.nlambda.
646 #endif
647 #ifdef _SIGSIM_SONAR_H_
648  ACOUSTIC_TRANSDUCER *transducer; // Pointer to single ACOUSTIC_TRANSDUCER structure, for sonar (optional).
649 #endif
650 #ifdef _RFSIG_H_
651  DATALINK_PARTICIPANT *datalink; // Pointer to single DATALINK_PARTICIPANT structure, for comm (optional).
652 #endif
653 
654  // SigSim Output/computed attributes
655  double *detector; // [W/cm2/sr/um] Total at-aperture spectral radiance
656  double *atobject; // [W/cm2/sr/um] Total at-material system spectral radiance
657  double *trans; // [unitless 0-1] Spectral Transmittance at range
658  double *pathrad; // [W/cm2/sr/um] Spectral Path Radiance at range
659  double *scatrad; // [W/cm2/sr/um] Spectral Scattered Source Radiance at range
660  double trans_axbx; // [unitless 0-1] Bandpass Transmittance at range
661  double pathrad_axbx; // [W/cm2/sr] Bandpass Path Radiance at range
662  double scatrad_axbx; // [W/cm2/sr] Bandpass Scattered Source Radiance at range
663  double density; // [m-1] Extinction Coefficient at range
664  double fog_color; // [unitless] Scaled and cropped OGL Path Radiance term
665  double Lsun_axbx, Lsun_diffuse_axbx; // [W/cm2/sr] Sensor-band incident pseudoradiances
666  double Lmoon_axbx, Lmoon_diffuse_axbx, Lsky_axbx; // [W/cm2/sr] Sensor-band incident pseudoradiances
667  double Llights_axbx, Lstars_axbx, Learthshine_axbx; // [W/cm2/sr] Sensor-band incident pseudoradiances
668  double *Lmmlights_axbx; // [W/cm2/sr] Sensor-band incident radiances from each mmls
669  int num_MMLS; // Number of man-made light sources in Lmmlights_axbx array.
670  double *rainRCS; // [m-1 sr-1] Spectral rain backscatter volume cross section averaged over path
671  double band_rainRCS; // [m-1 sr-1] Rain backscatter volume cross section averaged over path and wavelength
672  GEOCENTRIC_LOCATION rain_start,rain_end; // Starting and ending location of first path interval containing rain
673 } SENSOR;
674 
675 SIGSIM_API int AllocateSensors(int nsensors, SENSOR **sens);
676 SIGSIM_API int AllocateSingleSensorSpectra(SENSOR *sens, int nmmls, jrmbool INIT);
677 SIGSIM_API int AllocateSensorSpectra(int nsensors, SENSOR **sens, int nmmls);
678 SIGSIM_API void SetSensorDefaults(SENSOR *sensor);
679 SIGSIM_API void SetSensorTA_Props(TA_PROPS *taprops, double threshDetect, double threshClassify, double threshRecognize, double threshID, double persistTime);
680 SIGSIM_API int AddSensor(SENSOR** sens, int newNumSensors);
681 SIGSIM_API int RemoveSensor(SENSOR** sens, int numSensors, int sensorRemoveIndex);
682 SIGSIM_API int Free_Sensors(SENSOR **sens, int nsensors);
683 SIGSIM_API void Null_Sensor_Arrays(SENSOR *sens, int nsensors); // Nulls the sensor arrays.
684 SIGSIM_API int Free_Sensor_Arrays(SENSOR *sens, int nsensors); // Frees the sensor arrays if !null.
685 SIGSIM_API int AllocateAndFillAtmosphericBands(int *nbands, BAND **band, int nsensors, SENSOR **sens);
687 SIGSIM_API int FillSensorResponse(char *filename, SENSOR *sensor);
688 
689 // GetDynamicRange() calculates the dynamic range of a SENSOR.
690 // (if sens->bx<=MIDWAVE_CUTON) : Inputs sens->{Tmin,Tmax} to provide upper and lower reference flux densities;
691 // (if sens->bx>MIDWAVE_CUTON) : Inputs sens->{max_light_level} to provide upper reference flux density, lower=0.0;
692 // Outputs scaled pseudoradiances in {*Mmin, *Mmax} [W/cm2/sr] assuming Lambertian emission (radiance = flux_density/PI).
693 SIGSIM_API int GetDynamicRange(double *Mmin, double *Mmax, SENSOR *sens);
694 
695 
696 // UpdateSensorState() is intended to update the position and FOV for this sensor by indexing into the proper track record based on the simtime.
697 // INPUTS : sens points to sensor with one or more track records filled in.
698 // E defines the Earth ellipsoid for geodetic to geocentric conversion
699 // simtime is the simulation time in seconds.
700 // OUTPUTS: sens->fov.{geoc_loc, geodetic_loc} corresponding to simtime (from track records)
701 // sens->{ned_linear_velocity, ned_angular_velocity, ned_linear_acceleration, ned_angular_acceleration} corresponding to simtime (from track records).
702 SIGSIM_API int UpdateSensorState(SENSOR *sens, ellipsoid E, double simtime);
703 
704 
705 
706 /* ================= COMBINATIONS OF ENVIRONMENT, MATERIALS, & SENSORS ===================== */
707 
708 SIGSIM_API int ConstructSpectralDomain(METIN *metin, int nsensors, SENSOR **sens); // constructs metin->spectrum from internal default metin bands and sensor bands.
709 
710 
711 // InitializeMatSys() allocates/fills the MATL_PROP_TABLE array for those material systems listed in the sigsim_data_dir/ms_filename.
712 // This function needs to be run once at the beginning of a scenario with matreset=TRUE. It will then write out a state file called sigsim_data_dir/ms_state_file.
713 // After that, this function still needs to be run once at the beginning of a scenario, but matreset=FALSE will load in ms_state_file.
714 // Thermal spin-up is done here as well, according to the thermal_spin_up_time chosen in the METIN structure.
715 SIGSIM_API int InitializeMatSys(jrmbool matreset, char *sigsim_data_dir, char *ms_filename, char *ms_state_file, long *nmatls, MATL_PROP_TABLE **mp_table, double tod_start, METIN *metin);
716 
717 
718 // Returns SCALED scattered source radiance along a set of paths starting at sens->geoc_loc and looking at orientation (LOS[i].zenith, LOS[i].azimuth) in local SEU system.
719 // That is, THE ORIENTATION STORED IN THE SENSOR STRUCTURE IS IGNORED.
720 // Sensor band defined from sens->band.ax [um] to sens->band.bx [um] --- must be encompassed by metin band structure.
721 // num_entries is number of CELESTIAL_TABLEs in LOS array.
722 // LOS is a PRE-ALLOCATED array of CELESTIAL_TABLEs for which the user has ALREADY FILLED IN the zenith and azimuth angles!!!).
723 // CROP=TRUE crops the resulting scaled radiances to the range (0.0,1.0).
724 // hitflag=TRUE truncates path if the Earth gets in the way.
725 // NOTE: Untruncated path range is deemed to be infinity. Actual ranges used are:
726 // For 1D ATM: KM2M*sqrt(metin->inf.althi*(2*inf.E_radius+inf.althi)).
727 // For 3D ATM: dmax(dmax(metin->fm.E.a,metin->fm.E.b),metin->fm.E.c)).
728 // Function returns SIGSIM_SUCCESS or SIGSIM_FUNCTION_FAILURE.
729 int SkyColor(SENSOR *sens, METIN *metin, int num_entries, CELESTIAL_TABLE *LOS, jrmbool hitflag, jrmbool CROP);
730 
731 
732 SIGSIM_API int AllocateAndFillMetinTablesAndSpectralArrays(char *sigsim_data_dir, METIN *metin, int nsensors, SENSOR **sens, char *mmls_file, char *night_sky_file);
733 
734 // ComputeSpectralReflectanceParameters() fills pre-allocated MATL_SPECTRAL_TABLE->parameter values from MATL_PROP_TABLE array element matl_index.
735 SIGSIM_API int ComputeSpectralReflectanceParameters(long matl_index, MATL_PROP_TABLE *mp_table, BRDF_MODEL brdf_model, SPECTRAL_DOMAIN spectrum, MATL_SPECTRAL_TABLE *mst) ;
736 
737 // ComputeSpectralReflectanceParameters() fills pre-allocated MATL_SPECTRAL_TABLE->parameter values from MATL_PROP_TABLE array element matl_index.
738 SIGSIM_API int ComputeReflectanceParameters(long matl_index, MATL_PROP_TABLE *mp_table, BRDF_MODEL brdf_model, SPECTRAL_DOMAIN spectrum, MATL_SPECTRAL_TABLE *mst, SENSOR *sens) ;
739 
740 // UpdateSensorPassbandEnvironment() performs passband flux integrals over METIN irradiances to fill single SENSOR passband incidances
741 // If PaintStars=TRUE and metin->met_proc_mode=1 or 2, function will also fill metin->celestial_table.band_rad and OGL_rad for all visible stars.
742 // If PaintSky=TRUE, function will also fill metin->sky_table with suggested lines of sight, scaled and unscaled scattered source radiances (solar plus lunar).
743 // CROP=TRUE crops the output OpenGL-scaled LIGHT_SOURCE_TABLE values between 0.0 and 1.0. (Not needed when MOGL_MODE=TRUE).
744 int UpdateSensorPassbandEnvironment(METIN *metin, SENSOR *sens, jrmbool PaintStars, jrmbool PaintSky, jrmbool CROP);
745 
746 // ----- See SigSimAPI.h for the routines below ----
747 
748 //void SigSimStructInit(METIN *metin, LIGHT_SOURCE_TABLE **ls_table, MATL_PROP_TABLE **mp_table, MATL_OGL_TABLE **mogl_table, SENSOR **sens);
749 //int Update_MS_BoundaryConditions(char *sigsim_data_dir, char *ms_filename, char *ms_state_file, long *nmatls, MATL_PROP_TABLE **mp_table, double tod_start, METIN *metin);
750 //int InitializeSpecATM(jrmbool atmreset, jrmbool dumcol, char *sigsim_data_dir, char *atm_file, char *mmls_file, char *night_sky_file, METIN *metin, long nlayers, int nsensors, SENSOR *sens, LIGHT_SOURCE_TABLE *lstable);
751 //double UpdateMaterialSystemSpectralRadiometric(double* range, long matl_index, long nmatls, MATL_PROP_TABLE *mp_table, METIN *metin, SENSOR *sens, jrmbool hitflag);
752 //int UpdateAtObjectSpectralSignature(long matl_index, long nmatls, MATL_PROP_TABLE *mp_table, METIN *metin, SENSOR *sens, BRDF_MODEL brdf_model, SPECTRAL_DOMAIN spectrum, MATL_SPECTRAL_TABLE *mst);
753 //int UpdateAtApertureSpectralSignature(SENSOR *sens, long nlambda, double *lambda_um, MATL_SPECTRAL_TABLE *mst);
754 
755 
756 #ifdef __cplusplus
757 }
758 #endif
759 
760 #endif // _SIGSIM_H_
761 


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