Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Orekit
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
Gaëtan Pierre
Orekit
Commits
0c26b08c
Commit
0c26b08c
authored
5 years ago
by
Gabriele Serafini
Browse files
Options
Downloads
Patches
Plain Diff
Update IodLambert.java
fixed lines 148-175
parent
bc724eb6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/orekit/estimation/iod/IodLambert.java
+11
-15
11 additions, 15 deletions
src/main/java/org/orekit/estimation/iod/IodLambert.java
with
11 additions
and
15 deletions
src/main/java/org/orekit/estimation/iod/IodLambert.java
+
11
−
15
View file @
0c26b08c
...
...
@@ -51,7 +51,7 @@ public class IodLambert {
* <p>
* The logic for setting {@code posigrade} and {@code nRev} is that the
* sweep angle Δυ travelled by the object between {@code t1} and {@code t2} is
* 2π {@code nRev} - α if {@code posigrade} is false and 2π {@code nRev} + α
* 2π {@code nRev
+1
} - α if {@code posigrade} is false and 2π {@code nRev} + α
* if {@code posigrade} is true, where α is the separation angle between
* {@code p1} and {@code p2}, which is always computed between 0 and π
* (because in 3D without a normal reference, vector angles cannot go past π).
...
...
@@ -68,7 +68,7 @@ public class IodLambert {
* then {@code posigrade} should be {@code true} and {@code nRev} should be 0.
* If {@code t2} is more than half a period after {@code t1} but less than
* one period after {@code t1}, {@code posigrade} should be {@code false} and
* {@code nRev} should be
1
.
* {@code nRev} should be
0
.
* </p>
* @param frame frame
* @param posigrade flag indicating the direction of motion
...
...
@@ -99,8 +99,7 @@ public class IodLambert {
if
(!
posigrade
)
{
dth
=
2
*
FastMath
.
PI
-
dth
;
}
dth
=
dth
+
nRev
*
2
*
FastMath
.
PI
;
// velocity vectors in the orbital plane, in the R-T frame
final
double
[]
Vdep
=
new
double
[
2
];
...
...
@@ -123,7 +122,7 @@ public class IodLambert {
// velocity vector at P1
final
Vector3D
Vel1
=
new
Vector3D
(
V
*
Vdep
[
0
]
/
r1
,
p1
,
V
*
Vdep
[
1
]
/
RT
,
Pt
);
// compute the equivalent Keplerian orbit
return
new
KeplerianOrbit
(
new
PVCoordinates
(
p1
,
Vel1
),
frame
,
t1
,
mu
);
}
...
...
@@ -146,19 +145,16 @@ public class IodLambert {
final
int
mRev
,
final
double
[]
V1
)
{
// decide whether to use the left or right branch (for multi-revolution
// problems), and the long- or short way.
final
boolean
leftbranch
=
FastMath
.
signum
(
mRev
)
>
0
;
int
longway
=
0
;
if
(
tau
>
0
)
{
longway
=
1
;
final
boolean
leftbranch
=
dth
<
Math
.
PI
;
int
longway
=
1
;
if
(
dth
>
Math
.
PI
)
{
longway
=
-
1
;
}
final
int
m
=
FastMath
.
abs
(
mRev
);
final
double
rtof
=
FastMath
.
abs
(
tau
);
double
theta
=
dth
;
if
(
longway
<
0
)
{
theta
=
2
*
FastMath
.
PI
-
dth
;
}
// non-dimensional chord ||r2-r1||
final
double
chord
=
FastMath
.
sqrt
(
r1
*
r1
+
r2
*
r2
-
2
*
r1
*
r2
*
FastMath
.
cos
(
theta
));
...
...
@@ -169,8 +165,8 @@ public class IodLambert {
final
double
minSma
=
speri
/
2
.;
// lambda parameter (Eq 7.6)
final
double
lambda
=
FastMath
.
sqrt
(
1
-
chord
/
speri
);
final
double
lambda
=
longway
*
FastMath
.
sqrt
(
1
-
chord
/
speri
);
// reference tof value for the Newton solver
final
double
logt
=
FastMath
.
log
(
rtof
);
...
...
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