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

Updated documentation according to latest forge Wiki updates

parent 8874a895
No related branches found
No related tags found
No related merge requests found
...@@ -15,10 +15,12 @@ ...@@ -15,10 +15,12 @@
Overview Overview
======== ========
Rugged is an add-on for Orekit handling Digital Elevation Models Rugged is an add-on for Orekit handling Digital Elevation Models (DEM)
contribution to line of sight computation. It is a free software contribution to line of sight computation. It is a free software
intermediate-level library written in Java. intermediate-level library written in Java.
![Earth_FlatVsRugged.gif](./images/Earth_FlatVsRugged.gif)
It mainly provides direct and inverse location, i.e. it allows It mainly provides direct and inverse location, i.e. it allows
to compute accurately which ground point is looked at from a specific to compute accurately which ground point is looked at from a specific
pixel in a spacecraft instrument, and conversely which pixel will pixel in a spacecraft instrument, and conversely which pixel will
...@@ -28,6 +30,9 @@ Overview ...@@ -28,6 +30,9 @@ Overview
on-board sensor pixels individual line-of-sights, spacecraft motion and on-board sensor pixels individual line-of-sights, spacecraft motion and
attitude and several physical effects. attitude and several physical effects.
![RuggedExplained.png](./images/RuggedExplained.png)
*Effects of taking into account the DEM in the computation of latitude, longitude and altitude*
Direct and inverse location can be used to perform full ortho-rectification Direct and inverse location can be used to perform full ortho-rectification
of images and correlation between sensors observing the same area. of images and correlation between sensors observing the same area.
......
...@@ -16,6 +16,9 @@ ...@@ -16,6 +16,9 @@
The aim of this tutorial is to compute a direct location grid by intersection of the line of sight with a DEM (Digital Elevation Model), using Duvenhage's algorithm. This algorithm is the most performant one in Rugged. The aim of this tutorial is to compute a direct location grid by intersection of the line of sight with a DEM (Digital Elevation Model), using Duvenhage's algorithm. This algorithm is the most performant one in Rugged.
The following figure shows the effects of taking into account the DEM in the computation of latitude, longitude and altitude:
![RuggedExplained.png](../images/RuggedExplained.png)
## Feeding Rugged with DEM tiles ## Feeding Rugged with DEM tiles
...@@ -88,15 +91,16 @@ Here's the source code of the class `VolcanicConeElevationUpdater` : ...@@ -88,15 +91,16 @@ Here's the source code of the class `VolcanicConeElevationUpdater` :
* In Rugged terminology, the minimum latitude and longitude correspond to the centre of the farthest Southwest cell of the DEM. Be careful if using GDAL to pass the correct information as there is half a pixel shift with respect to the lower left corner coordinates in gdalinfo. * In Rugged terminology, the minimum latitude and longitude correspond to the centre of the farthest Southwest cell of the DEM. Be careful if using GDAL to pass the correct information as there is half a pixel shift with respect to the lower left corner coordinates in gdalinfo.
The following diagram illustrates proper DEM tiling with one line/column overlaps between neighbouring tiles : The following diagram illustrates proper DEM tiling with one line/column overlaps between neighbouring tiles :
![DEM tiles overlap](../images/DEM-tiles-overlap.png)
![DEM-tiles-overlap.png](../images/DEM-tiles-overlap.png)
This diagram tries to represent the meaning of the different parameters in the definition of a tile : This diagram tries to represent the meaning of the different parameters in the definition of a tile :
![tile description](../images/tile-description.png) ![tile-description.png](../images/tile-description.png)
## Initializing Rugged with a DEM ## Initializing Rugged with a DEM
The initialization step differs slightly from the first tutorial [[DirectLocation|Direct location]], as we need to pass the information about our TileUpdater. The initialization step differs slightly from the first tutorial [Direct location](direct-location.html), as we need to pass the information about our TileUpdater.
Instantiate an object derived from TileUpdater : Instantiate an object derived from TileUpdater :
...@@ -116,7 +120,7 @@ Initialize Rugged with these parameters : ...@@ -116,7 +120,7 @@ Initialize Rugged with these parameters :
## Computing a direct location grid ## Computing a direct location grid
In a similar way as in the first tutorial [direct location](./direct-location.html), we call Rugged direct location method. This time it is called in a loop so as to generate a full grid on disk. In a similar way as in the first tutorial [[DirectLocation|Direct location]], we call Rugged direct location method. This time it is called in a loop so as to generate a full grid on disk.
DataOutputStream dos = new DataOutputStream(new FileOutputStream("demDirectLoc.c1")); DataOutputStream dos = new DataOutputStream(new FileOutputStream("demDirectLoc.c1"));
int lineStep = (maxLine - minLine) / nbLineStep; int lineStep = (maxLine - minLine) / nbLineStep;
......
...@@ -21,7 +21,7 @@ list of positions, velocities and attitude quaternions recorded during the acqui ...@@ -21,7 +21,7 @@ list of positions, velocities and attitude quaternions recorded during the acqui
passing all this information to Rugged, we will be able to precisely locate each point of passing all this information to Rugged, we will be able to precisely locate each point of
the image on the Earth. Well, not exactly precise, as this first tutorial does not use a the image on the Earth. Well, not exactly precise, as this first tutorial does not use a
Digital Elevation Model, but considers the Earth as an ellipsoid. The DEM will be added in Digital Elevation Model, but considers the Earth as an ellipsoid. The DEM will be added in
a second tutorial [Direct location with DEM](./direct-location-with-DEM.html). The objective here is limited to explain how to initialize everything a second tutorial [Direct location with DEM](direct-location-with-DEM.html). The objective here is limited to explain how to initialize everything
Rugged needs to know about the sensor and the acquisition. Rugged needs to know about the sensor and the acquisition.
...@@ -215,6 +215,20 @@ On the fourth line, the arguments are the list of time-stamped positions and vel ...@@ -215,6 +215,20 @@ On the fourth line, the arguments are the list of time-stamped positions and vel
for interpolation: number of points to use and type of filter for derivatives. The interpolation polynomials for nbPVPoints without any derivatives (case of CartesianDerivativesFilter.USE_P: only positions are used, without velocities) have a degree nbPVPoints - 1. In case of computation with velocities included (case of CartesianDerivativesFilter.USE_PV), the interpolation polynomials have a degree 2*nbPVPoints - 1. If the positions/velocities data are of good quality and spaced by a few seconds, one may choose only a few points but interpolate with both positions and velocities; in other cases, one may choose more points but interpolate only with positions. for interpolation: number of points to use and type of filter for derivatives. The interpolation polynomials for nbPVPoints without any derivatives (case of CartesianDerivativesFilter.USE_P: only positions are used, without velocities) have a degree nbPVPoints - 1. In case of computation with velocities included (case of CartesianDerivativesFilter.USE_PV), the interpolation polynomials have a degree 2*nbPVPoints - 1. If the positions/velocities data are of good quality and spaced by a few seconds, one may choose only a few points but interpolate with both positions and velocities; in other cases, one may choose more points but interpolate only with positions.
We find the same arguments on the last line for the attitude quaternions. We find the same arguments on the last line for the attitude quaternions.
Rugged takes into account by default some corrections for more accurate locations:
* light time correction (compensates or not light time between ground and spacecraft).
* aberration of light correction (compensates or not aberration of light, which is velocity composition between light and spacecraft when the light from ground points reaches the sensor).
Not compensating the delay or the velocity composition are mainly useful for validation purposes against system that do not compensate it. When the pixels line of sight already includes the aberration of light correction, one must obviously deactivate the correction.
In order not to take into account those corrections, one must finalize Rugged initialization by setting the related flags to false:
rugged.setLightTimeCorrection(false);
or
rugged.setAberrationOfLightCorrection(false);
The sensor models are added after initialization. We can add as many as we want. The sensor models are added after initialization. We can add as many as we want.
...@@ -223,12 +237,11 @@ The sensor models are added after initialization. We can add as many as we want. ...@@ -223,12 +237,11 @@ The sensor models are added after initialization. We can add as many as we want.
## Direct location ## Direct location
Finally everything is set to do some real work. Let's try to locate a point on Earth Finally everything is set to do some real work. Let's try to locate a point on Earth
for upper left point (first line, first pixel):
Upper left point (first line, first pixel):
import org.orekit.bodies.GeodeticPoint; import org.orekit.bodies.GeodeticPoint;
Vector3D position = lineSensor.getPosition(); // This returns a zero vector since we set the relative position of the sensor w.r.T the satellite to 0. Vector3D position = lineSensor.getPosition(); // This returns a zero vector since we set the relative position of the sensor w.r.T the satellite to 0.
AbsoluteDate firstLineDate = lineSensor.getDate(1); AbsoluteDate firstLineDate = lineSensor.getDate(0);
Vector3D los = lineSensor.getLos(firstLineDate, 0); Vector3D los = lineSensor.getLos(firstLineDate, 0);
GeodeticPoint upLeftPoint = rugged.directLocation(firstLineDate, position, los); GeodeticPoint upLeftPoint = rugged.directLocation(firstLineDate, position, los);
......
<!--- Copyright 2013-2014 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.
-->
# Inverse Location
The aim of this tutorial is to compute the inverse location of a point on Earth in order to give the sensor pixel, with the associated line, seeing this point.
We will also explain how to find the date at which sensor sees a ground point, which is a kind of inverse location only focusing on date.
## Inverse location of a point on Earth
The initialisation of Rugged is similar as in the [Direct location](direct-location.html) tutorial up to the addition of the lines sensor.
### Point defined by its latitude, longitude and altitude
Once Rugged initialised, one can compute the line number and the pixel number of a point defined by its Geodetic coordinates:
import org.orekit.bodies.GeodeticPoint;
import org.orekit.rugged.api.SensorPixel;
GeodeticPoint gp = new GeodeticPoint(latitude, longitude, altitude);
SensorPixel sensorPixel = rugged.inverseLocation(sensorName, gp, minLine, maxLine);
where minLine (maxLine, respectively) is the minimum line number for the search interval (maximum line number, respectively).
The inverse location will give the sensor pixel number and the associated line number seeing the point. In case the point cannot be seen between the prescribed line numbers, the return result is null. No exception will be thrown in this particular case.
### Point defined by its latitude and longitude (no altitude)
Similarly, one can compute the line number and the pixel number of a point defined solely by its latitude en longitude. The altitude will be determined automatically with the DEM.
SensorPixel sensorPixel = rugged.inverseLocation(sensorName, latitude, longitude, minLine, maxLine);
## Date location
Once Rugged initialised, one can compute the date at which sensor sees a point on Earth.
### Point defined by its latitude, longitude and altitude
For a point defined by its Geodetic coordinates:
AbsoluteDate dateLine = rugged.dateLocation(sensorName, gp, minLine, maxLine);
### Point defined by its latitude and longitude (no altitude)
Similarly, for a point defined solely by its latitude en longitude (altitude determined automatically with the DEM):
AbsoluteDate dateLine = rugged.dateLocation(sensorName, latitude, longitude, minLine, maxLine);
## Source code
The source code is available in InverseLocTutorial.java
<!--- Copyright 2013-2014 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.
-->
src/site/resources/images/Earth_FlatVsRugged.gif

86.8 KiB

src/site/resources/images/RuggedExplained.png

15.2 KiB

...@@ -45,6 +45,8 @@ ...@@ -45,6 +45,8 @@
<menu name="Tutorials"> <menu name="Tutorials">
<item name="Direct location" href="/tutorials/direct-location.html" /> <item name="Direct location" href="/tutorials/direct-location.html" />
<item name="Direct location with DEM" href="/tutorials/direct-location-with-DEM.html" /> <item name="Direct location with DEM" href="/tutorials/direct-location-with-DEM.html" />
<item name="Inverse location" href="/tutorials/inverse-location.html" />
<item name="Tile Updater" href="/tutorials/tile-updater.html" />
</menu> </menu>
<menu name="Development"> <menu name="Development">
<item name="Contributing" href="/contributing.html" /> <item name="Contributing" href="/contributing.html" />
......
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