...
 
Commits (201)
pipeline {
agent any
tools {
maven 'mvn-default'
jdk 'openjdk-8'
}
options {
timeout(time: 60, unit: 'MINUTES')
}
stages {
stage('Cleaning') {
steps {
sh 'git clean -fdx'
}
}
stage('Build') {
steps {
script {
if ( env.BRANCH_NAME ==~ /^release-[.0-9]+$/ ) {
sh 'mvn verify assembly:single'
}
else {
sh 'mvn verify site'
}
}
}
}
}
post {
always {
archiveArtifacts artifacts: 'target/*.jar', fingerprint: true
script {
if ( env.BRANCH_NAME ==~ /^release-[.0-9]+$/ ) {
archiveArtifacts artifacts: 'target/*.zip', fingerprint: true
}
}
junit testResults: '**/target/surefire-reports/*.xml'
jacoco execPattern:'target/**.exec', classPattern: '**/classes', sourcePattern: '**/src/main/java'
recordIssues enabledForFailure: true, tools: [mavenConsole(), java(), javaDoc()]
recordIssues enabledForFailure: true, tool: checkStyle()
recordIssues enabledForFailure: true, tool: spotBugs()
}
}
}
RUGGED
Copyright 2013-2017 CS Systèmes d'Information
Copyright 2013-2019 CS Systèmes d'Information
This product includes software developed by
CS Systèmes d'Information (http://www.c-s.fr/)
......
<!--- Copyright 2013-2019 CS Systèmes d'Information
Licensed 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.
-->
<h1 style="color:blue;" align="center">
Rugged
</h1>
<h1>
<img src="src/site/resources/images/rugged-logo-small.jpg" alt="Rugged"/>
A sensor-to-terrain mapping tool
</h1>
<h4 align="center">Rugged is a free java library for geolocation and used for satellite imagery.</h4>
Rugged is an add-on for [Orekit](https://www.orekit.org/ "Orekit homepage") handling Digital Elevation Models contribution to
line of sight computation. It is a free software intermediate-level library written in Java.
It mainly provides direct and inverse location, i.e. it allows to compute accurately
which ground point is looked at from a specific pixel in a spacecraft instrument,
and conversely which pixel will see a specified ground point. This mapping between
ground and sensor is computed with a viewing model taking into account:
* ground Digital Elevation Model (DEM),
* Earth rotation will all its tiny irregularities,
* on-board sensor pixels individual line-of-sights,
* spacecraft motion and attitude,
* several physical effects.
Direct and inverse location can be used to perform full ortho-rectification of
images and correlation between sensors observing the same area.
Homepage: [www.orekit.org/rugged/](https://www.orekit.org/rugged/ "Rugged homepage")
......@@ -31,7 +31,7 @@
<module name="IllegalImport"/>
<module name="Indentation">
<property name="basicOffset" value="4"/>
<property name="caseIndent" value="4"/>
<property name="caseIndent" value="4"/>
</module>
<module name="JavadocMethod">
<property name="allowUndeclaredRTE" value="true"/>
......@@ -71,26 +71,35 @@
PLUS_ASSIGN, QUESTION, RCURLY, SL, SLIST, SL_ASSIGN, SR,
SR_ASSIGN, STAR, STAR_ASSIGN"/>
</module>
<module name="FileContentsHolder"/>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: stop JavadocVariable check"/>
<property name="onCommentFormat" value="CHECKSTYLE\: resume JavadocVariable check"/>
<property name="checkFormat" value="JavadocVariable"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: stop VisibilityModifierCheck"/>
<property name="onCommentFormat" value="CHECKSTYLE\: resume VisibilityModifierCheck"/>
<property name="offCommentFormat" value="CHECKSTYLE\: stop VisibilityModifier check"/>
<property name="onCommentFormat" value="CHECKSTYLE\: resume VisibilityModifier check"/>
<property name="checkFormat" value="VisibilityModifierCheck"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: stop NoWhitespaceAfter"/>
<property name="onCommentFormat" value="CHECKSTYLE\: resume NoWhitespaceAfter"/>
<property name="offCommentFormat" value="CHECKSTYLE\: stop NoWhitespaceAfter check"/>
<property name="onCommentFormat" value="CHECKSTYLE\: resume NoWhitespaceAfter check"/>
<property name="checkFormat" value="NoWhitespaceAfter"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: stop FallThrough check"/>
<property name="onCommentFormat" value="CHECKSTYLE\: resume FallThrough check"/>
<property name="checkFormat" value="FallThrough"/>
<property name="offCommentFormat" value="CHECKSTYLE\: stop Indentation check"/>
<property name="onCommentFormat" value="CHECKSTYLE\: resume Indentation check"/>
<property name="checkFormat" value="IndentationCheck"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: stop MultipleStringLiterals check"/>
<property name="onCommentFormat" value="CHECKSTYLE\: resume MultipleStringLiterals check"/>
<property name="checkFormat" value="MultipleStringLiteralsCheck"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: stop UnnecessaryParentheses check"/>
<property name="onCommentFormat" value="CHECKSTYLE\: resume UnnecessaryParentheses check"/>
<property name="checkFormat" value="UnnecessaryParentheses"/>
</module>
</module>
<module name="RegexpHeader">
......
This diff is collapsed.
<?xml version="1.0"?>
<!--
This file contains some false positive bugs detected by findbugs. Their
This file contains some false positive bugs detected by spotbugs. Their
false positive nature has been analyzed individually and they have been
put here to instruct findbugs it must ignore them.
-->
......
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright 2013-2017 CS Systèmes d'Information
<!-- Copyright 2013-2019 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.
......@@ -20,7 +20,78 @@
<title>Rugged Changes</title>
</properties>
<body>
<release version="2.0" date="2017-12-22" description="This is a major release.
<release version="2.1" date="2019-03-14" description="This is a minor release.
It adds refraction in inverse location and fixes a few bugs. This version depends
on Orekit 9.3 and Hipparchus 1.4.">
<action dev="guylaine" type="update">
Updated dependencies to Orekit 9.3 and Hipparchus 1.4.
</action>
<action dev="luc" type="fix" issue="376">
Direct location may result to a null result in some very rugged region.
In Duvenhage algorithm, in the refineIntersection method for the DEM,
some rare cases led to no intersection (as a result from SimpleTile.cellIntersection)
with the closeGuess given as input of refineIntersection.By shifting the solution
along the LOS direction, with an iterative process, we are able to find the intersection.
</action>
<action dev="guylaine" type="fix" issue="377">
Add the possibility to suspend and resume the dump.
When performing a dump, in some cases, some extra informations are dumped
but are not relevant.
For instance when updating a tile for a SRTM tile, we need to add the geoid
value of the current point. In the dump file, the geoid tile is also dumped
and it leads to bad results when performing the DumpReplayer, as the geoid
elevations are read instead of the real elevations.
</action>
<action dev="guylaine" type="update">
Enable null in dump of direct or inverse location results.
If direct or inverse location gave "null" as a result, it was not dumped.
</action>
<action dev="guylaine" type="update">
Improve test coverage of classes related to dump (org.orekit.rugged.errors).
</action>
<action dev="guylaine" type="fix" issue="373">
Changed RuggedException from checked to unchecked exception.
Most functions do throw such exceptions. As they are unchecked, they are
not advertised in either `throws` statements in the function signature or
in the javadoc. So users must consider that as soon as they use any Rugged
feature, an unchecked `RuggedException` may be thrown. In most cases, users
will not attempt to recover for this but will only use them to display or
log a meaningful error message.
</action>
<action dev="guylaine" type="fix" issue="372">
Add (optional) atmospheric refraction for inverse location.
In Rugged 2.0, only the direct location can take into account the atmospheric refraction.
</action>
<action dev="guylaine" type="add" due-to="Issam Boukerch">
Changed terms for refining tutorials.
The "fulcrum points" term is changed into "Ground Control Points (GCP)" and
the "liaison points" term into "tie points".
</action>
<action dev="luc" type="fix" issue="371">
For refining computation, correct the constructor of the class
adjustment.measurements.SensorToGroundMapping due to a parameters reversal error.
</action>
<action dev="guylaine" type="fix" issue="256">
Bad check of maxDate validity in utils.SpacecraftToObservedBody.SpacecraftToObservedBody
method.
</action>
<action dev="luc" type="add" due-to="Lars Næsbye Christensen">
Updated Danish translations of error messages.
</action>
<action dev="luc" type="add" due-to="Roberto Alacevich">
Updated Italian translations of error messages.
</action>
<action dev="guylaine" type="add" due-to="Espen Bjørntvedt">
Updated Norwegian translations of error messages.
</action>
<action dev="luc" type="add" due-to="Beatriz Salazar García">
Updated Spanish translations of error messages.
</action>
</release>
<release version="2.0" date="2017-12-19" description="This is a major release.
It mainly provides a refinement feature (i.e. adjusting the viewing model
parameters to match ground control points.">
<action dev="guylaine" type="update">
......
' Copyright 2013-2017 CS Systèmes d'Information
' Copyright 2013-2019 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.
......
' Copyright 2013-2017 CS Systèmes d'Information
' Copyright 2013-2019 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.
......
' Copyright 2013-2017 CS Systèmes d'Information
' Copyright 2013-2019 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.
......
' Copyright 2013-2017 CS Systèmes d'Information
' Copyright 2013-2019 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.
......
' Copyright 2013-2017 CS Systèmes d'Information
' Copyright 2013-2019 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.
......
' Copyright 2013-2017 CS Systèmes d'Information
' Copyright 2013-2019 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.
......
' Copyright 2013-2017 CS Systèmes d'Information
' Copyright 2013-2019 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.
......
' Copyright 2013-2017 CS Systèmes d'Information
' Copyright 2013-2019 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.
......
' Copyright 2013-2017 CS Systèmes d'Information
' Copyright 2013-2019 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.
......
......@@ -12,7 +12,7 @@
<include>BUILDING.txt</include>
<include>pom.xml</include>
<include>checkstyle.xml</include>
<include>findbugs-exclude-filter.xml</include>
<include>spotbugs-exclude-filter.xml</include>
<include>license-header.txt</include>
</includes>
<useDefaultExcludes>true</useDefaultExcludes>
......@@ -22,4 +22,4 @@
<useDefaultExcludes>true</useDefaultExcludes>
</fileSet>
</fileSets>
</assembly>
\ No newline at end of file
</assembly>
/* Copyright 2013-2017 CS Systèmes d'Information
/* Copyright 2013-2019 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.
......@@ -25,14 +25,11 @@ import java.util.Map;
import org.hipparchus.optim.nonlinear.vector.leastsquares.LeastSquaresOptimizer.Optimum;
import org.hipparchus.optim.nonlinear.vector.leastsquares.LeastSquaresProblem;
import org.orekit.errors.OrekitException;
import org.orekit.errors.OrekitExceptionWrapper;
import org.orekit.rugged.adjustment.measurements.Observables;
import org.orekit.rugged.api.Rugged;
import org.orekit.rugged.errors.RuggedException;
import org.orekit.rugged.errors.RuggedExceptionWrapper;
import org.orekit.rugged.errors.RuggedMessages;
import org.orekit.rugged.linesensor.LineSensor;
import org.orekit.rugged.adjustment.measurements.Observables;
/** Create adjustment context for viewing model refining.
* @author Lucie LabatAllee
......@@ -118,54 +115,40 @@ public class AdjustmentContext {
* @param parametersConvergenceThreshold convergence threshold on normalized
* parameters (dimensionless, related to parameters scales)
* @return optimum of the least squares problem
* @exception RuggedException if several parameters with the same name
* exist, if no parameters have been selected for estimation, or
* if parameters cannot be estimated (too few measurements,
* ill-conditioned problem ...)
*/
public Optimum estimateFreeParameters(final Collection<String> ruggedNameList, final int maxEvaluations,
final double parametersConvergenceThreshold)
throws RuggedException {
try {
final List<Rugged> ruggedList = new ArrayList<Rugged>();
final List<LineSensor> selectedSensors = new ArrayList<LineSensor>();
for (String ruggedName : ruggedNameList) {
final Rugged rugged = this.viewingModel.get(ruggedName);
if (rugged == null) {
throw new RuggedException(RuggedMessages.INVALID_RUGGED_NAME);
}
ruggedList.add(rugged);
selectedSensors.addAll(rugged.getLineSensors());
final double parametersConvergenceThreshold) {
final List<Rugged> ruggedList = new ArrayList<Rugged>();
final List<LineSensor> selectedSensors = new ArrayList<LineSensor>();
for (String ruggedName : ruggedNameList) {
final Rugged rugged = this.viewingModel.get(ruggedName);
if (rugged == null) {
throw new RuggedException(RuggedMessages.INVALID_RUGGED_NAME);
}
final LeastSquareAdjuster adjuster = new LeastSquareAdjuster(this.optimizerID);
LeastSquaresProblem theProblem = null;
// builder
switch (ruggedList.size()) {
case 1:
final Rugged rugged = ruggedList.get(0);
final GroundOptimizationProblemBuilder groundOptimizationProblem = new GroundOptimizationProblemBuilder(selectedSensors, measurements, rugged);
theProblem = groundOptimizationProblem.build(maxEvaluations, parametersConvergenceThreshold);
break;
case 2:
final InterSensorsOptimizationProblemBuilder interSensorsOptimizationProblem = new InterSensorsOptimizationProblemBuilder(selectedSensors, measurements, ruggedList);
theProblem = interSensorsOptimizationProblem.build(maxEvaluations, parametersConvergenceThreshold);
break;
default :
throw new RuggedException(RuggedMessages.UNSUPPORTED_REFINING_CONTEXT, ruggedList.size());
}
return adjuster.optimize(theProblem);
ruggedList.add(rugged);
selectedSensors.addAll(rugged.getLineSensors());
}
} catch (RuggedExceptionWrapper rew) {
throw rew.getException();
} catch (OrekitExceptionWrapper oew) {
final OrekitException oe = oew.getException();
throw new RuggedException(oe, oe.getSpecifier(), oe.getParts());
final LeastSquareAdjuster adjuster = new LeastSquareAdjuster(this.optimizerID);
LeastSquaresProblem theProblem = null;
// builder
switch (ruggedList.size()) {
case 1:
final Rugged rugged = ruggedList.get(0);
final GroundOptimizationProblemBuilder groundOptimizationProblem = new GroundOptimizationProblemBuilder(selectedSensors, measurements, rugged);
theProblem = groundOptimizationProblem.build(maxEvaluations, parametersConvergenceThreshold);
break;
case 2:
final InterSensorsOptimizationProblemBuilder interSensorsOptimizationProblem = new InterSensorsOptimizationProblemBuilder(selectedSensors, measurements, ruggedList);
theProblem = interSensorsOptimizationProblem.build(maxEvaluations, parametersConvergenceThreshold);
break;
default :
throw new RuggedException(RuggedMessages.UNSUPPORTED_REFINING_CONTEXT, ruggedList.size());
}
return adjuster.optimize(theProblem);
}
}
/* Copyright 2013-2017 CS Systèmes d'Information
/* Copyright 2013-2019 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.
......@@ -17,12 +17,14 @@
package org.orekit.rugged.adjustment;
import org.hipparchus.linear.LUDecomposer;
import org.hipparchus.linear.QRDecomposer;
import org.hipparchus.optim.nonlinear.vector.leastsquares.GaussNewtonOptimizer;
import org.hipparchus.optim.nonlinear.vector.leastsquares.LeastSquaresOptimizer;
import org.hipparchus.optim.nonlinear.vector.leastsquares.LeastSquaresOptimizer.Optimum;
import org.hipparchus.optim.nonlinear.vector.leastsquares.LeastSquaresProblem;
import org.hipparchus.optim.nonlinear.vector.leastsquares.LevenbergMarquardtOptimizer;
import org.orekit.rugged.errors.RuggedException;
import org.orekit.rugged.errors.RuggedInternalError;
/** LeastSquareAdjuster
* Class for setting least square algorithm chosen for solving optimization problem.
......@@ -75,14 +77,14 @@ public class LeastSquareAdjuster {
return new LevenbergMarquardtOptimizer();
case GAUSS_NEWTON_LU :
return new GaussNewtonOptimizer().withDecomposition(GaussNewtonOptimizer.Decomposition.LU);
return new GaussNewtonOptimizer(new LUDecomposer(1e-11), true);
case GAUSS_NEWTON_QR :
return new GaussNewtonOptimizer().withDecomposition(GaussNewtonOptimizer.Decomposition.QR);
return new GaussNewtonOptimizer(new QRDecomposer(1e-11), false);
default :
// this should never happen
throw RuggedException.createInternalError(null);
throw new RuggedInternalError(null);
}
}
}
/* Copyright 2013-2017 CS Systèmes d'Information
/* Copyright 2013-2019 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.
......@@ -30,13 +30,10 @@ import org.hipparchus.optim.ConvergenceChecker;
import org.hipparchus.optim.nonlinear.vector.leastsquares.LeastSquaresProblem;
import org.hipparchus.optim.nonlinear.vector.leastsquares.MultivariateJacobianFunction;
import org.hipparchus.optim.nonlinear.vector.leastsquares.ParameterValidator;
import org.orekit.errors.OrekitException;
import org.orekit.errors.OrekitExceptionWrapper;
import org.orekit.rugged.adjustment.measurements.Observables;
import org.orekit.rugged.errors.RuggedException;
import org.orekit.rugged.errors.RuggedExceptionWrapper;
import org.orekit.rugged.errors.RuggedMessages;
import org.orekit.rugged.linesensor.LineSensor;
import org.orekit.rugged.adjustment.measurements.Observables;
import org.orekit.rugged.utils.DSGenerator;
import org.orekit.utils.ParameterDriver;
......@@ -72,21 +69,15 @@ abstract class OptimizationProblemBuilder {
/** Constructor.
* @param sensors list of sensors to refine
* @param measurements set of observables
* @throws RuggedException an exception is generated if no parameters has been selected for refining
*/
OptimizationProblemBuilder(final List<LineSensor> sensors, final Observables measurements) throws RuggedException {
try {
this.generator = this.createGenerator(sensors);
this.drivers = this.generator.getSelected();
this.nbParams = this.drivers.size();
if (this.nbParams == 0) {
throw new RuggedException(RuggedMessages.NO_PARAMETERS_SELECTED);
}
} catch (RuggedExceptionWrapper rew) {
throw rew.getException();
}
OptimizationProblemBuilder(final List<LineSensor> sensors, final Observables measurements) {
this.generator = this.createGenerator(sensors);
this.drivers = this.generator.getSelected();
this.nbParams = this.drivers.size();
if (this.nbParams == 0) {
throw new RuggedException(RuggedMessages.NO_PARAMETERS_SELECTED);
}
this.measurements = measurements;
this.sensors = sensors;
}
......@@ -94,12 +85,10 @@ abstract class OptimizationProblemBuilder {
/** Least squares problem builder.
* @param maxEvaluations maximum number of evaluations
* @param convergenceThreshold convergence threshold
* @throws RuggedException if sensor is not found
* @return the least squares problem
*/
public abstract LeastSquaresProblem build(int maxEvaluations, double convergenceThreshold)
throws RuggedException;
public abstract LeastSquaresProblem build(int maxEvaluations, double convergenceThreshold);
/** Create the convergence check.
* <p>
......@@ -131,10 +120,8 @@ abstract class OptimizationProblemBuilder {
return start;
}
/** Create targets and weights of optimization problem.
* @throws RuggedException if no reference mappings for parameters estimation are found
*/
protected abstract void createTargetAndWeight() throws RuggedException;
/** Create targets and weights of optimization problem. */
protected abstract void createTargetAndWeight();
/** Create the model function value and its Jacobian.
* @return the model function value and its Jacobian
......@@ -151,19 +138,14 @@ abstract class OptimizationProblemBuilder {
// Prevent parameters to exceed their prescribed bounds
final ParameterValidator validator = params -> {
try {
int i = 0;
for (final ParameterDriver driver : this.drivers) {
// let the parameter handle min/max clipping
driver.setNormalizedValue(params.getEntry(i));
params.setEntry(i++, driver.getNormalizedValue());
}
return params;
int i = 0;
for (final ParameterDriver driver : this.drivers) {
} catch (OrekitException oe) {
throw new OrekitExceptionWrapper(oe);
// let the parameter handle min/max clipping
driver.setNormalizedValue(params.getEntry(i));
params.setEntry(i++, driver.getNormalizedValue());
}
return params;
};
return validator;
......
/* Copyright 2013-2017 CS Systèmes d'Information
/* Copyright 2013-2019 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.
......
/* Copyright 2013-2017 CS Systèmes d'Information
/* Copyright 2013-2019 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.
......@@ -35,10 +35,10 @@ public class Observables {
/** Separator between sensors. */
private static final String SENSORS_SEPARATOR = "__";
/** Sensor to ground mapping structure (example: for GCP points).*/
/** Sensor to ground mapping structure (example: for Ground Control Points GCP points).*/
private final Map<String, SensorToGroundMapping> groundMappings;
/** Sensor to sensor mappings structure (liaison points). */
/** Sensor to sensor mappings structure (Tie points). */
private final Map<String, SensorToSensorMapping> interMappings;
/** Number of viewing models to map.*/
......
/* Copyright 2013-2017 CS Systèmes d'Information
/* Copyright 2013-2019 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.
......
/* Copyright 2013-2017 CS Systèmes d'Information
/* Copyright 2013-2019 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.
......@@ -46,7 +46,7 @@ public class SensorToGroundMapping {
* @param sensorName name of the sensor to which mapping applies
*/
public SensorToGroundMapping(final String sensorName) {
this(sensorName, RUGGED);
this(RUGGED, sensorName);
}
/** Build a new instance with a specific Rugged name.
......
/* Copyright 2013-2017 CS Systèmes d'Information
/* Copyright 2013-2019 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.
......
/* Copyright 2013-2017 CS Systèmes d'Information
/* Copyright 2013-2019 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.
......
/* Copyright 2013-2017 CS Systèmes d'Information
/* Copyright 2013-2019 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.
......
/* Copyright 2013-2017 CS Systèmes d'Information
/* Copyright 2013-2019 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.
......
/* Copyright 2013-2017 CS Systèmes d'Information
/* Copyright 2013-2019 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.
......
/* Copyright 2013-2017 CS Systèmes d'Information
/* Copyright 2013-2019 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.
......@@ -42,12 +42,16 @@ import org.orekit.time.AbsoluteDate;
* time, so user code should not rely on it.
* </p>
* @author Luc Maisonobe
* @author Guylaine Prat
*/
public class DumpManager {
/** Dump file (default initial value is null, i.e. nothing is dumped). */
private static final ThreadLocal<Dump> DUMP = new ThreadLocal<Dump>();
/** Boolean to check if the dump is suspended. */
private static boolean isSuspended = false;
/** Private constructor for utility class.
*/
private DumpManager() {
......@@ -56,10 +60,8 @@ public class DumpManager {
/** Activate debug dump.
* @param file dump file
* @exception RuggedException if debug dump is already active for this thread
* or if debug file cannot be opened
*/
public static void activate(final File file) throws RuggedException {
public static void activate(final File file) {
if (isActive()) {
throw new RuggedException(RuggedMessages.DEBUG_DUMP_ALREADY_ACTIVE);
} else {
......@@ -73,9 +75,8 @@ public class DumpManager {
}
/** Deactivate debug dump.
* @exception RuggedException if debug dump is already active for this thread
*/
public static void deactivate() throws RuggedException {
public static void deactivate() {
if (isActive()) {
DUMP.get().deactivate();
DUMP.set(null);
......@@ -84,11 +85,44 @@ public class DumpManager {
}
}
/** Suspend the dump.
* In case the dump is already suspended, keep the previous status in order to
* correctly deal the resume stage.
* @return a flag to tell if the dump is already suspended (true; false otherwise)
*/
public static Boolean suspend() {
// Check if the dump is already suspended
if (isSuspended) {
return isSuspended;
} else {
isSuspended = true;
return false;
}
}
/** Resume the dump, only if it was not already suspended.
* @param wasSuspended flag to tell if the dump was already suspended (true; false otherwise)
*/
public static void resume(final Boolean wasSuspended) {
if (!wasSuspended) {
isSuspended = false;
}
}
/** In case dump is suspended and an exception is thrown,
* allows the dump to end nicely.
*/
public static void endNicely() {
isSuspended = false;
if (isActive()) deactivate();
}
/** Check if dump is active for this thread.
* @return true if dump is active for this thread
*/
public static boolean isActive() {
return DUMP.get() != null;
return DUMP.get() != null && !isSuspended;
}
/** Dump DEM cell data.
......@@ -135,29 +169,25 @@ public class DumpManager {
/** Dump a direct location computation.
* @param date date of the location
* @param position pixel position in spacecraft frame
* @param sensorPosition sensor position in spacecraft frame
* @param los normalized line-of-sight in spacecraft frame
* @param lightTimeCorrection flag for light time correction
* @param aberrationOfLightCorrection flag for aberration of light correction
* @param refractionCorrection flag for refraction correction
* @exception RuggedException if date cannot be converted to UTC
*/
public static void dumpDirectLocation(final AbsoluteDate date, final Vector3D position, final Vector3D los,
public static void dumpDirectLocation(final AbsoluteDate date, final Vector3D sensorPosition, final Vector3D los,
final boolean lightTimeCorrection, final boolean aberrationOfLightCorrection,
final boolean refractionCorrection)
throws RuggedException {
final boolean refractionCorrection) {
if (isActive()) {
DUMP.get().dumpDirectLocation(date, position, los, lightTimeCorrection, aberrationOfLightCorrection,
refractionCorrection);
DUMP.get().dumpDirectLocation(date, sensorPosition, los, lightTimeCorrection, aberrationOfLightCorrection,
refractionCorrection);
}
}
/** Dump a direct location result.
* @param gp resulting geodetic point
* @exception RuggedException if date cannot be converted to UTC
*/
public static void dumpDirectLocationResult(final GeodeticPoint gp)
throws RuggedException {
public static void dumpDirectLocationResult(final GeodeticPoint gp) {
if (isActive()) {
DUMP.get().dumpDirectLocationResult(gp);
}
......@@ -166,17 +196,22 @@ public class DumpManager {
/** Dump an inverse location computation.
* @param sensor sensor
* @param point point to localize
* @param ellipsoid the used ellipsoid
* @param minLine minimum line number
* @param maxLine maximum line number
* @param lightTimeCorrection flag for light time correction
* @param aberrationOfLightCorrection flag for aberration of light correction
* @param refractionCorrection flag for refraction correction
*/
public static void dumpInverseLocation(final LineSensor sensor, final GeodeticPoint point,
final ExtendedEllipsoid ellipsoid,
final int minLine, final int maxLine,
final boolean lightTimeCorrection, final boolean aberrationOfLightCorrection) {
final boolean lightTimeCorrection, final boolean aberrationOfLightCorrection,
final boolean refractionCorrection) {
if (isActive()) {
DUMP.get().dumpInverseLocation(sensor, point, minLine, maxLine,
lightTimeCorrection, aberrationOfLightCorrection);
lightTimeCorrection, aberrationOfLightCorrection, refractionCorrection);
DUMP.get().dumpEllipsoid(ellipsoid);
}
}
......@@ -194,11 +229,9 @@ public class DumpManager {
* @param index index of the transform
* @param bodyToInertial transform from body frame to inertial frame
* @param scToInertial transfrom from spacecraft frame to inertial frame
* @exception RuggedException if reference date cannot be converted to UTC
*/
public static void dumpTransform(final SpacecraftToObservedBody scToBody, final int index,
final Transform bodyToInertial, final Transform scToInertial)
throws RuggedException {
final Transform bodyToInertial, final Transform scToInertial) {
if (isActive()) {
DUMP.get().dumpTransform(scToBody, index, bodyToInertial, scToInertial);
}
......@@ -206,10 +239,8 @@ public class DumpManager {
/** Dump a sensor mean plane.
* @param meanPlane mean plane associated with sensor
* @exception RuggedException if some frames cannot be computed at mid date
*/
public static void dumpSensorMeanPlane(final SensorMeanPlaneCrossing meanPlane)
throws RuggedException {
public static void dumpSensorMeanPlane(final SensorMeanPlaneCrossing meanPlane) {
if (isActive()) {
DUMP.get().dumpSensorMeanPlane(meanPlane);
}
......@@ -220,10 +251,8 @@ public class DumpManager {
* @param date date
* @param i pixel index
* @param los pixel normalized line-of-sight
* @exception RuggedException if date cannot be converted to UTC
*/
public static void dumpSensorLOS(final LineSensor sensor, final AbsoluteDate date, final int i, final Vector3D los)
throws RuggedException {
public static void dumpSensorLOS(final LineSensor sensor, final AbsoluteDate date, final int i, final Vector3D los) {
if (isActive()) {
DUMP.get().dumpSensorLOS(sensor, date, i, los);
}
......@@ -233,10 +262,8 @@ public class DumpManager {
* @param sensor sensor
* @param lineNumber line number
* @param date date
* @exception RuggedException if date cannot be converted to UTC
*/
public static void dumpSensorDatation(final LineSensor sensor, final double lineNumber, final AbsoluteDate date)
throws RuggedException {
public static void dumpSensorDatation(final LineSensor sensor, final double lineNumber, final AbsoluteDate date) {
if (isActive()) {
DUMP.get().dumpSensorDatation(sensor, lineNumber, date);
}
......
/* Copyright 2013-2017 CS Systèmes d'Information
/* Copyright 2013-2019 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.
......@@ -27,15 +27,15 @@ import org.hipparchus.exception.LocalizedException;
* the rugged library classes.
* <p>
* This class is heavily based on Orekit {@link org.orekit.errors.OrekitException},
* This class is heavily based on {@code OrekitException},
* which is distributed under the terms of the Apache License V2.
* </p>
*
* @author Luc Maisonobe
* @author Guylaine Prat
*/
public class RuggedException extends Exception implements LocalizedException {
public class RuggedException extends RuntimeException implements LocalizedException {
/** Serializable UID. */
private static final long serialVersionUID = 20140309L;
......@@ -113,37 +113,4 @@ public class RuggedException extends Exception implements LocalizedException {
return (specifier == null) ? "" : new MessageFormat(specifier.getLocalizedString(locale), locale).format(parts);
}
/** Create an {@link java.lang.RuntimeException} for an internal error.
* @param cause underlying cause
* @return an {@link java.lang.RuntimeException} for an internal error
*/
public static RuntimeException createInternalError(final Throwable cause) {
/** Format specifier (to be translated). */
final Localizable specifier = RuggedMessages.INTERNAL_ERROR;
/** Parts to insert in the format (no translation). */
final String parts = "rugged-developers@orekit.org";
return new RuntimeException() {
/** Serializable UID. */
private static final long serialVersionUID = 20140309L;
/** {@inheritDoc} */
@Override
public String getMessage() {
return buildMessage(Locale.US, specifier, parts);
}
/** {@inheritDoc} */
@Override
public String getLocalizedMessage() {
return buildMessage(Locale.getDefault(), specifier, parts);
}
};
}
}
/* Copyright 2013-2017 CS Systèmes d'Information
/* Copyright 2013-2019 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.
......@@ -22,11 +22,15 @@ package org.orekit.rugged.errors;
* this exception. Typical examples are propagation methods that are used inside Hipparchus
* optimizers, integrators or solvers.</p>
* <p>
* This class is heavily based on Orekit {@link org.orekit.errors.OrekitException},
* This class is heavily based on {@code OrekitException},
* which is distributed under the terms of the Apache License V2.
* </p>
* @author Luc Maisonobe
* @author Guylaine Prat
* @deprecated as of 2.1, this class is not used anymore, as {@link RuggedException}
* is now an unchecked exception
*/
@Deprecated
public class RuggedExceptionWrapper extends RuntimeException {
/** serializable UID. */
......
/* Copyright 2013-2019 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.errors;
import java.text.MessageFormat;
import java.util.Locale;
import org.hipparchus.exception.Localizable;
import org.hipparchus.exception.LocalizedException;
/** Extension of {@link java.lang.Runtime} with localized message for internal errors only.
* @since 2.1
*/
public class RuggedInternalError extends RuntimeException implements LocalizedException {
/** Serializable UID. */
private static final long serialVersionUID = 20190305L;
/** Format specifier (to be translated). */
private final Localizable specifier = RuggedMessages.INTERNAL_ERROR;
/** Parts to insert in the format (no translation). */
private final String[] parts = new String[] {
"https://gitlab.orekit.org/orekit/rugged/issues"
};
/** Create an exception with localized message.
* @param cause underlying cause
*/
public RuggedInternalError(final Throwable cause) {
super(cause);
}
/** {@inheritDoc} */
@Override
public String getMessage(final Locale locale) {
return buildMessage(locale);
}
/** {@inheritDoc} */
@Override
public String getMessage() {
return buildMessage(Locale.US);
}
/** {@inheritDoc} */
@Override
public String getLocalizedMessage() {
return buildMessage(Locale.getDefault());
}
/** {@inheritDoc} */
@Override
public Localizable getSpecifier() {
return specifier;
}
/** {@inheritDoc} */
@Override
public Object[] getParts() {
return parts.clone();
}
/**
* Builds a message string by from a pattern and its arguments.
* @param locale Locale in which the message should be translated
* @return a message string
*/
private String buildMessage(final Locale locale) {
return new MessageFormat(specifier.getLocalizedString(locale), locale).format(parts);
}
}
/* Copyright 2013-2017 CS Systèmes d'Information
/* Copyright 2013-2019 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.
......@@ -43,7 +43,7 @@ import org.hipparchus.exception.Localizable;
* translation is missing.
* </p>
* <p>
* This class is heavily based on Orekit {@link org.orekit.errors.OrekitMessages},
* This class is heavily based on {@code OrekitMessages},
* which is distributed under the terms of the Apache License V2.
* </p>
*/
......@@ -51,7 +51,7 @@ public enum RuggedMessages implements Localizable {
// CHECKSTYLE: stop JavadocVariable check
INTERNAL_ERROR("internal error, contact maintenance at {0}"),
INTERNAL_ERROR("internal error, please notify development team by creating an issue at {0}"),
OUT_OF_TILE_INDICES("no data at indices [{0}, {1}], tile only covers from [0, 0] to [{2}, {3}] (inclusive)"),
OUT_OF_TILE_ANGLES("no data at latitude {0} and longitude {1}, tile covers only latitudes {2} to {3} and longitudes {4} to {5}"),
NO_DEM_DATA("no Digital Elevation Model data at latitude {0} and longitude {1}"),
......@@ -73,6 +73,7 @@ public enum RuggedMessages implements Localizable {
CANNOT_PARSE_LINE("cannot parse line {0}, file {1}: {2}"),
LIGHT_TIME_CORRECTION_REDEFINED("light time correction redefined, line {0}, file {1}: {2}"),
ABERRATION_OF_LIGHT_CORRECTION_REDEFINED("aberration of light correction redefined, line {0}, file {1}: {2}"),
ATMOSPHERIC_REFRACTION_REDEFINED("atmospheric refraction correction redefined, line {0}, file {1}: {2}"),
TILE_ALREADY_DEFINED("tile {0} already defined, line {1}, file {2}: {3}"),
UNKNOWN_TILE("unknown tile {0}, line {1}, file {2}: {3}"),
NO_PARAMETERS_SELECTED("no parameters have been selected for estimation"),
......@@ -80,7 +81,9 @@ public enum RuggedMessages implements Localizable {
DUPLICATED_PARAMETER_NAME("a different parameter with name {0} already exists"),
INVALID_RUGGED_NAME("invalid rugged name"),
UNSUPPORTED_REFINING_CONTEXT("refining using {0} rugged instance is not handled"),
NO_LAYER_DATA("no atmospheric layer data at altitude {0} (lowest altitude: {1})");
NO_LAYER_DATA("no atmospheric layer data at altitude {0} (lowest altitude: {1})"),
INVALID_STEP("step {0} is not valid : {1}"),
INVALID_RANGE_FOR_LINES("range between min line {0} and max line {1} is invalid {2}");
// CHECKSTYLE: resume JavadocVariable check
......@@ -114,7 +117,7 @@ public enum RuggedMessages implements Localizable {
final String translated = bundle.getString(name());
if ((translated != null) &&
(translated.length() > 0) &&
(!translated.toLowerCase().contains("missing translation"))) {
(!translated.toLowerCase(locale).contains("missing translation"))) {
// the value of the resource is the translated format
return translated;
}
......@@ -142,8 +145,7 @@ public enum RuggedMessages implements Localizable {
/** {@inheritDoc} */
@Override
public ResourceBundle newBundle(final String baseName, final Locale locale, final String format,
final ClassLoader loader, final boolean reload)
throws IllegalAccessException, InstantiationException, IOException {
final ClassLoader loader, final boolean reload) throws IOException {
// The below is a copy of the default implementation.
final String bundleName = toBundleName(baseName, locale);
final String resourceName = toResourceName(bundleName, "utf8");
......
/* Copyright 2013-2017 CS Systèmes d'Information
/* Copyright 2013-2019 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.
......@@ -18,10 +18,8 @@ package org.orekit.rugged.intersection;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.orekit.bodies.GeodeticPoint;
import org.orekit.errors.OrekitException;
import org.orekit.rugged.api.AlgorithmId;
import org.orekit.rugged.errors.DumpManager;
import org.orekit.rugged.errors.RuggedException;
import org.orekit.rugged.utils.ExtendedEllipsoid;
import org.orekit.rugged.utils.NormalizedGeodeticPoint;
......@@ -46,33 +44,23 @@ public class ConstantElevationAlgorithm implements IntersectionAlgorithm {
/** {@inheritDoc} */
@Override
public NormalizedGeodeticPoint intersection(final ExtendedEllipsoid ellipsoid,
final Vector3D position, final Vector3D los)
throws RuggedException {
try {
DumpManager.dumpAlgorithm(AlgorithmId.CONSTANT_ELEVATION_OVER_ELLIPSOID, constantElevation);
final Vector3D p = ellipsoid.pointAtAltitude(position, los, constantElevation);
final GeodeticPoint gp = ellipsoid.transform(p, ellipsoid.getFrame(), null);
return new NormalizedGeodeticPoint(gp.getLatitude(), gp.getLongitude(), gp.getAltitude(), 0.0);
} catch (OrekitException oe) {
throw new RuggedException(oe, oe.getSpecifier(), oe.getParts());
}
final Vector3D position, final Vector3D los) {
DumpManager.dumpAlgorithm(AlgorithmId.CONSTANT_ELEVATION_OVER_ELLIPSOID, constantElevation);
final Vector3D p = ellipsoid.pointAtAltitude(position, los, constantElevation);
final GeodeticPoint gp = ellipsoid.transform(p, ellipsoid.getFrame(), null);
return new NormalizedGeodeticPoint(gp.getLatitude(), gp.getLongitude(), gp.getAltitude(), 0.0);
}
/** {@inheritDoc} */
@Override
public NormalizedGeodeticPoint refineIntersection(final ExtendedEllipsoid ellipsoid,
final Vector3D position, final Vector3D los,
final NormalizedGeodeticPoint closeGuess)
throws RuggedException {
try {
DumpManager.dumpAlgorithm(AlgorithmId.CONSTANT_ELEVATION_OVER_ELLIPSOID, constantElevation);
final Vector3D p = ellipsoid.pointAtAltitude(position, los, constantElevation);
final GeodeticPoint gp = ellipsoid.transform(p, ellipsoid.getFrame(), null);
return new NormalizedGeodeticPoint(gp.getLatitude(), gp.getLongitude(), gp.getAltitude(),
closeGuess.getLongitude());
} catch (OrekitException oe) {
throw new RuggedException(oe, oe.getSpecifier(), oe.getParts());
}
final NormalizedGeodeticPoint closeGuess) {
DumpManager.dumpAlgorithm(AlgorithmId.CONSTANT_ELEVATION_OVER_ELLIPSOID, constantElevation);
final Vector3D p = ellipsoid.pointAtAltitude(position, los, constantElevation);
final GeodeticPoint gp = ellipsoid.transform(p, ellipsoid.getFrame(), null);
return new NormalizedGeodeticPoint(gp.getLatitude(), gp.getLongitude(), gp.getAltitude(),
closeGuess.getLongitude());
}
/** {@inheritDoc}
......
/* Copyright 2013-2017 CS Systèmes d'Information
/* Copyright 2013-2019 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.
......@@ -19,7 +19,6 @@ package org.orekit.rugged.intersection;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.orekit.rugged.api.AlgorithmId;
import org.orekit.rugged.errors.DumpManager;
import org.orekit.rugged.errors.RuggedException;
import org.orekit.rugged.utils.ExtendedEllipsoid;
import org.orekit.rugged.utils.NormalizedGeodeticPoint;
......@@ -39,8 +38,7 @@ public class IgnoreDEMAlgorithm implements IntersectionAlgorithm {
/** {@inheritDoc} */
@Override
public NormalizedGeodeticPoint intersection(final ExtendedEllipsoid ellipsoid,
final Vector3D position, final Vector3D los)
throws RuggedException {
final Vector3D position, final Vector3D los) {
DumpManager.dumpAlgorithm(AlgorithmId.IGNORE_DEM_USE_ELLIPSOID);
return ellipsoid.pointOnGround(position, los, 0.0);
}
......@@ -49,8 +47,7 @@ public class IgnoreDEMAlgorithm implements IntersectionAlgorithm {
@Override
public NormalizedGeodeticPoint refineIntersection(final ExtendedEllipsoid ellipsoid,
final Vector3D position, final Vector3D los,
final NormalizedGeodeticPoint closeGuess)
throws RuggedException {
final NormalizedGeodeticPoint closeGuess) {
DumpManager.dumpAlgorithm(AlgorithmId.IGNORE_DEM_USE_ELLIPSOID);
return intersection(ellipsoid, position, los);
}
......
/* Copyright 2013-2017 CS Systèmes d'Information
/* Copyright 2013-2019 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.
......@@ -17,7 +17,7 @@
package org.orekit.rugged.intersection;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.orekit.rugged.errors.RuggedException;
import org.orekit.bodies.GeodeticPoint;
import org.orekit.rugged.utils.ExtendedEllipsoid;
import org.orekit.rugged.utils.NormalizedGeodeticPoint;
......@@ -31,10 +31,8 @@ public interface IntersectionAlgorithm {
* @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
*/
NormalizedGeodeticPoint intersection(ExtendedEllipsoid ellipsoid, Vector3D position, Vector3D los)
throws RuggedException;
NormalizedGeodeticPoint intersection(ExtendedEllipsoid ellipsoid, Vector3D position, Vector3D los);
/** Refine intersection of line with Digital Elevation Model.
* <p>
......@@ -49,19 +47,15 @@ public interface IntersectionAlgorithm {
* @param los pixel line-of-sight in ellipsoid frame
* @param closeGuess guess close to the real intersection
* @return point at which the line first enters ground
* @exception RuggedException if intersection cannot be found
*/
NormalizedGeodeticPoint refineIntersection(ExtendedEllipsoid ellipsoid, Vector3D position, Vector3D los,
NormalizedGeodeticPoint closeGuess)
throws RuggedException;
NormalizedGeodeticPoint closeGuess);
/** Get elevation at a given ground point.
* @param latitude ground point latitude
* @param longitude ground point longitude
* @return elevation at specified point
* @exception RuggedException if Digital Elevation Model does not cover point
*/
double getElevation(double latitude, double longitude)
throws RuggedException;
double getElevation(double latitude, double longitude);
}
/* Copyright 2013-2017 CS Systèmes d'Information
/* Copyright 2013-2019 CS Systè