...
 
Commits (2)
......@@ -57,7 +57,7 @@ import org.orekit.utils.OrekitConfiguration;
* {@link #getITRF(IERSConventions, boolean)}, {@link #getEME2000()},
* {@link #getMOD(IERSConventions)}, {@link #getTOD(IERSConventions)},
* {@link #getGTOD(IERSConventions)}, {@link #getITRFEquinox(IERSConventions, boolean)},
* {@link #getTEME()} and {@link #getVeis1950()}.
* {@link #getTEME()}, {@link #getVeis1950() and {@link #getB1950()}}.
* </p>
* <h5> International Terrestrial Reference Frame</h5>
* <p>
......@@ -128,9 +128,9 @@ import org.orekit.utils.OrekitConfiguration;
* | | Frame bias |
* | | EME2000
* | | |
* | | Precession effects |
* | | |
* Bias, Precession and Nutation effects | MOD MOD (Mean Equator Of Date)
* | | Precession effects |-------------------------------
* | | | |
* Bias, Precession and Nutation effects | MOD MOD (Mean Equator Of Date) B1950
* | | w/o EOP corrections
* | | Nutation effects |
* (Celestial Intermediate Reference Frame) CIRF | |
......@@ -529,6 +529,8 @@ public class FramesFactory {
return getMOD(IERSConventions.IERS_1996, true);
case TEME :
return getTEME();
case B1950 :
return getB1950();
default :
throw OrekitException.createInternalError(null);
}
......@@ -1506,6 +1508,38 @@ public class FramesFactory {
}
}
/** Get the unique B1950 frame.
* <p>The B1950 frame is an inertial frame using a mean equinox frozen at
* {@link AbsoluteDate#createBesselianEpoch(double) Besselian date 1950.0}.
* It played a similar role to {@link #getEME2000() EME2000} and is still in
* use in some systems.</p>
* @return the unique instance of the B1950 frame
* @exception OrekitException if bias between equinoxes at B1950.0 and J2000.0 cannot be computed
*/
public static FactoryManagedFrame getB1950() throws OrekitException {
synchronized (FramesFactory.class) {
// try to find an already built frame
FactoryManagedFrame frame = FRAMES.get(Predefined.B1950);
if (frame == null) {
// it's the first time we need this frame, build it and store it
// compute the bias from equinox at J2000.0 and equinox at B1950.0
final TransformProvider mod = new MODProvider(IERSConventions.IERS_1996);
final Transform bias = mod.getTransform(AbsoluteDate.createBesselianEpoch(1950.0));
frame = new FactoryManagedFrame(getEME2000(), new FixedTransformProvider(bias),
true, Predefined.B1950);
FRAMES.put(Predefined.B1950, frame);
}
return frame;
}
}
/** Get the transform between two frames, suppressing all interpolation.
* <p>
* This method is similar to {@link Frame#getTransformTo(Frame, AbsoluteDate)}
......
......@@ -380,7 +380,10 @@ public enum Predefined {
MOD_CONVENTIONS_1996("MOD/1996"),
/** TEME frame. */
TEME("TEME");
TEME("TEME"),
/** B1950 frame. */
B1950("B1950");
/** Name fo the frame. */
private final String name;
......
......@@ -44,7 +44,7 @@ discrete events. Here is a short list of the features offered by the library:</p
<ul>
<li>frames hierarchy supporting fixed and time-dependent (or telemetry-dependent) frames</li>
<li>predefined frames (EME2000/J2000, ICRF, GCRF, ITRF93, ITRF97, ITRF2000, ITRF2005, ITRF2008 and
intermediate frames, TOD, MOD, GTOD and TEME frames, Veis, topocentric, tnw and qsw local orbital
intermediate frames, TOD, MOD, GTOD and TEME frames, Veis, B1950, topocentric, tnw and qsw local orbital
frames, Moon, Sun, planets, solar system barycenter, Earth-Moon barycenter, ecliptic)</li>
<li>user extensible (used operationally in real time with a set of about 60 frames on several spacecraft)</li>
<li>transparent handling of IERS Earth Orientation Parameters (for both new CIO-based frames following
......@@ -219,4 +219,4 @@ FirstOrderIntegrator from the ode package.
@author Guylaine Prat
</body>
</html>
\ No newline at end of file
</html>
......@@ -81,7 +81,7 @@ The user can retrieve them using various static methods: `getGCRF()`, `getEME200
`getICRF()`, `getCIRF(IERSConventions, boolean)`, `getTIRF(IERSConventions, boolean)`,
`getITRF(IERSConventions, boolean)`, `getMOD(IERSConventions)`, `getTOD(IERSConventions)`,
`getGTOD(IERSConventions)`, `getITRFEquinox(IERSConventions, boolean)`, `getTEME()`,
and `getVeis1950()`.
`getVeis1950()` and `getB1950()`.
One of these reference frames has been arbitrarily chosen as the root of the frames tree:
the `Geocentric Celestial Reference Frame` (GCRF) which is an inertial reference defined by IERS.
......
......@@ -36,7 +36,7 @@ Features
* frames hierarchy supporting fixed and time-dependent
(or telemetry-dependent) frames
* predefined frames (EME2000/J2000, ICRF, GCRF, ITRF93, ITRF97, ITRF2000, ITRF2005, ITRF2008
and intermediate frames, TOD, MOD, GTOD and TOD frames, Veis, topocentric, tnw and qsw
and intermediate frames, TOD, MOD, GTOD and TOD frames, Veis, B1950, topocentric, tnw and qsw
local orbital frames, Moon, Sun, planets, solar system barycenter,
Earth-Moon barycenter, ecliptic)
* user extensible (used operationally in real time with a set of about 60 frames on
......
......@@ -317,6 +317,9 @@
<action dev="luc" type="add" >
Added IERS 1996 in the list of supported IERS conventions.
</action>
<action dev="luc" type="add" >
Added the B1950 inertial frame (also called M50).
</action>
<action dev="luc" type="add" >
Added factory methods to compute arbitrary Julian Epochs (J1900.0, J2000.0 ...)
and Besselian Epochs (B1900.0, B1950.0 ...) that are used as reference dates
......
/* Copyright 2002-2013 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (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.math3.geometry.euclidean.threed.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 B1950ProviderTest {
@Test
public void testISS() throws OrekitException {
// data retrieved from http://obsat.ca/Celements.htm
Frame b1950 = FramesFactory.getB1950();
AbsoluteDate t0 = new AbsoluteDate(new DateComponents(2005, 45),
new TimeComponents(12, 30, 0.0),
TimeScalesFactory.getUTC());
Transform j2000ToM50 = FramesFactory.getEME2000().getTransformTo(b1950, t0);
Transform j2000ToTDR = FramesFactory.getEME2000().getTransformTo(FramesFactory.getGTOD(false), t0);
PVCoordinates pvM50 =
new PVCoordinates(new Vector3D(6219460.30, 633395.77, -2517564.66),
new Vector3D(-2637.503224, 4893.031800, -5313.617822));
PVCoordinates pvEME2000 =
new PVCoordinates(new Vector3D(6224145.01, 702971.25, -2487339.70),
new Vector3D(-2666.209536, 4863.377216, -5326.500407));
PVCoordinates pvTDR =
new PVCoordinates(new Vector3D(5170403.10, 3537832.81, -2484286.46),
new Vector3D(-4373.891732, 2671.766349, -5327.596635));
checkPV(pvM50, j2000ToM50.transformPVCoordinates(pvEME2000), 2.5e-5, 6.9e-7);
checkPV(pvTDR, j2000ToTDR.transformPVCoordinates(pvEME2000), 2.3e-2, 4.3e-5);
}
@Before
public void setUp() {
Utils.setDataRoot("compressed-data");
}
private void checkPV(PVCoordinates reference,
PVCoordinates result,
double positionThreshold,
double velocityThreshold) {
Vector3D dP = result.getPosition().subtract(reference.getPosition());
Vector3D dV = result.getVelocity().subtract(reference.getVelocity());
Assert.assertEquals(0, dP.getNorm(), positionThreshold);
Assert.assertEquals(0, dV.getNorm(), velocityThreshold);
}
}
......@@ -105,7 +105,8 @@ public class FramesFactoryTest {
{ Predefined.MOD_CONVENTIONS_1996, Predefined.GCRF },
{ Predefined.MOD_CONVENTIONS_2003, Predefined.EME2000 },
{ Predefined.MOD_CONVENTIONS_2010, Predefined.EME2000 },
{ Predefined.TEME, Predefined.TOD_WITHOUT_EOP_CORRECTIONS }
{ Predefined.TEME, Predefined.TOD_WITHOUT_EOP_CORRECTIONS },
{ Predefined.B1950, Predefined.EME2000 }
};
for (final Predefined[] pair : reference) {
Frame child = FramesFactory.getFrame(pair[0]);
......