67// GetATMGridFileInfo() reads the header of a 1D atmospheric state file to determine the earth radius, numbers of wavelengths and layers, and min/max altitudes.
68// Inputs : inputfilename = string specifying path/filename of a 1D atmospheric state file.
69// Outputs: inf = pointer to ATMINFO structure containing the desired header information.
70// Returns: SIGSIM_FILE_NOT_FOUND if the state file cannot be found.
71// SIGSIM_FILE_FORMAT_ERROR if the state file is found, but is not of valid form.
126// PrintModtran1DPathAtmospherics: Uses Modtran engine directly, to produce file on disk of path atmospherics. "Tag" is an optional string included in the output filename.
131// ProcessPlumeVolume() fills an ATM_VOL_PROP's atm_out spectral array of ATMCOEF's with extinction, thermal radiance, and scattering information via a call to MODTRAN.
132// Inputs: sigsim_atm_dir = string specifying the location of SigSim's data/atm directory.
133// metin = pointer to METIN structure which carries the wavelength information.
134// plume = pointer to single PLUME, which carries its own input atmospheric information in its atm_in array.
135// dalt_km = arbitrary depth over which to calculate Modtran volume properties
136// Uses : metin->atm_default.mc.c1Modtrn[0] to specify Lowtran or Modtran mode.
137// metin->nbands, band, nlambda, lambda_um for wavelength array.
138// metin->fm for ephemeris info.
139// Outputs: plume->atm_out : extinction, thermal radiance, and scattering coefficients.
140// Returns: SIGSIM_MEMORY_ALLOCATION_ERROR if internal wavelength and layer arrays cannot be allocated.
176// PrintSigSim1DPathAtmospherics: Uses SigSimC engine, to produce file on disk of path atmospherics. "Tag" is an optional string included in the output filename.
193// GetLOSAtmosphericsKE() inputs the atmospheric state, and a line-of-sight defined by starting and ending locations, and an initial startFRD orientation,
194// and outputs the actual refracted initial and final refracted orientations (w.r.t NED),
195// as well as spectral transmittance, atmospheric thermal path radiance, and scattered source radiance over that LOS path,
196// with a desired spectral resolution given by spectrum. Function returns range from sensor.
197// "source_type" specifies which sources to include in the scattered radiance return:
198// UNSPECIFIED gives the total of all sources
199// DIFFUSE_SOLAR,DIFFUSE_LUNAR,DIFFUSE_STELLAR,DIFFUSE_MANMADE, and RADAR give scattered return appropriate to that type.
200// All other valid choices return no scattered source radiance.
201// Out-of-range choices return no atmospheric thermal path radiance, either.
202// startFRD is an initial sensor orientation w.r.t. local NED, which will be adjusted by this routine to look at the endpoint.
203// endFRD returns this sensor orientation as projected along the line of sight at the endpoint, w.r.t the endpoint's local NED.
204// (*trans) is [unitless] and has spectrum.nlambda elements.
205// (*pathrad) has units [W/cm2/sr/um] and has spectrum.nlambda elements.
206// (*scatrad) has units [W/cm2/sr/um] and has spectrum.nlambda elements.
213// GetLOSAtmosphericsKE_gpulut performs the same function as GetLOSAtmosphericsKE, but it is optimized to generate the gpu lut as quickly as possible.
227ATMINFO inf, // Wavelength and atmospheric layer altitude arrays
228VECTOR *pathposition_m, // [m] Initial position of point to which the radiance is propagated. If SSflag=TRUE, this is adjusted as the path progresses. If SSflag=FALSE, it is not needed.
229VECTOR look, // Unit vector toward end of path opposite that of pathposition_m
230long nintervals, // Number of intervals in atm_index and length arrays.
231long *atm_index, // Array of indices into atm array, one index per path interval. Points to 1st wavelength for the appropriate layer.
232double *length, // [km] Array of pathlength for each path interval.
233int nsources, // Number of sources for which scattering should be calculated.
235double *TOAirrad, // [W/m2/um] Top-Of-Atmosphere irradiance from source.
236double *Xmit, // [unitless] Spectral transmittance array returned over path (accumulates if this function is iteratively called with reset=TRUE).
237double *Prad, // [W/cm2/sr/um] Spectral atmospheric path radiance returned over path (accumulates if this function is iteratively called with reset=TRUE).
238double *Scat // [W/cm2/sr/um] Per-source spectral scattered source radiance returned over path (accumulates if this function is iteratively called with reset=TRUE). Indexed as Scat[(source_index)*inf.spectrum.nlambda+(lambda_index)].