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
Guilhem Bonnefille
Orekit
Commits
16cc2ddd
Commit
16cc2ddd
authored
Dec 19, 2017
by
Luc Maisonobe
Browse files
Merge branch 'develop' into propagation-in-non-inertial-frame
parents
77596a5b
157fd83f
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
pom.xml
View file @
16cc2ddd
...
...
@@ -535,21 +535,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>
ru.concerteza.buildnumber
</groupId>
<artifactId>
maven-jgit-buildnumber-plugin
</artifactId>
<version>
${orekit.jgit.buildnumber.version}
</version>
<executions>
<execution>
<phase>
prepare-package
</phase>
<goals>
<goal>
extract-buildnumber
</goal>
</goals>
</execution>
</executions>
<configuration>
</configuration>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-jar-plugin
</artifactId>
...
...
@@ -558,7 +543,6 @@
<archive>
<manifestFile>
${project.build.directory}/osgi/MANIFEST.MF
</manifestFile>
<manifestEntries>
<Implementation-Build>
${orekit.implementation.build}
</Implementation-Build>
<X-Compile-Source-JDK>
${orekit.compiler.source}
</X-Compile-Source-JDK>
<X-Compile-Target-JDK>
${orekit.compiler.target}
</X-Compile-Target-JDK>
</manifestEntries>
...
...
@@ -687,6 +671,46 @@
</reporting>
<profiles>
<profile>
<id>
git
</id>
<activation>
<file>
<exists>
.git
</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>
ru.concerteza.buildnumber
</groupId>
<artifactId>
maven-jgit-buildnumber-plugin
</artifactId>
<version>
${orekit.jgit.buildnumber.version}
</version>
<executions>
<execution>
<phase>
prepare-package
</phase>
<goals>
<goal>
extract-buildnumber
</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-jar-plugin
</artifactId>
<version>
${orekit.maven-jar-plugin.version}
</version>
<configuration>
<archive>
<manifestFile>
${project.build.directory}/osgi/MANIFEST.MF
</manifestFile>
<manifestEntries>
<Implementation-Build>
${orekit.implementation.build}
</Implementation-Build>
<X-Compile-Source-JDK>
${orekit.compiler.source}
</X-Compile-Source-JDK>
<X-Compile-Target-JDK>
${orekit.compiler.target}
</X-Compile-Target-JDK>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>
release
</id>
<build>
...
...
src/main/java/org/orekit/bodies/CelestialBodyFactory.java
View file @
16cc2ddd
...
...
@@ -308,6 +308,13 @@ public class CelestialBodyFactory {
}
/** Get the solar system barycenter aggregated body.
* <p>
* Both the {@link CelestialBody#getInertiallyOrientedFrame() inertially
* oriented frame} and {@link CelestialBody#getBodyOrientedFrame() body
* oriented frame} for this aggregated body are aligned with
* {@link org.orekit.frames.FramesFactory#getICRF() ICRF} (and therefore also
* {@link org.orekit.frames.FramesFactory#getGCRF() GCRF})
* </p>
* @return solar system barycenter aggregated body
* @exception OrekitException if the celestial body cannot be built
*/
...
...
@@ -340,6 +347,13 @@ public class CelestialBodyFactory {
}
/** Get the Earth-Moon barycenter singleton bodies pair.
* <p>
* Both the {@link CelestialBody#getInertiallyOrientedFrame() inertially
* oriented frame} and {@link CelestialBody#getBodyOrientedFrame() body
* oriented frame} for this bodies pair are aligned with
* {@link org.orekit.frames.FramesFactory#getICRF() ICRF} (and therefore also
* {@link org.orekit.frames.FramesFactory#getGCRF() GCRF})
* </p>
* @return Earth-Moon barycenter bodies pair
* @exception OrekitException if the celestial body cannot be built
*/
...
...
src/main/java/org/orekit/frames/FramesFactory.java
View file @
16cc2ddd
...
...
@@ -543,7 +543,7 @@ public class FramesFactory {
/** Get the unique ICRF frame.
* <p>The ICRF frame is centered at solar system barycenter and aligned
* with
EME2000
.</p>
* with
GCRF
.</p>
* @return the unique instance of the ICRF frame
* @exception OrekitException if solar system ephemerides cannot be loaded
*/
...
...
src/main/java/org/orekit/utils/FieldPVCoordinates.java
View file @
16cc2ddd
...
...
@@ -18,7 +18,11 @@ package org.orekit.utils;
import
org.hipparchus.Field
;
import
org.hipparchus.RealFieldElement
;
import
org.hipparchus.analysis.differentiation.FDSFactory
;
import
org.hipparchus.analysis.differentiation.FieldDerivativeStructure
;
import
org.hipparchus.geometry.euclidean.threed.FieldVector3D
;
import
org.orekit.errors.OrekitException
;
import
org.orekit.errors.OrekitMessages
;
import
org.orekit.time.TimeShiftable
;
/** Simple container for Position/Velocity pairs, using {@link RealFieldElement}.
...
...
@@ -295,6 +299,34 @@ public class FieldPVCoordinates<T extends RealFieldElement<T>>
a3
,
pv3
.
getAcceleration
(),
a4
,
pv4
.
getAcceleration
());
}
/** Builds a FieldPVCoordinates triplet from a {@link FieldVector3D}<{@link FieldDerivativeStructure}>.
* <p>
* The vector components must have time as their only derivation parameter and
* have consistent derivation orders.
* </p>
* @param p vector with time-derivatives embedded within the coordinates
* @since 9.2
*/
public
FieldPVCoordinates
(
final
FieldVector3D
<
FieldDerivativeStructure
<
T
>>
p
)
{
position
=
new
FieldVector3D
<>(
p
.
getX
().
getValue
(),
p
.
getY
().
getValue
(),
p
.
getZ
().
getValue
());
if
(
p
.
getX
().
getOrder
()
>=
1
)
{
velocity
=
new
FieldVector3D
<>(
p
.
getX
().
getPartialDerivative
(
1
),
p
.
getY
().
getPartialDerivative
(
1
),
p
.
getZ
().
getPartialDerivative
(
1
));
if
(
p
.
getX
().
getOrder
()
>=
2
)
{
acceleration
=
new
FieldVector3D
<>(
p
.
getX
().
getPartialDerivative
(
2
),
p
.
getY
().
getPartialDerivative
(
2
),
p
.
getZ
().
getPartialDerivative
(
2
));
}
else
{
acceleration
=
FieldVector3D
.
getZero
(
position
.
getX
().
getField
());
}
}
else
{
final
FieldVector3D
<
T
>
zero
=
FieldVector3D
.
getZero
(
position
.
getX
().
getField
());
velocity
=
zero
;
acceleration
=
zero
;
}
}
/** Get fixed position/velocity at origin (both p, v and a are zero vectors).
* @param field field for the components
* @param <T> the type of the field elements
...
...
@@ -304,6 +336,153 @@ public class FieldPVCoordinates<T extends RealFieldElement<T>>
return
new
FieldPVCoordinates
<>(
field
,
PVCoordinates
.
ZERO
);
}
/** Transform the instance to a {@link FieldVector3D}<{@link FieldDerivativeStructure}>.
* <p>
* The {@link FieldDerivativeStructure} coordinates correspond to time-derivatives up
* to the user-specified order.
* </p>
* @param order derivation order for the vector components (must be either 0, 1 or 2)
* @return vector with time-derivatives embedded within the coordinates
* @exception OrekitException if the user specified order is too large
* @since 9.2
*/
public
FieldVector3D
<
FieldDerivativeStructure
<
T
>>
toDerivativeStructureVector
(
final
int
order
)
throws
OrekitException
{
final
FDSFactory
<
T
>
factory
;
final
FieldDerivativeStructure
<
T
>
x
;
final
FieldDerivativeStructure
<
T
>
y
;
final
FieldDerivativeStructure
<
T
>
z
;
switch
(
order
)
{
case
0
:
factory
=
new
FDSFactory
<>(
getPosition
().
getX
().
getField
(),
1
,
order
);
x
=
factory
.
build
(
position
.
getX
());
y
=
factory
.
build
(
position
.
getY
());
z
=
factory
.
build
(
position
.
getZ
());
break
;
case
1
:
factory
=
new
FDSFactory
<>(
getPosition
().
getX
().
getField
(),
1
,
order
);
x
=
factory
.
build
(
position
.
getX
(),
velocity
.
getX
());
y
=
factory
.
build
(
position
.
getY
(),
velocity
.
getY
());
z
=
factory
.
build
(
position
.
getZ
(),
velocity
.
getZ
());
break
;
case
2
:
factory
=
new
FDSFactory
<>(
getPosition
().
getX
().
getField
(),
1
,
order
);
x
=
factory
.
build
(
position
.
getX
(),
velocity
.
getX
(),
acceleration
.
getX
());
y
=
factory
.
build
(
position
.
getY
(),
velocity
.
getY
(),
acceleration
.
getY
());
z
=
factory
.
build
(
position
.
getZ
(),
velocity
.
getZ
(),
acceleration
.
getZ
());
break
;
default
:
throw
new
OrekitException
(
OrekitMessages
.
OUT_OF_RANGE_DERIVATION_ORDER
,
order
);
}
return
new
FieldVector3D
<>(
x
,
y
,
z
);
}
/** Transform the instance to a {@link FieldPVCoordinates}<{@link FieldDerivativeStructure}>.
* <p>
* The {@link FieldDerivativeStructure} coordinates correspond to time-derivatives up
* to the user-specified order. As both the instance components {@link #getPosition() position},
* {@link #getVelocity() velocity} and {@link #getAcceleration() acceleration} and the
* {@link FieldDerivativeStructure#getPartialDerivative(int...) derivatives} of the components
* holds time-derivatives, there are several ways to retrieve these derivatives. If for example
* the {@code order} is set to 2, then both {@code pv.getPosition().getX().getPartialDerivative(2)},
* {@code pv.getVelocity().getX().getPartialDerivative(1)} and
* {@code pv.getAcceleration().getX().getValue()} return the exact same value.
* </p>
* <p>
* If derivation order is 1, the first derivative of acceleration will be computed as a
* Keplerian-only jerk. If derivation order is 2, the second derivative of velocity (which
* is also the first derivative of acceleration) will be computed as a Keplerian-only jerk,
* and the second derivative of acceleration will be computed as a Keplerian-only jounce.
* </p>
* @param order derivation order for the vector components (must be either 0, 1 or 2)
* @return pv coordinates with time-derivatives embedded within the coordinates
* @exception OrekitException if the user specified order is too large
* @since 9.2
*/
public
FieldPVCoordinates
<
FieldDerivativeStructure
<
T
>>
toDerivativeStructurePV
(
final
int
order
)
throws
OrekitException
{
final
FDSFactory
<
T
>
factory
;
final
FieldDerivativeStructure
<
T
>
x0
;
final
FieldDerivativeStructure
<
T
>
y0
;
final
FieldDerivativeStructure
<
T
>
z0
;
final
FieldDerivativeStructure
<
T
>
x1
;
final
FieldDerivativeStructure
<
T
>
y1
;
final
FieldDerivativeStructure
<
T
>
z1
;
final
FieldDerivativeStructure
<
T
>
x2
;
final
FieldDerivativeStructure
<
T
>
y2
;
final
FieldDerivativeStructure
<
T
>
z2
;
switch
(
order
)
{
case
0
:
factory
=
new
FDSFactory
<>(
getPosition
().
getX
().
getField
(),
1
,
order
);
x0
=
factory
.
build
(
position
.
getX
());
y0
=
factory
.
build
(
position
.
getY
());
z0
=
factory
.
build
(
position
.
getZ
());
x1
=
factory
.
build
(
velocity
.
getX
());
y1
=
factory
.
build
(
velocity
.
getY
());
z1
=
factory
.
build
(
velocity
.
getZ
());
x2
=
factory
.
build
(
acceleration
.
getX
());
y2
=
factory
.
build
(
acceleration
.
getY
());
z2
=
factory
.
build
(
acceleration
.
getZ
());
break
;
case
1
:
{
factory
=
new
FDSFactory
<>(
getPosition
().
getX
().
getField
(),
1
,
order
);
final
T
r2
=
position
.
getNormSq
();
final
T
r
=
r2
.
sqrt
();
final
T
pvOr2
=
FieldVector3D
.
dotProduct
(
position
,
velocity
).
divide
(
r2
);
final
T
a
=
acceleration
.
getNorm
();
final
T
aOr
=
a
.
divide
(
r
);
final
FieldVector3D
<
T
>
keplerianJerk
=
new
FieldVector3D
<>(
pvOr2
.
multiply
(-
3
),
acceleration
,
aOr
.
negate
(),
velocity
);
x0
=
factory
.
build
(
position
.
getX
(),
velocity
.
getX
());
y0
=
factory
.
build
(
position
.
getY
(),
velocity
.
getY
());
z0
=
factory
.
build
(
position
.
getZ
(),
velocity
.
getZ
());
x1
=
factory
.
build
(
velocity
.
getX
(),
acceleration
.
getX
());
y1
=
factory
.
build
(
velocity
.
getY
(),
acceleration
.
getY
());
z1
=
factory
.
build
(
velocity
.
getZ
(),
acceleration
.
getZ
());
x2
=
factory
.
build
(
acceleration
.
getX
(),
keplerianJerk
.
getX
());
y2
=
factory
.
build
(
acceleration
.
getY
(),
keplerianJerk
.
getY
());
z2
=
factory
.
build
(
acceleration
.
getZ
(),
keplerianJerk
.
getZ
());
break
;
}
case
2
:
{
factory
=
new
FDSFactory
<>(
getPosition
().
getX
().
getField
(),
1
,
order
);
final
T
r2
=
position
.
getNormSq
();
final
T
r
=
r2
.
sqrt
();
final
T
pvOr2
=
FieldVector3D
.
dotProduct
(
position
,
velocity
).
divide
(
r2
);
final
T
a
=
acceleration
.
getNorm
();
final
T
aOr
=
a
.
divide
(
r
);
final
FieldVector3D
<
T
>
keplerianJerk
=
new
FieldVector3D
<>(
pvOr2
.
multiply
(-
3
),
acceleration
,
aOr
.
negate
(),
velocity
);
final
T
v2
=
velocity
.
getNormSq
();
final
T
pa
=
FieldVector3D
.
dotProduct
(
position
,
acceleration
);
final
T
aj
=
FieldVector3D
.
dotProduct
(
acceleration
,
keplerianJerk
);
final
FieldVector3D
<
T
>
keplerianJounce
=
new
FieldVector3D
<>(
v2
.
add
(
pa
).
multiply
(-
3
).
divide
(
r2
).
add
(
pvOr2
.
multiply
(
pvOr2
).
multiply
(
15
)).
subtract
(
aOr
),
acceleration
,
aOr
.
multiply
(
4
).
multiply
(
pvOr2
).
subtract
(
aj
.
divide
(
a
.
multiply
(
r
))),
velocity
);
x0
=
factory
.
build
(
position
.
getX
(),
velocity
.
getX
(),
acceleration
.
getX
());
y0
=
factory
.
build
(
position
.
getY
(),
velocity
.
getY
(),
acceleration
.
getY
());
z0
=
factory
.
build
(
position
.
getZ
(),
velocity
.
getZ
(),
acceleration
.
getZ
());
x1
=
factory
.
build
(
velocity
.
getX
(),
acceleration
.
getX
(),
keplerianJerk
.
getX
());
y1
=
factory
.
build
(
velocity
.
getY
(),
acceleration
.
getY
(),
keplerianJerk
.
getY
());
z1
=
factory
.
build
(
velocity
.
getZ
(),
acceleration
.
getZ
(),
keplerianJerk
.
getZ
());
x2
=
factory
.
build
(
acceleration
.
getX
(),
keplerianJerk
.
getX
(),
keplerianJounce
.
getX
());
y2
=
factory
.
build
(
acceleration
.
getY
(),
keplerianJerk
.
getY
(),
keplerianJounce
.
getY
());
z2
=
factory
.
build
(
acceleration
.
getZ
(),
keplerianJerk
.
getZ
(),
keplerianJounce
.
getZ
());
break
;
}
default
:
throw
new
OrekitException
(
OrekitMessages
.
OUT_OF_RANGE_DERIVATION_ORDER
,
order
);
}
return
new
FieldPVCoordinates
<>(
new
FieldVector3D
<>(
x0
,
y0
,
z0
),
new
FieldVector3D
<>(
x1
,
y1
,
z1
),
new
FieldVector3D
<>(
x2
,
y2
,
z2
));
}
/** Estimate velocity between two positions.
* <p>Estimation is based on a simple fixed velocity translation
* during the time interval between the two positions.</p>
...
...
src/main/java/org/orekit/utils/PVCoordinates.java
View file @
16cc2ddd
...
...
@@ -22,6 +22,7 @@ import org.hipparchus.analysis.differentiation.DSFactory;
import
org.hipparchus.analysis.differentiation.DerivativeStructure
;
import
org.hipparchus.geometry.euclidean.threed.FieldVector3D
;
import
org.hipparchus.geometry.euclidean.threed.Vector3D
;
import
org.hipparchus.util.FastMath
;
import
org.orekit.errors.OrekitException
;
import
org.orekit.errors.OrekitMessages
;
import
org.orekit.time.TimeShiftable
;
...
...
@@ -238,6 +239,107 @@ public class PVCoordinates implements TimeShiftable<PVCoordinates>, Serializable
}
/** Transform the instance to a {@link FieldPVCoordinates}<{@link DerivativeStructure}>.
* <p>
* The {@link DerivativeStructure} coordinates correspond to time-derivatives up
* to the user-specified order. As both the instance components {@link #getPosition() position},
* {@link #getVelocity() velocity} and {@link #getAcceleration() acceleration} and the
* {@link DerivativeStructure#getPartialDerivative(int...) derivatives} of the components
* holds time-derivatives, there are several ways to retrieve these derivatives. If for example
* the {@code order} is set to 2, then both {@code pv.getPosition().getX().getPartialDerivative(2)},
* {@code pv.getVelocity().getX().getPartialDerivative(1)} and
* {@code pv.getAcceleration().getX().getValue()} return the exact same value.
* </p>
* <p>
* If derivation order is 1, the first derivative of acceleration will be computed as a
* Keplerian-only jerk. If derivation order is 2, the second derivative of velocity (which
* is also the first derivative of acceleration) will be computed as a Keplerian-only jerk,
* and the second derivative of acceleration will be computed as a Keplerian-only jounce.
* </p>
* @param order derivation order for the vector components (must be either 0, 1 or 2)
* @return pv coordinates with time-derivatives embedded within the coordinates
* @exception OrekitException if the user specified order is too large
* @since 9.2
*/
public
FieldPVCoordinates
<
DerivativeStructure
>
toDerivativeStructurePV
(
final
int
order
)
throws
OrekitException
{
final
DSFactory
factory
;
final
DerivativeStructure
x0
;
final
DerivativeStructure
y0
;
final
DerivativeStructure
z0
;
final
DerivativeStructure
x1
;
final
DerivativeStructure
y1
;
final
DerivativeStructure
z1
;
final
DerivativeStructure
x2
;
final
DerivativeStructure
y2
;
final
DerivativeStructure
z2
;
switch
(
order
)
{
case
0
:
factory
=
new
DSFactory
(
1
,
order
);
x0
=
factory
.
build
(
position
.
getX
());
y0
=
factory
.
build
(
position
.
getY
());
z0
=
factory
.
build
(
position
.
getZ
());
x1
=
factory
.
build
(
velocity
.
getX
());
y1
=
factory
.
build
(
velocity
.
getY
());
z1
=
factory
.
build
(
velocity
.
getZ
());
x2
=
factory
.
build
(
acceleration
.
getX
());
y2
=
factory
.
build
(
acceleration
.
getY
());
z2
=
factory
.
build
(
acceleration
.
getZ
());
break
;
case
1
:
{
factory
=
new
DSFactory
(
1
,
order
);
final
double
r2
=
position
.
getNormSq
();
final
double
r
=
FastMath
.
sqrt
(
r2
);
final
double
pvOr2
=
Vector3D
.
dotProduct
(
position
,
velocity
)
/
r2
;
final
double
a
=
acceleration
.
getNorm
();
final
double
aOr
=
a
/
r
;
final
Vector3D
keplerianJerk
=
new
Vector3D
(-
3
*
pvOr2
,
acceleration
,
-
aOr
,
velocity
);
x0
=
factory
.
build
(
position
.
getX
(),
velocity
.
getX
());
y0
=
factory
.
build
(
position
.
getY
(),
velocity
.
getY
());
z0
=
factory
.
build
(
position
.
getZ
(),
velocity
.
getZ
());
x1
=
factory
.
build
(
velocity
.
getX
(),
acceleration
.
getX
());
y1
=
factory
.
build
(
velocity
.
getY
(),
acceleration
.
getY
());
z1
=
factory
.
build
(
velocity
.
getZ
(),
acceleration
.
getZ
());
x2
=
factory
.
build
(
acceleration
.
getX
(),
keplerianJerk
.
getX
());
y2
=
factory
.
build
(
acceleration
.
getY
(),
keplerianJerk
.
getY
());
z2
=
factory
.
build
(
acceleration
.
getZ
(),
keplerianJerk
.
getZ
());
break
;
}
case
2
:
{
factory
=
new
DSFactory
(
1
,
order
);
final
double
r2
=
position
.
getNormSq
();
final
double
r
=
FastMath
.
sqrt
(
r2
);
final
double
pvOr2
=
Vector3D
.
dotProduct
(
position
,
velocity
)
/
r2
;
final
double
a
=
acceleration
.
getNorm
();
final
double
aOr
=
a
/
r
;
final
Vector3D
keplerianJerk
=
new
Vector3D
(-
3
*
pvOr2
,
acceleration
,
-
aOr
,
velocity
);
final
double
v2
=
velocity
.
getNormSq
();
final
double
pa
=
Vector3D
.
dotProduct
(
position
,
acceleration
);
final
double
aj
=
Vector3D
.
dotProduct
(
acceleration
,
keplerianJerk
);
final
Vector3D
keplerianJounce
=
new
Vector3D
(-
3
*
(
v2
+
pa
)
/
r2
+
15
*
pvOr2
*
pvOr2
-
aOr
,
acceleration
,
4
*
aOr
*
pvOr2
-
aj
/
(
a
*
r
),
velocity
);
x0
=
factory
.
build
(
position
.
getX
(),
velocity
.
getX
(),
acceleration
.
getX
());
y0
=
factory
.
build
(
position
.
getY
(),
velocity
.
getY
(),
acceleration
.
getY
());
z0
=
factory
.
build
(
position
.
getZ
(),
velocity
.
getZ
(),
acceleration
.
getZ
());
x1
=
factory
.
build
(
velocity
.
getX
(),
acceleration
.
getX
(),
keplerianJerk
.
getX
());
y1
=
factory
.
build
(
velocity
.
getY
(),
acceleration
.
getY
(),
keplerianJerk
.
getY
());
z1
=
factory
.
build
(
velocity
.
getZ
(),
acceleration
.
getZ
(),
keplerianJerk
.
getZ
());
x2
=
factory
.
build
(
acceleration
.
getX
(),
keplerianJerk
.
getX
(),
keplerianJounce
.
getX
());
y2
=
factory
.
build
(
acceleration
.
getY
(),
keplerianJerk
.
getY
(),
keplerianJounce
.
getY
());
z2
=
factory
.
build
(
acceleration
.
getZ
(),
keplerianJerk
.
getZ
(),
keplerianJounce
.
getZ
());
break
;
}
default
:
throw
new
OrekitException
(
OrekitMessages
.
OUT_OF_RANGE_DERIVATION_ORDER
,
order
);
}
return
new
FieldPVCoordinates
<>(
new
FieldVector3D
<>(
x0
,
y0
,
z0
),
new
FieldVector3D
<>(
x1
,
y1
,
z1
),
new
FieldVector3D
<>(
x2
,
y2
,
z2
));
}
/** Estimate velocity between two positions.
* <p>Estimation is based on a simple fixed velocity translation
* during the time interval between the two positions.</p>
...
...
src/main/java/org/orekit/utils/TimeStampedFieldPVCoordinates.java
View file @
16cc2ddd
...
...
@@ -20,6 +20,7 @@ import java.util.Collection;
import
java.util.stream.Stream
;
import
org.hipparchus.RealFieldElement
;
import
org.hipparchus.analysis.differentiation.FieldDerivativeStructure
;
import
org.hipparchus.analysis.interpolation.FieldHermiteInterpolator
;
import
org.hipparchus.geometry.euclidean.threed.FieldVector3D
;
import
org.orekit.errors.OrekitInternalError
;
...
...
@@ -567,6 +568,20 @@ public class TimeStampedFieldPVCoordinates<T extends RealFieldElement<T>>
this
.
date
=
date
;
}
/** Builds a TimeStampedFieldPVCoordinates triplet from a {@link FieldVector3D}<{@link FieldDerivativeStructure}>.
* <p>
* The vector components must have time as their only derivation parameter and
* have consistent derivation orders.
* </p>
* @param date date of the built coordinates
* @param p vector with time-derivatives embedded within the coordinates
*/
public
TimeStampedFieldPVCoordinates
(
final
FieldAbsoluteDate
<
T
>
date
,
final
FieldVector3D
<
FieldDerivativeStructure
<
T
>>
p
)
{
super
(
p
);
this
.
date
=
date
;
}
/** Get the date.
* @return date
*/
...
...
src/main/resources/assets/org/orekit/localization/OrekitMessages_da.utf8
View file @
16cc2ddd
...
...
@@ -62,7 +62,7 @@ NO_EARTH_ORIENTATION_PARAMETERS_LOADED = ingen jordorienteringsparametre er indl
MISSING_EARTH_ORIENTATION_PARAMETERS_BETWEEN_DATES = manglende jordorienteringsparametre mellem {0} og {1}
# missing Earth Orientation Parameters
NO_EARTH_ORIENTATION_PARAMETERS =
<MISSING TRANSLATION>
NO_EARTH_ORIENTATION_PARAMETERS =
ingen jordorienteringsparametre
# file {0} is not a supported IERS data file
NOT_A_SUPPORTED_IERS_DATA_FILE = filen {0} er ikke en understøttet IERS datafil
...
...
@@ -467,5 +467,5 @@ NO_KLOBUCHAR_ALPHA_BETA_IN_FILE = filen {0} indeholder ikke Klobuchar koefficien
NO_REFERENCE_DATE_FOR_PARAMETER = ingen referencedato angivet for parameteren {0}
# station {0} not found, known stations: {1}
STATION_NOT_FOUND =
<MISSING TRANSLATION>
STATION_NOT_FOUND =
station {0} blev ikke fundet, kendte stationer: {1}
src/site/xdoc/changes.xml
View file @
16cc2ddd
...
...
@@ -21,6 +21,18 @@
</properties>
<body>
<release
version=
"9.2"
date=
"TBD"
description=
"TBD"
>
<action
dev=
"luc"
type=
"add"
>
Added more conversions between PV coordinates and DerivativeStructure.
This simplifies for example getting the time derivative of the momentum.
</action>
<action
dev=
"maxime"
type=
"fix"
>
Fixed weights for angular measurements in W3B orbit determination.
Fixed in test and tutorial.
Fixes issue #370.
</action>
<action
dev=
"luc"
type=
"add"
due-to=
"Julio Hernanz"
>
Added frames for L1 and L2 Lagrange points, for any pair of celestial bodies.
</action>
</release>
<release
version=
"9.1"
date=
"2017-11-26"
description=
"Version 9.1 is a minor release of Orekit. It introduces a few new
...
...
src/test/java/org/orekit/bodies/CelestialBodyFactoryTest.java
View file @
16cc2ddd
...
...
@@ -40,6 +40,7 @@ import org.orekit.frames.Frame;
import
org.orekit.frames.FramesFactory
;
import
org.orekit.time.AbsoluteDate
;
import
org.orekit.time.TimeScalesFactory
;
import
org.orekit.utils.Constants
;
import
org.orekit.utils.IERSConventions
;
import
org.orekit.utils.TimeStampedPVCoordinates
;
...
...
@@ -294,6 +295,26 @@ public class CelestialBodyFactoryTest {
}
}
@Test
public
void
testICRFAndGCRFAlignment
()
throws
OrekitException
{
Utils
.
setDataRoot
(
"regular-data"
);
final
CelestialBody
earthMoonBarycenter
=
CelestialBodyFactory
.
getEarthMoonBarycenter
();
final
CelestialBody
solarSystemBarycenter
=
CelestialBodyFactory
.
getSolarSystemBarycenter
();
final
List
<
Frame
>
frames
=
Arrays
.
asList
(
earthMoonBarycenter
.
getInertiallyOrientedFrame
(),
earthMoonBarycenter
.
getBodyOrientedFrame
(),
solarSystemBarycenter
.
getInertiallyOrientedFrame
(),
solarSystemBarycenter
.
getBodyOrientedFrame
());
final
Frame
icrf
=
FramesFactory
.
getICRF
();
final
Frame
gcrf
=
FramesFactory
.
getGCRF
();
for
(
double
dt
=
0
;
dt
<
Constants
.
JULIAN_DAY
;
dt
+=
60
)
{
final
AbsoluteDate
date
=
AbsoluteDate
.
J2000_EPOCH
.
shiftedBy
(
dt
);
for
(
final
Frame
frame
:
frames
)
{
Assert
.
assertEquals
(
0.0
,
frame
.
getTransformTo
(
icrf
,
date
).
getRotation
().
getAngle
(),
1.0
e
-
15
);
Assert
.
assertEquals
(
0.0
,
frame
.
getTransformTo
(
gcrf
,
date
).
getRotation
().
getAngle
(),
1.0
e
-
15
);
}
}
}
@Test
public
void
testEarthInertialFrameAroundJ2000
()
throws
OrekitException
{
Utils
.
setDataRoot
(
"regular-data"
);
...
...
src/test/java/org/orekit/estimation/leastsquares/OrbitDeterminationTest.java
View file @
16cc2ddd
...
...
@@ -212,20 +212,26 @@ public class OrbitDeterminationTest {
//test on the estimated position and velocity
final
Vector3D
estimatedPos
=
odsatW3
.
getEstimatedPV
().
getPosition
();
final
Vector3D
estimatedVel
=
odsatW3
.
getEstimatedPV
().
getVelocity
();
final
Vector3D
refPos
=
new
Vector3D
(-
40541
629.7
,
-
9904274.0
,
20777
0.5
);
final
Vector3D
refVel
=
new
Vector3D
(
759.0
343
,
-
1476.5
744
,
54.7
207
);
final
Vector3D
refPos
=
new
Vector3D
(-
40541
446.255
,
-
9905357.41
,
20
6
777
.413
);
final
Vector3D
refVel
=
new
Vector3D
(
759.0
685
,
-
1476.5
156
,
54.7
93
);
Assert
.
assertEquals
(
0.0
,
Vector3D
.
distance
(
refPos
,
estimatedPos
),
distanceAccuracy
);
Assert
.
assertEquals
(
0.0
,
Vector3D
.
distance
(
refVel
,
estimatedVel
),
velocityAccuracy
);
//test on propagator parameters
final
double
dragCoef
=
0.
408358
;
final
double
dragCoef
=
-
0.
2154
;
Assert
.
assertEquals
(
dragCoef
,
odsatW3
.
propagatorParameters
.
getDrivers
().
get
(
0
).
getValue
(),
1
e
-
3
);
final
Vector3D
leakAcceleration
=
final
Vector3D
leakAcceleration
0
=
new
Vector3D
(
odsatW3
.
propagatorParameters
.
getDrivers
().
get
(
1
).
getValue
(),
odsatW3
.
propagatorParameters
.
getDrivers
().
get
(
3
).
getValue
(),
odsatW3
.
propagatorParameters
.
getDrivers
().
get
(
4
).
getValue
());
Assert
.
assertEquals
(
7.215
e
-
6
,
leakAcceleration
.
getNorm
(),
1.0
e
-
8
);
odsatW3
.
propagatorParameters
.
getDrivers
().
get
(
5
).
getValue
());
//Assert.assertEquals(7.215e-6, leakAcceleration.getNorm(), 1.0e-8);
Assert
.
assertEquals
(
8.002
e
-
6
,
leakAcceleration0
.
getNorm
(),
1.0
e
-
8
);
final
Vector3D
leakAcceleration1
=
new
Vector3D
(
odsatW3
.
propagatorParameters
.
getDrivers
().
get
(
2
).
getValue
(),
odsatW3
.
propagatorParameters
.
getDrivers
().
get
(
4
).
getValue
(),
odsatW3
.
propagatorParameters
.
getDrivers
().
get
(
6
).
getValue
());
Assert
.
assertEquals
(
3.058
e
-
10
,
leakAcceleration1
.
getNorm
(),
1.0
e
-
12
);
//test on measurements parameters
final
List
<
DelegatingDriver
>
list
=
new
ArrayList
<
DelegatingDriver
>();
...
...
@@ -233,36 +239,36 @@ public class OrbitDeterminationTest {
sortParametersChanges
(
list
);
//station CastleRock
final
double
[]
CastleAzElBias
=
{
0.06
1472524615
,
-
0.004761243392
};
final
double
CastleRangeBias
=
11
469.549393108811
;
final
double
[]
CastleAzElBias
=
{
0.06
2701342
,
-
0.003613508
};
final
double
CastleRangeBias
=
11
274.4677
;
Assert
.
assertEquals
(
CastleAzElBias
[
0
],
FastMath
.
toDegrees
(
list
.
get
(
0
).
getValue
()),
angleAccuracy
);
Assert
.
assertEquals
(
CastleAzElBias
[
1
],
FastMath
.
toDegrees
(
list
.
get
(
1
).
getValue
()),
angleAccuracy
);
Assert
.
assertEquals
(
CastleRangeBias
,
list