Skip to content
Snippets Groups Projects
Commit a4f4850d authored by sesteves's avatar sesteves
Browse files

refraction index to refractive index

parent 566e6ebf
No related branches found
No related tags found
No related merge requests found
...@@ -23,18 +23,18 @@ package org.orekit.rugged.atmosphericrefraction; ...@@ -23,18 +23,18 @@ package org.orekit.rugged.atmosphericrefraction;
*/ */
public class ConstantRefractionLayer { public class ConstantRefractionLayer {
private double lowestAltitude; private double lowestAltitude;
private double refractionIndex; private double refractiveIndex;
public ConstantRefractionLayer(double lowestAltitude, double refractionIndex) { public ConstantRefractionLayer(double lowestAltitude, double refractiveIndex) {
this.lowestAltitude = lowestAltitude; this.lowestAltitude = lowestAltitude;
this.refractionIndex = refractionIndex; this.refractiveIndex = refractiveIndex;
} }
public double getLowestAltitude() { public double getLowestAltitude() {
return lowestAltitude; return lowestAltitude;
} }
public double getRefractionIndex() { public double getRefractiveIndex() {
return refractionIndex; return refractiveIndex;
} }
} }
...@@ -93,7 +93,7 @@ public class MultiLayerModel implements AtmosphericRefraction { ...@@ -93,7 +93,7 @@ public class MultiLayerModel implements AtmosphericRefraction {
// get new los by applying Snell's law at atmosphere layers interfaces // get new los by applying Snell's law at atmosphere layers interfaces
// we avoid computing sequences of inverse-trigo/trigo/inverse-trigo functions // we avoid computing sequences of inverse-trigo/trigo/inverse-trigo functions
// we just use linear algebra and square roots, it is faster and more accurate // we just use linear algebra and square roots, it is faster and more accurate
final double n1On2 = previousRefractionIndex / refractionLayer.getRefractionIndex(); final double n1On2 = previousRefractionIndex / refractionLayer.getRefractiveIndex();
final double k = n1On2 * Vector3D.dotProduct(los, gp.getZenith()); final double k = n1On2 * Vector3D.dotProduct(los, gp.getZenith());
los = new Vector3D(n1On2, los, los = new Vector3D(n1On2, los,
-k - FastMath.sqrt(1 + k * k - n1On2 * n1On2), gp.getZenith()); -k - FastMath.sqrt(1 + k * k - n1On2 * n1On2), gp.getZenith());
...@@ -108,7 +108,7 @@ public class MultiLayerModel implements AtmosphericRefraction { ...@@ -108,7 +108,7 @@ public class MultiLayerModel implements AtmosphericRefraction {
pos = ellipsoid.pointAtAltitude(pos, los, refractionLayer.getLowestAltitude()); pos = ellipsoid.pointAtAltitude(pos, los, refractionLayer.getLowestAltitude());
gp = ellipsoid.transform(pos, ellipsoid.getBodyFrame(), null); gp = ellipsoid.transform(pos, ellipsoid.getBodyFrame(), null);
previousRefractionIndex = refractionLayer.getRefractionIndex(); previousRefractionIndex = refractionLayer.getRefractiveIndex();
} }
final NormalizedGeodeticPoint newGeodeticPoint = final NormalizedGeodeticPoint newGeodeticPoint =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment