Isis 3.0 Programmer Reference
Back | Home
LommelSeeliger.cpp
1 #include <cmath>
2 #include "LommelSeeliger.h"
3 
4 namespace Isis {
5  double LommelSeeliger::PhotoModelAlgorithm(double phase, double incidence,
6  double emission) {
7  static double pht_lomsel;
8  double incrad;
9  double emarad;
10  double munot;
11  double mu;
12 
13  static double old_phase = -9999;
14  static double old_incidence = -9999;
15  static double old_emission= -9999;
16 
17  if (old_phase == phase && old_incidence == incidence && old_emission == emission) {
18  return pht_lomsel;
19  }
20 
21  old_phase = phase;
22  old_incidence = incidence;
23  old_emission = emission;
24 
25  incrad = incidence * Isis::PI / 180.0;
26  emarad = emission * Isis::PI / 180.0;
27  munot = cos(incrad);
28  mu = cos(emarad);
29 
30  if(munot <= 0.0 || mu <= 0.0 || incidence == 90.0 ||
31  emission == 90.0) {
32  pht_lomsel = 0.0;
33  }
34  else {
35  pht_lomsel = 2.0 * munot / (munot + mu);
36  }
37 
38  return pht_lomsel;
39  }
40 }
41 
42 extern "C" Isis::PhotoModel *LommelSeeligerPlugin(Isis::Pvl &pvl) {
43  return new Isis::LommelSeeliger(pvl);
44 }
const double PI(3.14159265358979323846)
The mathematical constant PI.
Container for cube-like labels.
Definition: Pvl.h:135

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the ISIS Support Center
File Modified: 07/12/2023 23:22:31