Skip to content
Snippets Groups Projects
Commit f534a214 authored by Luc Maisonobe's avatar Luc Maisonobe
Browse files

Intersection algorithms can use the new ExtendedEllipsoid.

This allows them to chop off line-of-sight at DEM cells boundaries.
parent b078b90d
No related branches found
No related tags found
No related merge requests found
/* Copyright 2013-2014 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.core;
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D;
import org.orekit.bodies.GeodeticPoint;
import org.orekit.errors.OrekitException;
import org.orekit.rugged.api.RuggedException;
import org.orekit.rugged.api.TileUpdater;
import org.orekit.rugged.core.dem.IntersectionAlgorithm;
/** Intersection ignoring Digital Elevation Model.
* <p>
* This dummy implementation simply uses the ellipsoid itself.
* </p>
* @author Luc Maisonobe
*/
public class IgnoreDEMAlgorithm implements IntersectionAlgorithm {
/** Simple constructor.
*/
public IgnoreDEMAlgorithm() {
}
/** {@inheritDoc} */
@Override
public void setUpTilesManagement(final TileUpdater updater, final int maxCachedTiles) {
// we ignore the DEM
}
/** {@inheritDoc} */
@Override
public GeodeticPoint intersection(final ExtendedEllipsoid ellipsoid,
final Vector3D position, final Vector3D los)
throws RuggedException {
try {
return ellipsoid.transform(ellipsoid.pointAtAltitude(position, los, 0.0),
ellipsoid.getBodyFrame(), null);
} catch (OrekitException oe) {
// this should never happen
throw new RuggedException(oe, oe.getSpecifier(), oe.getParts());
}
}
}
......@@ -18,10 +18,11 @@ package org.orekit.rugged.core.dem;
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D;
import org.orekit.bodies.GeodeticPoint;
import org.orekit.rugged.api.GroundPoint;
import org.orekit.rugged.api.RuggedException;
import org.orekit.rugged.api.TileUpdater;
import org.orekit.rugged.core.ExtendedEllipsoid;
/** Interface for Digital Elevation Model algorithm.
/** Interface for Digital Elevation Model intersection algorithm.
* @author Luc Maisonobe
*/
public interface IntersectionAlgorithm {
......@@ -33,12 +34,13 @@ public interface IntersectionAlgorithm {
void setUpTilesManagement(TileUpdater updater, int maxCachedTiles);
/** Compute intersection of line with Digital Elevation Model.
* @param latitude latitude of line arrival at zero altitude
* @param longitude longitude of line arrival at zero altitude
* @param direction arrival direction in (East, North, Zenith) frame
* (the direction is from spacecraft to ground)
* @param ellipsoid reference ellipsoid
* @param position pixel position in ellipsoid frame
* @param los pixel line-of-sight in ellipsoid frame
* @return point at which the line first enters ground
* @exception RuggedException if intersection cannot be found
*/
GroundPoint intersection(double latitude0, double longitude0, Vector3D direction);
GeodeticPoint intersection(ExtendedEllipsoid ellipsoid, Vector3D position, Vector3D los)
throws RuggedException;
}
......@@ -17,12 +17,13 @@
package org.orekit.rugged.core.duvenhage;
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D;
import org.orekit.rugged.api.GroundPoint;
import org.orekit.bodies.GeodeticPoint;
import org.orekit.rugged.api.TileUpdater;
import org.orekit.rugged.core.ExtendedEllipsoid;
import org.orekit.rugged.core.dem.IntersectionAlgorithm;
import org.orekit.rugged.core.dem.TilesCache;
/** Direct and inverse localization using Duvenhage's algorithm.
/** Digital Elevation Model intersection using Duvenhage's algorithm.
* <p>
* The algorithm is described in the 2009 paper:
* <a href="http://researchspace.csir.co.za/dspace/bitstream/10204/3041/1/Duvenhage_2009.pdf">Using
......@@ -49,7 +50,8 @@ public class DuvenhageAlgorithm implements IntersectionAlgorithm {
/** {@inheritDoc} */
@Override
public GroundPoint intersection(final double latitude0, final double longitude0, final Vector3D direction) {
public GeodeticPoint intersection(final ExtendedEllipsoid ellipsoid,
final Vector3D position, final Vector3D los) {
// TODO: compute intersection
return null;
}
......
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