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
987bf269
Commit
987bf269
authored
10 years ago
by
Luc Maisonobe
Browse files
Options
Downloads
Patches
Plain Diff
Simplified direct localization.
parent
8afa83be
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
+12
-28
12 additions, 28 deletions
src/main/java/org/orekit/rugged/api/Rugged.java
src/main/java/org/orekit/rugged/core/FixedAltitudeAlgorithm.java
+0
-63
0 additions, 63 deletions
...n/java/org/orekit/rugged/core/FixedAltitudeAlgorithm.java
with
12 additions
and
91 deletions
src/main/java/org/orekit/rugged/api/Rugged.java
+
12
−
28
View file @
987bf269
...
...
@@ -476,26 +476,10 @@ public class Rugged {
*/
public
GeodeticPoint
[]
directLocalization
(
final
String
sensorName
,
final
double
lineNumber
)
throws
RuggedException
{
final
LineSensor
sensor
=
getLineSensor
(
sensorName
);
return
directLocalization
(
sensor
,
0
,
sensor
.
getNbPixels
(),
algorithm
,
lineNumber
);
}
/** Direct localization of a sensor line.
* @param sensor line sensor
* @param start start pixel to consider in the line sensor
* @param end end pixel to consider in the line sensor (excluded)
* @param alg intersection algorithm to use
* @param lineNumber number of the line to localize on ground
* @return ground position of all pixels of the specified sensor line
* @exception RuggedException if line cannot be localized, or sensor is unknown
*/
private
GeodeticPoint
[]
directLocalization
(
final
LineSensor
sensor
,
final
int
start
,
final
int
end
,
final
IntersectionAlgorithm
alg
,
final
double
lineNumber
)
throws
RuggedException
{
try
{
// compute the approximate transform between spacecraft and observed body
final
LineSensor
sensor
=
getLineSensor
(
sensorName
);
final
AbsoluteDate
date
=
sensor
.
getDate
(
lineNumber
);
final
Transform
scToInert
=
scToBody
.
getScToInertial
(
date
);
final
Transform
inertToBody
=
scToBody
.
getInertialToBody
(
date
);
...
...
@@ -506,8 +490,8 @@ public class Rugged {
// compute localization of each pixel
final
Vector3D
pInert
=
scToInert
.
transformPosition
(
sensor
.
getPosition
());
final
GeodeticPoint
[]
gp
=
new
GeodeticPoint
[
en
d
-
start
];
for
(
int
i
=
start
;
i
<
en
d
;
++
i
)
{
final
GeodeticPoint
[]
gp
=
new
GeodeticPoint
[
s
en
sor
.
getNbPixels
()
];
for
(
int
i
=
0
;
i
<
s
en
sor
.
getNbPixels
()
;
++
i
)
{
final
Vector3D
obsLInert
=
scToInert
.
transformVector
(
sensor
.
getLos
(
i
));
final
Vector3D
lInert
;
...
...
@@ -536,24 +520,24 @@ public class Rugged {
final
Vector3D
eP1
=
ellipsoid
.
transform
(
ellipsoid
.
pointOnGround
(
sP
,
sL
));
final
double
deltaT1
=
eP1
.
distance
(
sP
)
/
Constants
.
SPEED_OF_LIGHT
;
final
Transform
shifted1
=
inertToBody
.
shiftedBy
(-
deltaT1
);
final
GeodeticPoint
gp1
=
alg
.
intersection
(
ellipsoid
,
shifted1
.
transformPosition
(
pInert
),
shifted1
.
transformVector
(
lInert
));
final
GeodeticPoint
gp1
=
alg
orithm
.
intersection
(
ellipsoid
,
shifted1
.
transformPosition
(
pInert
),
shifted1
.
transformVector
(
lInert
));
final
Vector3D
eP2
=
ellipsoid
.
transform
(
gp1
);
final
double
deltaT2
=
eP2
.
distance
(
sP
)
/
Constants
.
SPEED_OF_LIGHT
;
final
Transform
shifted2
=
inertToBody
.
shiftedBy
(-
deltaT2
);
gp
[
i
-
start
]
=
alg
.
refineIntersection
(
ellipsoid
,
shifted2
.
transformPosition
(
pInert
),
shifted2
.
transformVector
(
lInert
),
gp1
);
gp
[
i
]
=
alg
orithm
.
refineIntersection
(
ellipsoid
,
shifted2
.
transformPosition
(
pInert
),
shifted2
.
transformVector
(
lInert
),
gp1
);
}
else
{
// compute DEM intersection without light time correction
final
Vector3D
pBody
=
inertToBody
.
transformPosition
(
pInert
);
final
Vector3D
lBody
=
inertToBody
.
transformVector
(
lInert
);
gp
[
i
-
start
]
=
alg
.
refineIntersection
(
ellipsoid
,
pBody
,
lBody
,
alg
.
intersection
(
ellipsoid
,
pBody
,
lBody
));
gp
[
i
]
=
alg
orithm
.
refineIntersection
(
ellipsoid
,
pBody
,
lBody
,
alg
orithm
.
intersection
(
ellipsoid
,
pBody
,
lBody
));
}
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/org/orekit/rugged/core/FixedAltitudeAlgorithm.java
deleted
100644 → 0
+
0
−
63
View file @
8afa83be
/* 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.core.raster.IntersectionAlgorithm
;
/** Intersection using a fixed altitude.
* @author Luc Maisonobe
*/
public
class
FixedAltitudeAlgorithm
implements
IntersectionAlgorithm
{
/** Fixed altitude to use. */
private
final
double
altitude
;
/** Simple constructor.
* @param altitude fixed altitude to use
*/
public
FixedAltitudeAlgorithm
(
final
double
altitude
)
{
this
.
altitude
=
altitude
;
}
/** {@inheritDoc} */
@Override
public
GeodeticPoint
intersection
(
final
ExtendedEllipsoid
ellipsoid
,
final
Vector3D
position
,
final
Vector3D
los
)
throws
RuggedException
{
try
{
return
ellipsoid
.
transform
(
ellipsoid
.
pointAtAltitude
(
position
,
los
,
altitude
),
ellipsoid
.
getBodyFrame
(),
null
);
}
catch
(
OrekitException
oe
)
{
// this should never happen
throw
new
RuggedException
(
oe
,
oe
.
getSpecifier
(),
oe
.
getParts
());
}
}
/** {@inheritDoc} */
@Override
public
GeodeticPoint
refineIntersection
(
final
ExtendedEllipsoid
ellipsoid
,
final
Vector3D
position
,
final
Vector3D
los
,
final
GeodeticPoint
closeGuess
)
throws
RuggedException
{
return
intersection
(
ellipsoid
,
position
,
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