Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Orekit
Orekit
Commits
7462f948
Commit
7462f948
authored
Apr 12, 2022
by
Maxime Journot
Browse files
Fixed wrong implementation of NTW LOF frame.
Fixes
#909
parent
dedd2321
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/changes/changes.xml
View file @
7462f948
...
...
@@ -21,6 +21,9 @@
</properties>
<body>
<release
version=
"11.2"
date=
"TBD"
description=
"TBD"
>
<action
dev=
"maxime"
type=
"fix"
issue=
"909"
>
Fixed wrong implementation of NTW LOF frame.
</action>
<action
dev=
"bryan"
type=
"fix"
issue=
"910"
>
Fixed eD and eY equation in ECOM2 model.
</action>
...
...
src/main/java/org/orekit/frames/LOFType.java
View file @
7462f948
...
...
@@ -285,19 +285,16 @@ public enum LOFType {
/** {@inheritDoc} */
public
Rotation
rotationFromInertial
(
final
PVCoordinates
pv
)
{
final
Vector3D
m
=
pv
.
getMomentum
();
return
new
Rotation
(
new
Vector3D
(-
m
.
getY
(),
m
.
getX
(),
0
),
m
,
Vector3D
.
PLUS_I
,
Vector3D
.
PLUS_J
);
return
new
Rotation
(
pv
.
getVelocity
(),
pv
.
getMomentum
(),
Vector3D
.
PLUS_J
,
Vector3D
.
PLUS_K
);
}
@Override
public
<
T
extends
CalculusFieldElement
<
T
>>
FieldRotation
<
T
>
rotationFromInertial
(
final
Field
<
T
>
field
,
final
FieldPVCoordinates
<
T
>
pv
)
{
final
FieldVector3D
<
T
>
m
=
pv
.
getMomentum
();
return
new
FieldRotation
<>(
new
FieldVector3D
<>(
m
.
getY
().
negate
(),
m
.
getX
(),
field
.
getZero
()),
m
,
new
FieldVector3D
<>(
field
,
Vector3D
.
PLUS_I
),
new
FieldVector3D
<>(
field
,
Vector3D
.
PLUS_J
));
return
new
FieldRotation
<>(
pv
.
getVelocity
(),
pv
.
getMomentum
(),
new
FieldVector3D
<>(
field
,
Vector3D
.
PLUS_J
),
new
FieldVector3D
<>(
field
,
Vector3D
.
PLUS_K
));
}
};
...
...
src/test/java/org/orekit/attitudes/LofOffsetPointingTest.java
View file @
7462f948
...
...
@@ -225,10 +225,10 @@ public class LofOffsetPointingTest {
final
TimeStampedPVCoordinates
pvD
=
provider
.
getTargetPV
(
orbit
,
date
,
frame
);
final
TimeStampedFieldPVCoordinates
<
T
>
pvF
=
provider
.
getTargetPV
(
orbitF
,
dateF
,
frame
);
Assert
.
assertEquals
(
0.0
,
Vector3D
.
distance
(
pvD
.
getPosition
(),
pvF
.
getPosition
().
toVector3D
()),
9.0
e
-
9
);
Assert
.
assertEquals
(
0.0
,
Vector3D
.
distance
(
pvD
.
get
Velocity
(),
pvF
.
get
Velocity
().
toVector3D
()),
5
.0
e
-
9
);
Assert
.
assertEquals
(
0.0
,
Vector3D
.
distance
(
pvD
.
get
Acceleration
(),
pvF
.
getAcceleration
().
toVector3D
()),
4
.0
e
-
5
);
Assert
.
assertEquals
(
0.0
,
Vector3D
.
distance
(
pvD
.
get
Position
(),
pvF
.
get
Position
().
toVector3D
()),
6
.0
e
-
9
);
Assert
.
assertEquals
(
0.0
,
Vector3D
.
distance
(
pvD
.
get
Velocity
(),
pvF
.
getVelocity
().
toVector3D
()),
5
.0
e
-
13
);
Assert
.
assertEquals
(
0.0
,
Vector3D
.
distance
(
pvD
.
getAcceleration
(),
pvF
.
getAcceleration
().
toVector3D
()),
2.0
e
-
6
);
}
@Before
...
...
@@ -246,7 +246,7 @@ public class LofOffsetPointingTest {
mu
=
3.9860047e14
;
// Reference frame = ITRF
frameItrf
=
FramesFactory
.
getITRF
(
IERSConventions
.
IERS_2010
,
tru
e
);
frameItrf
=
FramesFactory
.
getITRF
(
IERSConventions
.
IERS_2010
,
fals
e
);
// Elliptic earth shape
earthSpheric
=
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment