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
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
Orekit
Commits
f9851fc5
Commit
f9851fc5
authored
16 years ago
by
Luc Maisonobe
Browse files
Options
Downloads
Patches
Plain Diff
added test for impulse maneuver
parent
e376c057
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/test/java/org/orekit/forces/maneuvers/ImpulseManeuverTest.java
+70
-0
70 additions, 0 deletions
...java/org/orekit/forces/maneuvers/ImpulseManeuverTest.java
with
70 additions
and
0 deletions
src/test/java/org/orekit/forces/maneuvers/ImpulseManeuverTest.java
0 → 100644
+
70
−
0
View file @
f9851fc5
/* Copyright 2002-2008 CS Communication & Systèmes
* Licensed to CS Communication & Systèmes (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.forces.maneuvers
;
import
junit.framework.Test
;
import
junit.framework.TestCase
;
import
junit.framework.TestSuite
;
import
org.apache.commons.math.geometry.Vector3D
;
import
org.orekit.attitudes.LofOffset
;
import
org.orekit.errors.OrekitException
;
import
org.orekit.frames.Frame
;
import
org.orekit.iers.IERSDirectoryCrawler
;
import
org.orekit.orbits.KeplerianOrbit
;
import
org.orekit.orbits.Orbit
;
import
org.orekit.propagation.SpacecraftState
;
import
org.orekit.propagation.analytical.KeplerianPropagator
;
import
org.orekit.propagation.events.NodeDetector
;
import
org.orekit.time.AbsoluteDate
;
import
org.orekit.time.ChunkedDate
;
import
org.orekit.time.ChunkedTime
;
import
org.orekit.time.UTCScale
;
public
class
ImpulseManeuverTest
extends
TestCase
{
public
void
testInclinationManeuver
()
throws
OrekitException
{
final
Orbit
initialOrbit
=
new
KeplerianOrbit
(
24532000.0
,
0.72
,
0.3
,
Math
.
PI
,
0.4
,
2.0
,
KeplerianOrbit
.
MEAN_ANOMALY
,
Frame
.
getJ2000
(),
new
AbsoluteDate
(
new
ChunkedDate
(
2008
,
06
,
23
),
new
ChunkedTime
(
14
,
18
,
37
),
UTCScale
.
getInstance
()),
3.986004415e14
);
final
double
a
=
initialOrbit
.
getA
();
final
double
e
=
initialOrbit
.
getE
();
final
double
i
=
initialOrbit
.
getI
();
final
double
mu
=
initialOrbit
.
getMu
();
final
double
vApo
=
Math
.
sqrt
(
mu
*
(
1
-
e
)
/
(
a
*
(
1
+
e
)));
double
dv
=
0.99
*
Math
.
tan
(
i
)
*
vApo
;
KeplerianPropagator
propagator
=
new
KeplerianPropagator
(
initialOrbit
,
LofOffset
.
LOF_ALIGNED
);
propagator
.
addEventDetector
(
new
ImpulseManeuver
(
new
NodeDetector
(
initialOrbit
,
Frame
.
getJ2000
()),
new
Vector3D
(
dv
,
Vector3D
.
PLUS_J
),
400.0
));
SpacecraftState
propagated
=
propagator
.
propagate
(
new
AbsoluteDate
(
initialOrbit
.
getDate
(),
8000
));
assertEquals
(
0.0028257
,
propagated
.
getI
(),
1.0
e
-
6
);
}
public
void
setUp
()
{
System
.
setProperty
(
IERSDirectoryCrawler
.
IERS_ROOT_DIRECTORY
,
"regular-data"
);
}
public
static
Test
suite
()
{
return
new
TestSuite
(
ImpulseManeuverTest
.
class
);
}
}
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