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
09f437e7
Commit
09f437e7
authored
Jan 15, 2023
by
Luc Maisonobe
Browse files
Merge branch 'issue-1005' into 'develop'
Issue 1005 See merge request
!339
parents
fba4d1bb
dbebef88
Pipeline
#2929
passed with stages
in 38 minutes and 26 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/test/java/org/orekit/propagation/numerical/FieldNumericalPropagatorTest.java
View file @
09f437e7
...
...
@@ -1726,6 +1726,31 @@ public class FieldNumericalPropagatorTest {
}
}
@Test
public
void
testInfinitePropagation
()
{
doTestInfinitePropagation
(
Binary64Field
.
getInstance
());
}
private
<
T
extends
CalculusFieldElement
<
T
>>
void
doTestInfinitePropagation
(
Field
<
T
>
field
)
{
Utils
.
setDataRoot
(
"regular-data:atmosphere:potential/grgs-format"
);
GravityFieldFactory
.
addPotentialCoefficientsReader
(
new
GRGSFormatReader
(
"grim4s4_gr"
,
true
));
FieldNumericalPropagator
<
T
>
propagator
=
createPropagator
(
field
);
propagator
.
setResetAtEnd
(
false
);
// Stop condition
T
convergenceThreshold
=
field
.
getZero
().
add
(
1
e
-
9
);
propagator
.
addEventDetector
(
new
FieldDateDetector
<
T
>(
field
.
getZero
().
add
(
1
e10
),
convergenceThreshold
,
propagator
.
getInitialState
().
getDate
().
shiftedBy
(
60
)));
// Propagate until the stop condition is reached
final
FieldSpacecraftState
<
T
>
finalState
=
propagator
.
propagate
(
FieldAbsoluteDate
.
getFutureInfinity
(
field
));
// Check that the expected final state was reached
Assertions
.
assertEquals
(
60
,
finalState
.
getDate
().
durationFrom
(
propagator
.
getInitialState
().
getDate
()).
getReal
(),
convergenceThreshold
.
getReal
());
}
private
static
<
T
extends
CalculusFieldElement
<
T
>>
void
doTestShift
(
final
FieldCartesianOrbit
<
T
>
orbit
,
final
OrbitType
orbitType
,
final
PositionAngle
angleType
,
final
boolean
withDerivatives
,
final
double
error60s
,
final
double
error120s
,
...
...
src/test/java/org/orekit/propagation/numerical/NumericalPropagatorTest.java
View file @
09f437e7
...
...
@@ -1591,6 +1591,26 @@ public class NumericalPropagatorTest {
}
}
@Test
public
void
testInfinitePropagation
()
{
Utils
.
setDataRoot
(
"regular-data:atmosphere:potential/grgs-format"
);
GravityFieldFactory
.
addPotentialCoefficientsReader
(
new
GRGSFormatReader
(
"grim4s4_gr"
,
true
));
final
NumericalPropagator
propag
=
createPropagator
(
initialState
,
OrbitType
.
KEPLERIAN
,
PositionAngle
.
TRUE
);
// Stop condition
final
double
convergenceThreshold
=
1
e
-
9
;
propag
.
addEventDetector
(
new
DateDetector
(
1
e10
,
convergenceThreshold
,
initialState
.
getDate
().
shiftedBy
(
60
)));
// Propagate until the stop condition is reached
final
SpacecraftState
finalState
=
propag
.
propagate
(
AbsoluteDate
.
FUTURE_INFINITY
);
// Check that the expected final state was reached
Assertions
.
assertEquals
(
60
,
finalState
.
getDate
().
durationFrom
(
initialState
.
getDate
()),
convergenceThreshold
);
}
/** Record the dates treated by the handler.
* If they are out of an interval defined by a start and final date.
*/
...
...
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