Commit 8aea9a63 authored by Pascal Parraud's avatar Pascal Parraud
Browse files

No commit message

No commit message
parent 0f519602
......@@ -20,7 +20,6 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.math.geometry.Rotation;
import org.orekit.errors.OrekitException;
import org.orekit.time.AbsoluteDate;
import org.orekit.utils.Constants;
......@@ -89,9 +88,9 @@ import org.orekit.utils.Constants;
* | | | |
* (Terrestrial Intermediate Reference Frame) TIRF2000 TIRF2000 PEF PEF (Pseudo Earth Fixed)
* | w/o tidal effects w/o EOP corrections
* Pole motion | |
* | |
* (International Terrestrial Reference Frame) ITRF2005 ITRF2005
* Pole motion | | |
* | | |
* (International Terrestrial Reference Frame) ITRF2005 ITRF2005 VEIS1950
* w/o tidal effects
* </pre>
* <p>
......@@ -430,18 +429,14 @@ public class FramesFactory implements Serializable {
/** Get the VEIS 1950 reference frame.
* @return the selected reference frame singleton.
* @exception OrekitException if data embedded in the
* library cannot be read.
*/
public static Frame getVeis1950() {
public static Frame getVeis1950() throws OrekitException {
synchronized (FramesFactory.class) {
if (veis1950 == null) {
veis1950 = new Frame(getEME2000(),
new Transform(new Rotation(0.99998141186121629647,
-2.01425201682020570e-5,
-2.43283773387856897e-3,
5.59078052583013584e-3,
true)),
"VEIS1950", true);
veis1950 = new VEISFrame(AbsoluteDate.J2000_EPOCH, "VEIS1950");
}
return veis1950;
......@@ -454,9 +449,9 @@ public class FramesFactory implements Serializable {
* The applyEOPCorr parameter is available mainly for testing purposes or for
* consistency with legacy software that don't handle EOP parameters. Beware
* that setting this parameter to {@code false} leads to very crude accuracy
* (order of magnitudes for errors are above 100m in LEO and above 1000m in GEO).
* (order of magnitudes for errors are above 1m in LEO and above 10m in GEO).
* </p>
* @param applyEOPCorr if true, EOP corrections are applied (here dut1 and lod)
* @param applyEOPCorr if true, EOP corrections are applied (here, lod)
* @return the selected reference frame singleton.
* @exception OrekitException if the nutation model data embedded in the
* library cannot be read.
......
......@@ -41,11 +41,8 @@ class PEFFrame extends Frame {
/** 2&pi;. */
private static final double TWO_PI = 2.0 * Math.PI;
/** Seconds per day. */
private static final double SECONDS_PER_DAY = Constants.JULIAN_DAY;
/** Radians per second of time. */
private static final double RADIANS_PER_SECOND = TWO_PI / SECONDS_PER_DAY;
private static final double RADIANS_PER_SECOND = TWO_PI / Constants.JULIAN_DAY;
/** Radians per arcsecond. */
private static final double RADIANS_PER_ARC_SECOND = Math.PI / 648000;
......@@ -348,17 +345,16 @@ class PEFFrame extends Frame {
final double eqe = getNewEquationOfEquinoxes(date, ttc);
// offset in julian centuries from J2000 epoch (UT1 scale)
final MEMEFrame meme = (MEMEFrame) getParent().getParent();
final double dtai = date.durationFrom(GMST_REFERENCE);
final double dutc = TimeScalesFactory.getUTC().offsetFromTAI(date);
final double dut1 = meme.getUT1MinusUTC(date);
final double dut1 = FramesFactory.getEOP1980History().getUT1MinusUTC(date);
final double tut1 = dtai + dutc + dut1;
final double tt = tut1 / Constants.JULIAN_CENTURY;
// Seconds in the day, adjusted by 12 hours because the
// UT1 is supplied as a Julian date beginning at noon.
final double sd = (tut1 + SECONDS_PER_DAY / 2.) % SECONDS_PER_DAY;
final double sd = (tut1 + Constants.JULIAN_DAY / 2.) % Constants.JULIAN_DAY;
// compute Greenwich mean sidereal time, in radians
final double gmst = (((GMST_3 * tt + GMST_2) * tt + GMST_1) * tt + GMST_0 + sd) *
......@@ -368,8 +364,8 @@ class PEFFrame extends Frame {
final double gast = gmst + eqe;
// compute true angular rotation of Earth, in rad/s
final double lod = meme.getLOD(date);
final double omp = AVE * (1 - lod / SECONDS_PER_DAY);
final double lod = ((MEMEFrame) getParent().getParent()).getLOD(date);
final double omp = AVE * (1 - lod / Constants.JULIAN_DAY);
final Vector3D rotationRate = new Vector3D(omp, Vector3D.PLUS_K);
// set up the transform from parent TEME
......
/* 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.frames;
import org.apache.commons.math.geometry.Rotation;
import org.apache.commons.math.geometry.Vector3D;
import org.orekit.errors.OrekitException;
import org.orekit.time.AbsoluteDate;
import org.orekit.time.DateComponents;
import org.orekit.time.TimeScalesFactory;
import org.orekit.utils.Constants;
/** Veis 1950 Frame.
* <p>Its parent frame is the {@link PEFFrame} without EOP corrections.<p>
* @author Pascal Parraud
* @version $Revision$ $Date$
*/
class VEISFrame extends Frame {
/** Serializable UID. */
private static final long serialVersionUID = -6478931867252825900L;
/** 2&pi;. */
private static final double TWO_PI = 2.0 * Math.PI;
/** Reference date. */
private static AbsoluteDate VST_REFERENCE =
new AbsoluteDate(DateComponents.FIFTIES_EPOCH, TimeScalesFactory.getTAI());
/** 1st coef for Veis sidereal time computation in radians (100.075542 deg). */
private static final double VST0 = 1.746647708617871;
/** 2nd coef for Veis sidereal time computation in rad/s (0.985612288 deg/s). */
private static final double VST1 = 0.17202179573714597e-1;
/** Veis sidereal time derivative in rad/s. */
private static final double VSTD = 7.292115146705209e-5;
/** Cached date to avoid useless calculus. */
private AbsoluteDate cachedDate;
/** Constructor for the singleton.
* @param date the date.
* @param name name of the frame
* @exception OrekitException if data embedded in the library cannot be read
*/
public VEISFrame(final AbsoluteDate date, final String name)
throws OrekitException {
super(FramesFactory.getPEF(false), null, name, true);
// frame synchronization
updateFrame(date);
}
/** Update the frame to the given date.
* @param date new value of the date
* @exception OrekitException if data embedded in the library cannot be read
*/
protected void updateFrame(final AbsoluteDate date) throws OrekitException {
if ((cachedDate == null) || !cachedDate.equals(date)) {
// offset from FIFTIES epoch (UT1 scale)
final double dtai = date.durationFrom(VST_REFERENCE);
final double dutc = TimeScalesFactory.getUTC().offsetFromTAI(date);
final double dut1 = FramesFactory.getEOP1980History().getUT1MinusUTC(date);
final double tut1 = dtai + dutc + dut1;
final double ttd = tut1 / Constants.JULIAN_DAY;
final double rdtt = ttd - (int) ttd;
// compute Veis sidereal time, in radians
final double vst = (VST0 + VST1 * ttd + TWO_PI * rdtt) % TWO_PI;
// compute angular rotation of Earth, in rad/s
final Vector3D rotationRate = new Vector3D(-VSTD, Vector3D.PLUS_K);
// set up the transform from parent PEF
setTransform(new Transform(new Rotation(Vector3D.PLUS_K, vst), rotationRate));
cachedDate = date;
}
}
}
......@@ -19,11 +19,11 @@ root. The predefined GCRF inertial frame was arbitrary chosen as the root for ev
The {@link org.orekit.frames.FramesFactory} class implements several predefined reference
frames. One set correspond to the frames from the IERS 2003 conventions (ITRF2005 and others).
Other frames not belonging to the previous set are the EME2000 frame that was used prior
to GCRF and which is linked to GCRF by a simple bias rotation, the Veis 1950 frame which is
considered here as a simple rotation from EME2000, the MEME (mean of date) frame which involves
the IAU 1976 precession model, the TEME (true of date) frame which involves the IAU 1980
nutation model and the PEF (pseudo earth fixed) which involves the IAU 1982 Greenwich sidereal
time model.
to GCRF and which is linked to GCRF by a simple bias rotation, the MEME (mean of date) frame
which involves the IAU 1976 precession model, the TEME (true of date) frame which involves
the IAU 1980 nutation model, the PEF (pseudo earth fixed) which involves the IAU 1982
Greenwich sidereal time model and the Veis 1950 frame which involves a correction to the
Greenwich sidereal time model from PEF.
</p>
<p>
......
......@@ -231,6 +231,7 @@ public class DateComponents implements Serializable, Comparable<DateComponents>
* @param wYear year associated to week numbering
* @param week week number in year,from 1 to 52 or 53
* @param dayOfWeek day of week, from 1 (Monday) to 7 (Sunday)
* @return a builded date
* @exception IllegalArgumentException if inconsistent arguments
* are given (parameters out of range, week 53 on a 52 weeks year ...)
*/
......@@ -360,7 +361,7 @@ public class DateComponents implements Serializable, Comparable<DateComponents>
* @return calendar week number
*/
public int getCalendarWeek() {
int firstWeekMonday = getFirstWeekMonday(year);
final int firstWeekMonday = getFirstWeekMonday(year);
int daysSincefirstMonday = getJ2000Day() - firstWeekMonday;
if (daysSincefirstMonday < 0) {
// we are still in a week from previous year
......@@ -378,7 +379,7 @@ public class DateComponents implements Serializable, Comparable<DateComponents>
/** Get the monday of a year first week.
* @param year year to consider
* @param j2000 day of the monday of the first weak of year
* @return day of the monday of the first weak of year
*/
private static int getFirstWeekMonday(final int year) {
final int yearFirst = new DateComponents(year, 1, 1).getJ2000Day();
......
......@@ -121,7 +121,7 @@ public class DateTimeComponents implements Serializable, Comparable<DateTimeComp
public static DateTimeComponents parseDateTime(final String string) {
// is there a time ?
int tIndex = string.indexOf('T');
final int tIndex = string.indexOf('T');
if (tIndex > 0) {
return new DateTimeComponents(DateComponents.parseDate(string.substring(0, tIndex)),
TimeComponents.parseTime(string.substring(tIndex + 1)));
......
......@@ -77,8 +77,8 @@ Frames
Reference Frame> (GCRF) which is an inertial reference defined by IERS.
For most purposes, the recommended frames to use are ITRF 2005 for terrestrial frame and
GCRF for celestial frame. EME2000, MEME, TEME and PEF could also be used for compatibility
with legacy systems.
GCRF for celestial frame. EME2000, MEME, TEME, PEF and Veis1950 could also be used for
compatibility with legacy systems.
There are also a number of planetary frames associated with the predefined celestial bodies.
......@@ -128,7 +128,7 @@ Frames
This paradigm is deprecated by IERS. It involves additional complexity, first because
of the larger number of frames and second because these frames are computed by mixed models
with IAU-76 precession, correction terms to match IAU-2000, and a need to convert Earth
Earth Orientation data from the published form to a form suitable for this model. Another
Orientation data from the published form to a form suitable for this model. Another
drawback of this method is that the intermediate frames do not match the similar frames
with the same names used prior to IERS conventions 2003 since a correction is added to the
IAU-76 precession model and the IAU-80 nutation model is completely replaced by the nutation
......
......@@ -37,6 +37,10 @@
the Topocentric frame now provides a way to retrieve the body shape on which the
frame is defined
</action>
<action dev="pascal" type="update">
changed the way Veis 1950 frame is constructed.
Now, its parent is the PEF frame with no EOP corrections applied.
</action>
<action dev="luc" type="fix" due-to="John Pritchard">
fixed a parameters inversion in Earth Orientation Parameters for IAU-1980 models.
The error could introduce up to a few meters error in position during transformations
......@@ -80,7 +84,7 @@
a new PVCoordinatesProvider interface has been created on top of several existing classes
and interfaces (orbit propagator, celestial bodies, some moving frames ...). This is a
major generalization that allows to use either satellites or celestial bodies in many
algorithms (attitude pointing target, eclipses and field of view events ...)
algorithms (attitude pointing target, eclipses and field of view events ...)
</action>
<action dev="luc" type="fix" >
improved numerical propagator efficiency when used from an outside loop: the initial
......@@ -233,7 +237,7 @@
fixed a reversed sign in solar radiation pressure
</action>
<action dev="pascal" type="update" >
Orekit supports the two different naming patterns for bulletins B provided by IERS
Orekit supports the two different naming patterns for bulletins B provided by IERS
on http://www.iers.org/ and http://hpiers.obspm.fr/eop-pc/.
</action>
<action dev="luc" type="update" >
......
......@@ -56,11 +56,11 @@ public class PEFFrameAlternateConfigurationTest {
Transform t = FramesFactory.getTEME(true).getTransformTo(FramesFactory.getPEF(true), t0);
checkPV(pvPEF, t.transformPVCoordinates(pvTEME), 0.0091, 4.7e-6);
// if dut1 and lod corrections are ignored, results must be really bad
// if lod correction is ignored, results are quite the same
t = FramesFactory.getTEME(false).getTransformTo(FramesFactory.getPEF(false), t0);
PVCoordinates delta = new PVCoordinates(t.transformPVCoordinates(pvTEME), pvPEF);
Assert.assertEquals(255.644, delta.getPosition().getNorm(), 4.0e-6);
Assert.assertEquals(0.13856, delta.getVelocity().getNorm(), 9.0e-7);
Assert.assertEquals(9.1e-3, delta.getPosition().getNorm(), 1.0e-6);
Assert.assertEquals(1.4e-5, delta.getVelocity().getNorm(), 1.0e-7);
}
......@@ -89,11 +89,11 @@ public class PEFFrameAlternateConfigurationTest {
checkPV(pvPEF, t.transformPVCoordinates(pvTEME), 0.049, 5.2e-7);
// if dut1 and lod corrections are ignored, results must be really bad
// if lod correction is ignored, results are quite the same
t = FramesFactory.getTEME(false).getTransformTo(FramesFactory.getPEF(false), t0);
PVCoordinates delta = new PVCoordinates(t.transformPVCoordinates(pvTEME), pvPEF);
Assert.assertEquals(1448.217, delta.getPosition().getNorm(), 4.0e-4);
Assert.assertEquals(6.1e-5, delta.getVelocity().getNorm(), 2.0e-8);
Assert.assertEquals(4.8e-2, delta.getPosition().getNorm(), 1.5e-4);
Assert.assertEquals(5.2e-7, delta.getVelocity().getNorm(), 4.0e-9);
}
......
......@@ -55,18 +55,18 @@ public class PEFFrameTest {
Transform t = FramesFactory.getTEME(true).getTransformTo(FramesFactory.getPEF(true), t0);
// this test gives worst result than PEFFrameAlternateConfigurationTest because
// this test gives worse result than PEFFrameAlternateConfigurationTest because
// at 2004-04-06 there is a 0.471ms difference in dut1 and a 0.077ms difference
// in lod with the data used by Vallado to set up this test case
PVCoordinates delta = new PVCoordinates(t.transformPVCoordinates(pvTEME), pvPEF);
Assert.assertEquals(0.283011, delta.getPosition().getNorm(), 1.0e-6);
Assert.assertEquals(1.533846e-4, delta.getVelocity().getNorm(), 1.0e-10);
// if dut1 and lod corrections are ignored, results must be really bad
// even if lod correction is ignored, results are quite the same
t = FramesFactory.getTEME(false).getTransformTo(FramesFactory.getPEF(false), t0);
delta = new PVCoordinates(t.transformPVCoordinates(pvTEME), pvPEF);
Assert.assertEquals(255.644, delta.getPosition().getNorm(), 4.0e-6);
Assert.assertEquals(0.13856, delta.getVelocity().getNorm(), 9.0e-7);
Assert.assertEquals(0.283011, delta.getPosition().getNorm(), 1.0e-6);
Assert.assertEquals(1.592465e-4, delta.getVelocity().getNorm(), 1.0e-10);
}
......@@ -100,11 +100,11 @@ public class PEFFrameTest {
Assert.assertEquals(0.193876, delta.getPosition().getNorm(), 1.0e-6);
Assert.assertEquals(1.427464e-5, delta.getVelocity().getNorm(), 9.0e-12);
// if dut1 and lod corrections are ignored, results must be really bad
// even if lod correction is ignored, results are quite the same
t = FramesFactory.getTEME(false).getTransformTo(FramesFactory.getPEF(false), t0);
delta = new PVCoordinates(t.transformPVCoordinates(pvTEME), pvPEF);
Assert.assertEquals(1448.217, delta.getPosition().getNorm(), 4.0e-4);
Assert.assertEquals(6.1e-5, delta.getVelocity().getNorm(), 2.0e-8);
Assert.assertEquals(0.193876, delta.getPosition().getNorm(), 5.0e-7);
Assert.assertEquals(5.156e-7, delta.getVelocity().getNorm(), 8.0e-11);
}
......
/* 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.frames;
import org.apache.commons.math.geometry.Vector3D;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.orekit.Utils;
import org.orekit.errors.OrekitException;
import org.orekit.time.AbsoluteDate;
import org.orekit.time.DateComponents;
import org.orekit.time.TimeComponents;
import org.orekit.time.TimeScalesFactory;
import org.orekit.utils.PVCoordinates;
public class VEISFrameTest {
@Test
public void testRefLEO() throws OrekitException {
AbsoluteDate date0 = new AbsoluteDate(new DateComponents(2004, 04, 06),
new TimeComponents(07, 51, 28.386009),
TimeScalesFactory.getUTC());
Transform t0 = FramesFactory.getEME2000().getTransformTo(FramesFactory.getVeis1950(), date0);
// J2000
PVCoordinates pvJ2000 =
new PVCoordinates(new Vector3D(5102509.6000, 6123011.5200, 6378136.3000),
new Vector3D(-4743.219600, 790.536600, 5533.756190));
// Veis (mslib90)
PVCoordinates pvVEIS =
new PVCoordinates(new Vector3D(5168161.598034, 6065377.671130, 6380344.532758),
new Vector3D(-4736.246465, 843.352600, 5531.931275));
PVCoordinates delta0 = new PVCoordinates(t0.transformPVCoordinates(pvJ2000), pvVEIS);
Assert.assertEquals(0.0, delta0.getPosition().getNorm(), 6.0e-4);
Assert.assertEquals(0.0, delta0.getVelocity().getNorm(), 3.0e-5);
}
@Test
public void testRefGEO() throws OrekitException{
// this reference test has been extracted from the following paper:
AbsoluteDate date0 = new AbsoluteDate(new DateComponents(2004, 06, 01),
TimeComponents.H00,
TimeScalesFactory.getUTC());
Transform t0 = FramesFactory.getEME2000().getTransformTo(FramesFactory.getVeis1950(), date0);
//J2000
PVCoordinates pvJ2000 =
new PVCoordinates(new Vector3D(-40588150.3620, -11462167.0280, 27147.6490),
new Vector3D(834.787457, -2958.305691, -1.173016));
// VEIS (mslib90)
PVCoordinates pvVEIS =
new PVCoordinates(new Vector3D(-40713785.134055, -11007613.451052, 10293.258344),
new Vector3D(801.657321, -2967.454926, -0.928881));
PVCoordinates delta0 = new PVCoordinates(t0.transformPVCoordinates(pvJ2000), pvVEIS);
Assert.assertEquals(0.0, delta0.getPosition().getNorm(), 2.5e-3);
Assert.assertEquals(0.0, delta0.getVelocity().getNorm(), 1.1e-4);
}
@Before
public void setUp() {
Utils.setDataRoot("compressed-data");
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment