use of org.orekit.utils.IERSConventions in project Orekit by CS-SI.
the class Utils method buildEOPList.
public static List<EOPEntry> buildEOPList(IERSConventions conventions, ITRFVersion version, double[][] data) throws OrekitException {
IERSConventions.NutationCorrectionConverter converter = conventions.getNutationCorrectionConverter();
final List<EOPEntry> list = new ArrayList<EOPEntry>();
for (double[] row : data) {
final AbsoluteDate date = new AbsoluteDate(new DateComponents(DateComponents.MODIFIED_JULIAN_EPOCH, (int) row[0]), TimeScalesFactory.getUTC());
final double[] nro;
final double[] equinox;
if (Double.isNaN(row[7])) {
equinox = new double[] { Constants.ARC_SECONDS_TO_RADIANS * row[5], Constants.ARC_SECONDS_TO_RADIANS * row[6] };
nro = converter.toNonRotating(date, equinox[0], equinox[1]);
} else if (Double.isNaN(row[5])) {
nro = new double[] { Constants.ARC_SECONDS_TO_RADIANS * row[7], Constants.ARC_SECONDS_TO_RADIANS * row[8] };
equinox = converter.toEquinox(date, nro[0], nro[1]);
} else {
equinox = new double[] { Constants.ARC_SECONDS_TO_RADIANS * row[5], Constants.ARC_SECONDS_TO_RADIANS * row[6] };
nro = new double[] { Constants.ARC_SECONDS_TO_RADIANS * row[7], Constants.ARC_SECONDS_TO_RADIANS * row[8] };
}
list.add(new EOPEntry((int) row[0], row[1], row[2], Constants.ARC_SECONDS_TO_RADIANS * row[3], Constants.ARC_SECONDS_TO_RADIANS * row[4], equinox[0], equinox[1], nro[0], nro[1], version));
}
return list;
}
use of org.orekit.utils.IERSConventions in project Orekit by CS-SI.
the class Utils method setLoaders.
public static void setLoaders(final IERSConventions conventions, final List<EOPEntry> eop) {
clearFactoryMaps(FramesFactory.class);
clearFactoryMaps(TimeScalesFactory.class);
FramesFactory.addEOPHistoryLoader(conventions, new EOPHistoryLoader() {
public void fillHistory(IERSConventions.NutationCorrectionConverter converter, SortedSet<EOPEntry> history) {
history.addAll(eop);
}
});
}
use of org.orekit.utils.IERSConventions in project Orekit by CS-SI.
the class TidalDisplacementTest method testIERSDisplacementNumbers.
@Test
public void testIERSDisplacementNumbers() throws OrekitException {
for (final IERSConventions conventions : IERSConventions.values()) {
// as of Orekit 9.0, supported conventions are
// IERS conventions 1996, IERS conventions 2003 and IERS conventions 2010
// and they all share the same values for anelastic Earth model
double[] hl = conventions.getNominalTidalDisplacement();
Assert.assertEquals(13, hl.length);
// h⁽⁰⁾
Assert.assertEquals(0.6078, hl[0], 1.0e-15);
// h⁽²⁾
Assert.assertEquals(-0.0006, hl[1], 1.0e-15);
// h₃
Assert.assertEquals(0.292, hl[2], 1.0e-15);
// hI diurnal
Assert.assertEquals(-0.0025, hl[3], 1.0e-15);
// hI semi-diurnal
Assert.assertEquals(-0.0022, hl[4], 1.0e-15);
// l⁽⁰⁾
Assert.assertEquals(0.0847, hl[5], 1.0e-15);
// l⁽¹⁾ diurnal
Assert.assertEquals(0.0012, hl[6], 1.0e-15);
// l⁽¹⁾ semi-diurnal
Assert.assertEquals(0.0024, hl[7], 1.0e-15);
// l⁽²⁾
Assert.assertEquals(0.0002, hl[8], 1.0e-15);
// l₃
Assert.assertEquals(0.015, hl[9], 1.0e-15);
// lI diurnal
Assert.assertEquals(-0.0007, hl[10], 1.0e-15);
// lI semi-diurnal
Assert.assertEquals(-0.0007, hl[11], 1.0e-15);
// H₀ permanent deformation amplitude
Assert.assertEquals(-0.31460, hl[12], 1.0e-15);
}
}
use of org.orekit.utils.IERSConventions in project Orekit by CS-SI.
the class EarthITU453AtmosphereRefractionTest method setUp.
@Before
public void setUp() throws Exception {
Utils.setDataRoot("regular-data:potential:tides");
IERSConventions conventions = IERSConventions.IERS_2010;
OneAxisEllipsoid earth = new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS, Constants.WGS84_EARTH_FLATTENING, FramesFactory.getITRF(conventions, true));
// Kiruna-2 (Sweden)
final GeodeticPoint kir = new GeodeticPoint(FastMath.toRadians(67.858428), FastMath.toRadians(20.966880), 385.8);
// Hartebeesthoek (South Africa)
final GeodeticPoint har = new GeodeticPoint(FastMath.toRadians(-24.110243), FastMath.toRadians(27.685308), 1415.821);
// Everest (fake station)
final GeodeticPoint eve = new GeodeticPoint(FastMath.toRadians(27.988333), FastMath.toRadians(86.991944), 8848.0);
// Dead Sea (fake station)
final GeodeticPoint des = new GeodeticPoint(FastMath.toRadians(31.500000), FastMath.toRadians(35.500000), -422.0);
// Alt0 (fake station)
final GeodeticPoint alt = new GeodeticPoint(FastMath.toRadians(31.500000), FastMath.toRadians(35.500000), 0.0);
stationk = new TopocentricFrame(earth, kir, namek);
stationh = new TopocentricFrame(earth, har, nameh);
statione = new TopocentricFrame(earth, eve, namee);
stationd = new TopocentricFrame(earth, des, named);
stationa = new TopocentricFrame(earth, alt, namea);
}
Aggregations