diff --git a/src/main/java/org/orekit/rugged/api/Rugged.java b/src/main/java/org/orekit/rugged/api/Rugged.java index ee14103390bc5085db7fc279acc87eba48ba11f4..afce96aadb1506bd7687eda24f69a1ae64b12101 100644 --- a/src/main/java/org/orekit/rugged/api/Rugged.java +++ b/src/main/java/org/orekit/rugged/api/Rugged.java @@ -26,6 +26,8 @@ import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; import org.apache.commons.math3.util.FastMath; import org.orekit.bodies.GeodeticPoint; import org.orekit.frames.Transform; +import org.orekit.rugged.atmosphericrefraction.AtmosphericRefraction; +import org.orekit.rugged.atmosphericrefraction.MultiLayerModel; import org.orekit.rugged.errors.DumpManager; import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.errors.RuggedMessages; @@ -339,6 +341,11 @@ public class Rugged { final Vector3D lBody = inertToBody.transformVector(lInert); result = algorithm.refineIntersection(ellipsoid, pBody, lBody, algorithm.intersection(ellipsoid, pBody, lBody)); + + // compute atmosphere deviation. + AtmosphericRefraction atmosphericRefraction = new MultiLayerModel(); + long deviation = atmosphericRefraction.getDeviation(pBody, lBody, result.getAltitude()); + } DumpManager.dumpDirectLocationResult(result); diff --git a/src/main/java/org/orekit/rugged/atmosphericrefraction/AtmosphericRefraction.java b/src/main/java/org/orekit/rugged/atmosphericrefraction/AtmosphericRefraction.java new file mode 100644 index 0000000000000000000000000000000000000000..d17b112e70c58d7fc03e6e2d01a110c0222f519f --- /dev/null +++ b/src/main/java/org/orekit/rugged/atmosphericrefraction/AtmosphericRefraction.java @@ -0,0 +1,30 @@ +/* Copyright 2013-2016 CS Systèmes d'Information + * Licensed to CS Systèmes d'Information (CS) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * CS licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.orekit.rugged.atmosphericrefraction; + + +import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; + +/** + * Interface for atmospheric refraction. + * @author Sergio Esteves + */ +public interface AtmosphericRefraction { + + long getDeviation(Vector3D pos, Vector3D los, double altitude); + +} diff --git a/src/main/java/org/orekit/rugged/atmosphericrefraction/MultiLayerModel.java b/src/main/java/org/orekit/rugged/atmosphericrefraction/MultiLayerModel.java new file mode 100644 index 0000000000000000000000000000000000000000..ab5ad84e489dd9a7cb0997c424d2312acff8b38b --- /dev/null +++ b/src/main/java/org/orekit/rugged/atmosphericrefraction/MultiLayerModel.java @@ -0,0 +1,18 @@ +package org.orekit.rugged.atmosphericrefraction; + +import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; + +/** + * Multi layer model for atmospheric refraction. + * @author Sergio Esteves + */ +public class MultiLayerModel implements AtmosphericRefraction { + + @Override + public long getDeviation(Vector3D pos, Vector3D los, double altitude) { + + + + return 0; + } +} diff --git a/src/main/java/org/orekit/rugged/intersection/duvenhage/DuvenhageAlgorithm.java b/src/main/java/org/orekit/rugged/intersection/duvenhage/DuvenhageAlgorithm.java index 207d4603fc206da92e79b4b9e730802301dd0d99..5b4e4ff200a6741168a08d1934dff8a2c20dddba 100644 --- a/src/main/java/org/orekit/rugged/intersection/duvenhage/DuvenhageAlgorithm.java +++ b/src/main/java/org/orekit/rugged/intersection/duvenhage/DuvenhageAlgorithm.java @@ -78,6 +78,8 @@ public class DuvenhageAlgorithm implements IntersectionAlgorithm { // compute intersection with ellipsoid final NormalizedGeodeticPoint gp0 = ellipsoid.pointOnGround(position, los, 0.0); + // compute atmosphere deviation + // locate the entry tile along the line-of-sight MinMaxTreeTile tile = cache.getTile(gp0.getLatitude(), gp0.getLongitude());