Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Rugged
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Orekit
Rugged
Commits
996bd517
Commit
996bd517
authored
6 years ago
by
Guylaine Prat
Browse files
Options
Downloads
Patches
Plain Diff
Remove direct loc optimization (which was a WIP)
parent
e47d6bd0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/org/orekit/rugged/api/Rugged.java
+10
-57
10 additions, 57 deletions
src/main/java/org/orekit/rugged/api/Rugged.java
src/main/java/org/orekit/rugged/los/PixelLOS.java
+0
-62
0 additions, 62 deletions
src/main/java/org/orekit/rugged/los/PixelLOS.java
with
10 additions
and
119 deletions
src/main/java/org/orekit/rugged/api/Rugged.java
+
10
−
57
View file @
996bd517
...
@@ -34,7 +34,6 @@ import org.orekit.rugged.linesensor.LineSensor;
...
@@ -34,7 +34,6 @@ import org.orekit.rugged.linesensor.LineSensor;
import
org.orekit.rugged.linesensor.SensorMeanPlaneCrossing
;
import
org.orekit.rugged.linesensor.SensorMeanPlaneCrossing
;
import
org.orekit.rugged.linesensor.SensorPixel
;
import
org.orekit.rugged.linesensor.SensorPixel
;
import
org.orekit.rugged.linesensor.SensorPixelCrossing
;
import
org.orekit.rugged.linesensor.SensorPixelCrossing
;
import
org.orekit.rugged.los.PixelLOS
;
import
org.orekit.rugged.refraction.AtmosphericRefraction
;
import
org.orekit.rugged.refraction.AtmosphericRefraction
;
import
org.orekit.rugged.utils.DSGenerator
;
import
org.orekit.rugged.utils.DSGenerator
;
import
org.orekit.rugged.utils.ExtendedEllipsoid
;
import
org.orekit.rugged.utils.ExtendedEllipsoid
;
...
@@ -287,25 +286,16 @@ public class Rugged {
...
@@ -287,25 +286,16 @@ public class Rugged {
final
Vector3D
pBody
=
inertToBody
.
transformPosition
(
pInert
);
final
Vector3D
pBody
=
inertToBody
.
transformPosition
(
pInert
);
final
Vector3D
lBody
=
inertToBody
.
transformVector
(
lInert
);
final
Vector3D
lBody
=
inertToBody
.
transformVector
(
lInert
);
gp
[
i
]
=
algorithm
.
refineIntersection
(
ellipsoid
,
pBody
,
lBody
,
gp
[
i
]
=
algorithm
.
refineIntersection
(
ellipsoid
,
pBody
,
lBody
,
algorithm
.
intersection
(
ellipsoid
,
pBody
,
lBody
));
algorithm
.
intersection
(
ellipsoid
,
pBody
,
lBody
));
}
}
// compute with atmospheric refraction correction if necessary
// compute with atmospheric refraction correction if necessary
if
(
atmosphericRefraction
!=
null
&&
atmosphericRefraction
.
mustBeComputed
())
{
if
(
atmosphericRefraction
!=
null
&&
atmosphericRefraction
.
mustBeComputed
())
{
// Test if optimization is not required
// apply atmospheric refraction correction
if
(!
atmosphericRefraction
.
isOptimized
())
{
final
Vector3D
pBody
=
inertToBody
.
transformPosition
(
pInert
);
final
Vector3D
lBody
=
inertToBody
.
transformVector
(
lInert
);
// apply atmospheric refraction correction
gp
[
i
]
=
atmosphericRefraction
.
applyCorrection
(
pBody
,
lBody
,
(
NormalizedGeodeticPoint
)
gp
[
i
],
algorithm
);
final
Vector3D
pBody
=
inertToBody
.
transformPosition
(
pInert
);
final
Vector3D
lBody
=
inertToBody
.
transformVector
(
lInert
);
gp
[
i
]
=
atmosphericRefraction
.
applyCorrection
(
pBody
,
lBody
,
(
NormalizedGeodeticPoint
)
gp
[
i
],
algorithm
);
}
else
{
// Optimization is required
// TODO algo with optimization
throw
new
RuggedException
(
RuggedMessages
.
UNINITIALIZED_CONTEXT
,
"atmospheric optimization not defined"
);
}
}
}
DumpManager
.
dumpDirectLocationResult
(
gp
[
i
]);
DumpManager
.
dumpDirectLocationResult
(
gp
[
i
]);
}
}
...
@@ -313,9 +303,6 @@ public class Rugged {
...
@@ -313,9 +303,6 @@ public class Rugged {
}
}
/** Direct location of a single line-of-sight.
/** Direct location of a single line-of-sight.
* <p>
* NB: if (the optionnal) atmospheric refraction must be computed with the optimization algorithm,
* see {@link #directLocation(AbsoluteDate, Vector3D, PixelLOS)}.
* @param date date of the location
* @param date date of the location
* @param sensorPosition sensor position in spacecraft frame. For simplicity, due to the size of sensor,
* @param sensorPosition sensor position in spacecraft frame. For simplicity, due to the size of sensor,
* we consider each pixel to be at sensor position
* we consider each pixel to be at sensor position
...
@@ -324,28 +311,6 @@ public class Rugged {
...
@@ -324,28 +311,6 @@ public class Rugged {
*/
*/
public
GeodeticPoint
directLocation
(
final
AbsoluteDate
date
,
final
Vector3D
sensorPosition
,
final
Vector3D
los
)
{
public
GeodeticPoint
directLocation
(
final
AbsoluteDate
date
,
final
Vector3D
sensorPosition
,
final
Vector3D
los
)
{
// Set the pixel to null in order not to compute atmosphere with optimization
final
PixelLOS
pixelLOS
=
new
PixelLOS
(
null
,
los
);
return
directLocation
(
date
,
sensorPosition
,
pixelLOS
);
}
/** Direct location of a single line-of-sight.
* <p>
* NB: if the atmospheric refraction must be computed without the optimization algorithm,
* see {@link #directLocation(AbsoluteDate, Vector3D, Vector3D)}.
* @param date date of the location
* @param sensorPosition sensor position in spacecraft frame. For simplicity, due to the size of sensor,
* we consider each pixel to be at sensor position
* @param pixelLOS pixel definition with normalized line-of-sight in spacecraft frame
* @return ground position of intersection point between specified los and ground
* @since 2.1
*/
public
GeodeticPoint
directLocation
(
final
AbsoluteDate
date
,
final
Vector3D
sensorPosition
,
final
PixelLOS
pixelLOS
)
{
final
Vector3D
los
=
pixelLOS
.
getLOS
();
// TODO change dump to add sensorPixel
DumpManager
.
dumpDirectLocation
(
date
,
sensorPosition
,
los
,
lightTimeCorrection
,
aberrationOfLightCorrection
,
DumpManager
.
dumpDirectLocation
(
date
,
sensorPosition
,
los
,
lightTimeCorrection
,
aberrationOfLightCorrection
,
atmosphericRefraction
!=
null
);
atmosphericRefraction
!=
null
);
...
@@ -386,31 +351,19 @@ public class Rugged {
...
@@ -386,31 +351,19 @@ public class Rugged {
final
Vector3D
pBody
=
inertToBody
.
transformPosition
(
pInert
);
final
Vector3D
pBody
=
inertToBody
.
transformPosition
(
pInert
);
final
Vector3D
lBody
=
inertToBody
.
transformVector
(
lInert
);
final
Vector3D
lBody
=
inertToBody
.
transformVector
(
lInert
);
gp
=
algorithm
.
refineIntersection
(
ellipsoid
,
pBody
,
lBody
,
gp
=
algorithm
.
refineIntersection
(
ellipsoid
,
pBody
,
lBody
,
algorithm
.
intersection
(
ellipsoid
,
pBody
,
lBody
));
algorithm
.
intersection
(
ellipsoid
,
pBody
,
lBody
));
}
}
NormalizedGeodeticPoint
result
=
gp
;
NormalizedGeodeticPoint
result
=
gp
;
// compute the ground location with atmospheric correction if asked for
// compute the ground location with atmospheric correction if asked for
if
(
atmosphericRefraction
!=
null
&&
atmosphericRefraction
.
mustBeComputed
())
{
if
(
atmosphericRefraction
!=
null
&&
atmosphericRefraction
.
mustBeComputed
())
{
// TBN: two methods exist for computation of the atmospheric correction
// * a full computation
// * a time optimized computation based on an interpolation grid
// Test if optimization is not required or if sensor pixel is not defined (impossible to perform optimization)
if
(!
atmosphericRefraction
.
isOptimized
()
||
pixelLOS
.
getSensorPixel
()
==
null
)
{
// apply atmospheric refraction correction (full computation)
// apply atmospheric refraction correction
final
Vector3D
pBody
=
inertToBody
.
transformPosition
(
pInert
);
final
Vector3D
pBody
=
inertToBody
.
transformPosition
(
pInert
);
final
Vector3D
lBody
=
inertToBody
.
transformVector
(
lInert
);
final
Vector3D
lBody
=
inertToBody
.
transformVector
(
lInert
);
result
=
atmosphericRefraction
.
applyCorrection
(
pBody
,
lBody
,
gp
,
algorithm
);
result
=
atmosphericRefraction
.
applyCorrection
(
pBody
,
lBody
,
gp
,
algorithm
);
}
else
{
// Optimization is required and sensor pixel is defined
// TODO to be done
throw
new
RuggedException
(
RuggedMessages
.
UNINITIALIZED_CONTEXT
,
"Atmospheric optimization for direct loc"
);
}
// end test on optimization is required
}
// end test on atmosphericRefraction != null
}
// end test on atmosphericRefraction != null
DumpManager
.
dumpDirectLocationResult
(
result
);
DumpManager
.
dumpDirectLocationResult
(
result
);
...
...
This diff is collapsed.
Click to expand it.
src/main/java/org/orekit/rugged/los/PixelLOS.java
deleted
100644 → 0
+
0
−
62
View file @
e47d6bd0
/* Copyright 2013-2018 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.los
;
import
java.io.Serializable
;
import
org.hipparchus.geometry.euclidean.threed.Vector3D
;
import
org.orekit.rugged.linesensor.SensorPixel
;
/** Container for pixel line-of-sight.
* @author Guylaine Prat
* @since 2.1
*/
public
class
PixelLOS
implements
Serializable
{
/** Serializable UID. */
private
static
final
long
serialVersionUID
=
-
6674056279573271367L
;
/** Sensor pixel. */
private
final
SensorPixel
sensorPixel
;
/** Pixel line-of-sight in spacecraft frame. */
private
final
Vector3D
los
;
/**
* Build a new instance.
* @param sensorPixel the sensor pixel cell
* @param los the pixel line-of-sight in spacecraft frame
*/
public
PixelLOS
(
final
SensorPixel
sensorPixel
,
final
Vector3D
los
)
{
this
.
sensorPixel
=
sensorPixel
;
this
.
los
=
los
;
}
/**
* @return the sensorPixel
*/
public
SensorPixel
getSensorPixel
()
{
return
sensorPixel
;
}
/**
* @return the lOS in spacecraft frame
*/
public
Vector3D
getLOS
()
{
return
los
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment