59 double f1munot, f2munot, f3munot;
60 double f1mmunot, f2mmunot, f3mmunot;
62 double f1mu, f2mu, f3mu;
63 double f1mmu, f2mmu, f3mmu;
68 double xmunot_0, ymunot_0;
71 double xmunot_1, ymunot_1;
74 if(p_atmosBha == 0.0) {
78 if(p_atmosTau == 0.0) {
87 if(p_atmosWha == 1.0) {
88 QString msg =
"Anisotropic conservative case not implemented yet - WHA parameter cannot be set to 1.0.";
89 msg +=
"This will cause negative planetary curvature to occur.";
197 SetOldTau(p_atmosTau);
198 SetOldWha(p_atmosWha);
204 if(incidence == 90.0) {
208 munot = cos((
PI / 180.0) * incidence);
211 maxval = max(1.0e-30, hpsq1 + munot * munot);
213 munotp = max(munotp, p_atmosTau / 69.0);
215 if(emission == 90.0) {
219 mu = cos((
PI / 180.0) * emission);
222 maxval = max(1.0e-30, hpsq1 + mu * mu);
224 mup = max(mup, p_atmosTau / 69.0);
227 maxval = max(1.0e-30, munotp);
228 xx = -p_atmosTau / maxval;
236 emunot = exp(-p_atmosTau / munotp);
239 maxval = max(1.0e-30, mup);
240 xx = -p_atmosTau / maxval;
248 emu = exp(-p_atmosTau / mup);
253 if(fabs(xx - 1.0) < 1.0e-10) {
255 f1mmunot = xx * (log(1.0 + 1.0 / xx) -
p_e1 * emunot +
259 f1munot = xx * (log(xx / (1.0 - xx)) +
p_e1 / emunot +
261 f1mmunot = xx * (log(1.0 + 1.0 / xx) -
p_e1 * emunot +
265 QString msg =
"Negative length of planetary curvature encountered";
269 f2munot = munotp * (f1munot +
p_e2 / emunot - 1);
270 f2mmunot = -munotp * (f1mmunot +
p_e2 * emunot - 1);
271 f3munot = munotp * (f2munot +
p_e3 / emunot - 0.5);
272 f3mmunot = -munotp * (f2mmunot +
p_e3 * emunot - 0.5);
275 if(fabs(xx - 1.0) < 1.0e-10) {
277 f1mmu = xx * (log(1.0 + 1.0 / xx) -
p_e1 * emu +
AtmosModel::En(1, p_atmosTau * (1.0 + 1.0 / xx)));
280 f1mu = xx * (log(xx / (1.0 - xx)) +
p_e1 / emu +
AtmosModel::Ei(p_atmosTau * (1.0 / xx - 1.0)));
281 f1mmu = xx * (log(1.0 + 1.0 / xx) -
p_e1 * emu +
AtmosModel::En(1, p_atmosTau * (1.0 + 1.0 / xx)));
284 QString msg =
"Negative length of planetary curvature encountered";
288 f2mu = mup * (f1mu +
p_e2 / emu - 1);
289 f2mmu = -mup * (f1mmu +
p_e2 * emu - 1);
290 f3mu = mup * (f2mu +
p_e3 / emu - 0.5);
291 f3mmu = -mup * (f2mmu +
p_e3 * emu - 0.5);
294 xmunot_0 = 1.0 +
p_wha2 * (f1mmunot + p_atmosBha *
p_wham * f3mmunot) +
p_delta_0 * munotp * (1.0 - emunot);
295 ymunot_0 = emunot * (1.0 +
p_wha2 * (f1munot + p_atmosBha *
p_wham * f3munot)) +
301 xmunot_1 = 1.0 + 0.5 *
p_wha2 * p_atmosBha * (f1mmunot - f3mmunot) +
p_delta_1 * munotp * (1.0 - emunot);
302 ymunot_1 = emunot * (1.0 + 0.5 *
p_wha2 * p_atmosBha *
303 (f1munot - f3munot)) +
p_delta_1 * munotp * (1.0 - emunot);
304 xmu_1 = 1.0 + 0.5 *
p_wha2 * p_atmosBha * (f1mmu - f3mmu) +
p_delta_1 * mup * (1.0 - emu);
305 ymu_1 = emu * (1.0 + 0.5 *
p_wha2 * p_atmosBha * (f1mu - f3mu)) +
p_delta_1 * mup * (1.0 - emu);
308 gmunot =
p_p1 * xmunot_0 +
p_q1 * ymunot_0;
318 cosazss = 0.0 - munot * mu;
321 cosazss = cos((
PI / 180.0) * phase) - munot * mu;
324 xystuff = cxx * xmunot_0 * xmu_0 - cyy * ymunot_0 *
325 ymu_0 -
p_p0 * sum * (xmu_0 * ymunot_0 + ymu_0 * xmunot_0) + cosazss * p_atmosBha * (xmu_1 *
326 xmunot_1 - ymu_1 * ymunot_1);
327 p_pstd = 0.25 * p_atmosWha * munotp / (munotp + mup) * xystuff;
static double G11Prime(double tau)
Perform Chandra and Van de Hulst's series approximation for the g'11 function needed in second order ...
double p_atmosHnorm
Atmospheric shell thickness normalized to planet radius.
double p_trans0
Transmission of surface reflected light through the atmosphere with no scatterings in the atmosphere...
const double PI
The mathematical constant PI.
bool TauOrWhaChanged() const
Checks whether tau or wha have changed.
double p_trans
Transmission of surface reflected light through the atmosphere overall.
Isotropic atmos scattering model.
double p_sbar
Illumination of the ground by the sky.
static double En(unsigned int n, double x)
This routine evaluates the generalized exponential integral, En(x).
#define _FILEINFO_
Macro for the filename and line number.
A type of error that could only have occurred due to a mistake on the user's part (e...
Anisotropic2(Pvl &pvl, PhotoModel &pmodel)
Empty constructor.
A type of error that cannot be classified as any of the other error types.
Container for cube-like labels.
static double Ei(double x)
This routine computes the exponential integral, Ei(x).
double p_transs
Transmission of light that must be subtracted from the flat surface model to get the shadow model...
double p_pstd
Pure atmospheric-scattering term.
Namespace for ISIS/Bullet specific routines.
virtual void AtmosModelAlgorithm(double phase, double incidence, double emission)
Anisotropic atmospheric scattering with P1 single-particle phase fn, in the second approximation...