From 6200c9830d6652ceecc97c41b0610be63209681f Mon Sep 17 00:00:00 2001 From: sesteves <sroesteves@gmail.com> Date: Fri, 1 Jul 2016 01:24:06 +0100 Subject: [PATCH] added skeleton for atmospheric refraction --- .../java/org/orekit/rugged/api/Rugged.java | 7 +++++ .../AtmosphericRefraction.java | 30 +++++++++++++++++++ .../MultiLayerModel.java | 18 +++++++++++ .../duvenhage/DuvenhageAlgorithm.java | 2 ++ 4 files changed, 57 insertions(+) create mode 100644 src/main/java/org/orekit/rugged/atmosphericrefraction/AtmosphericRefraction.java create mode 100644 src/main/java/org/orekit/rugged/atmosphericrefraction/MultiLayerModel.java diff --git a/src/main/java/org/orekit/rugged/api/Rugged.java b/src/main/java/org/orekit/rugged/api/Rugged.java index 3609513c..8771d81f 100644 --- a/src/main/java/org/orekit/rugged/api/Rugged.java +++ b/src/main/java/org/orekit/rugged/api/Rugged.java @@ -45,6 +45,8 @@ import org.orekit.bodies.GeodeticPoint; import org.orekit.errors.OrekitException; import org.orekit.errors.OrekitExceptionWrapper; 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.RuggedExceptionWrapper; @@ -364,6 +366,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 00000000..d17b112e --- /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 00000000..ab5ad84e --- /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 3a68e049..0749e141 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()); -- GitLab