Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5c398a992b85
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c1ce63eb6961
Choose a head ref
  • 14 commits
  • 8 files changed
  • 1 contributor

Commits on Feb 19, 2019

  1. SP3

    eggrobin committed Feb 19, 2019
    Copy the full SHA
    904286a View commit details
  2. Copy the full SHA
    6a15b70 View commit details

Commits on Feb 20, 2019

  1. spaghetti

    eggrobin committed Feb 20, 2019
    Copy the full SHA
    3f7dd04 View commit details

Commits on Feb 25, 2019

  1. the header

    eggrobin committed Feb 25, 2019
    Copy the full SHA
    b53395f View commit details

Commits on Feb 26, 2019

  1. EOF

    eggrobin committed Feb 26, 2019
    Copy the full SHA
    42d07ca View commit details

Commits on Feb 27, 2019

  1. dialects!

    eggrobin committed Feb 27, 2019
    Copy the full SHA
    97317e9 View commit details
  2. dialect enum

    eggrobin committed Feb 27, 2019
    Copy the full SHA
    d2bd6e8 View commit details

Commits on Mar 1, 2019

  1. what are standards

    eggrobin committed Mar 1, 2019
    Copy the full SHA
    a9149fb View commit details
  2. IDs

    eggrobin committed Mar 1, 2019
    Copy the full SHA
    087fb9b View commit details

Commits on Mar 2, 2019

  1. orbit

    eggrobin committed Mar 2, 2019
    Copy the full SHA
    28e6cb3 View commit details

Commits on Mar 4, 2019

  1. use the SP3 parser

    eggrobin committed Mar 4, 2019
    Copy the full SHA
    d503b4f View commit details
  2. ILRS products

    eggrobin committed Mar 4, 2019
    Copy the full SHA
    5b975a5 View commit details

Commits on Mar 5, 2019

  1. after pleroy's review

    eggrobin committed Mar 5, 2019
    Copy the full SHA
    c131133 View commit details
  2. Merge pull request #2085 from eggrobin/sp3

    Standard Product 3
    eggrobin authored Mar 5, 2019
    Copy the full SHA
    c1ce63e View commit details
2 changes: 2 additions & 0 deletions astronomy/astronomy.vcxproj
Original file line number Diff line number Diff line change
@@ -50,6 +50,7 @@
<ClInclude Include="date_time_body.hpp" />
<ClInclude Include="fortran_astrodynamics_toolkit.hpp" />
<ClInclude Include="solar_system_fingerprints.hpp" />
<ClInclude Include="standard_product_3.hpp" />
<ClInclude Include="stabilize_ksp.hpp" />
<ClInclude Include="stabilize_ksp_body.hpp" />
<ClInclude Include="time_scales.hpp" />
@@ -71,6 +72,7 @@
<ClCompile Include="geodesy_test.cpp" />
<ClCompile Include="lunar_orbit_test.cpp" />
<ClCompile Include="solar_system_dynamics_test.cpp" />
<ClCompile Include="standard_product_3.cpp" />
<ClCompile Include="time_scales_test.cpp" />
<ClCompile Include="lunar_eclipse_test.cpp" />
<ClCompile Include="mercury_perihelion_test.cpp" />
6 changes: 6 additions & 0 deletions astronomy/astronomy.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -165,6 +165,9 @@
<ClInclude Include="fortran_astrodynamics_toolkit_body.hpp">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="standard_product_3.hpp">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="lunar_eclipse_test.cpp">
@@ -212,5 +215,8 @@
<ClCompile Include="lunar_orbit_test.cpp">
<Filter>Test Files</Filter>
</ClCompile>
<ClCompile Include="standard_product_3.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>
109 changes: 30 additions & 79 deletions astronomy/geodesy_test.cpp
Original file line number Diff line number Diff line change
@@ -2,14 +2,15 @@
#include <limits>

#include "astronomy/frames.hpp"
#include "astronomy/standard_product_3.hpp"
#include "base/bundle.hpp"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "physics/body_surface_dynamic_frame.hpp"
#include "physics/solar_system.hpp"
#include "quantities/si.hpp"
#include "testing_utilities/numerics.hpp"
#include "testing_utilities/is_near.hpp"
#include "testing_utilities/numerics.hpp"

namespace principia {
namespace astronomy {
@@ -88,91 +89,41 @@ class GeodesyTest : public ::testing::Test {

TEST_F(GeodesyTest, LAGEOS2) {
MasslessBody lageos2;
// Initial state and expected state from the ILRS official primary analysis
// product ILRSA, see
// https://ilrs.cddis.eosdis.nasa.gov/data_and_products/products/index.html;
// see also the definition of the SP3 format
// ftp://igs.org/pub/data/format/sp3c.txt.

// ilrsa.orb.lageos2.160319.v35.sp3, headers and first record, from
// ilrsa.orb.lageos2.160319.v35.sp3, from
// ftp://cddis.gsfc.nasa.gov/pub/slr/products/orbits/lageos2/160319/.
// #cV2016 3 13 0 0 0.00000000 5040 SLR SLR08 FIT COMB
// ## 1888 0.00000000 120.00000000 57460 0.0000000000000
// + 1 L52 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
// [... Lines 4 through 12 omitted ...]
// %c L cc UTC ccc cccc cccc cccc cccc ccccc ccccc ccccc ccccc
// %c cc cc ccc ccc cccc cccc cccc cccc ccccc ccccc ccccc ccccc
// %f 0.0000000 0.000000000 0.00000000000 0.000000000000000
// [... Lines 15 through 18 omitted ...]
// %/* ilrsa.orb.lageos2.160319.v35.sp3 Reference TRF: SLRF2008
// %/* Input orbits: ASI v35, BKG v35, DGFI v35, ESA v35,
// %/* GFZ v35, GRGS v35, JCET v35, NSGF v35,
// %/* Combination details in README_CC.ilrsa
// * 2016 3 13 0 0 0.00000000
// PL52 2505.232029 -10564.815741 -5129.314404 999999.999999
// VL52 34323.584344 -10455.947225 38998.988146 999999.999999
StandardProduct3 initial_ilrsa(
SOLUTION_DIR / "astronomy" / "ilrsa.orb.lageos2.160319.v35.sp3",
StandardProduct3::Dialect::ILRSA);

constexpr Instant initial_time = "2016-03-13T00:00:00,000"_UTC;
DegreesOfFreedom<ITRS> const initial_dof_ilrsa = {
ITRS::origin + Displacement<ITRS>({ 2505.232029 * Kilo(Metre),
-10564.815741 * Kilo(Metre),
-5129.314404 * Kilo(Metre)}),
Velocity<ITRS>({ 34323.584344 * Deci(Metre) / Second,
-10455.947225 * Deci(Metre) / Second,
38998.988146 * Deci(Metre) / Second})};

// ilrsb.orb.lageos2.160319.v35.sp3, headers and first record, from
// ilrsb.orb.lageos2.160319.v35.sp3, from
// ftp://cddis.gsfc.nasa.gov/pub/slr/products/orbits/lageos2/160319/.
// #cV2016 3 13 0 0 0.00000000 5041 SLR ITRF97 FIT JCET
// ## 1888 0.00000000 120.00000000 57460 0.0000000000000
// + 1 L52 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
// [... Lines 4 through 12 omitted ...]
// %c L cc UTC ccc cccc cccc cccc cccc ccccc ccccc ccccc ccccc
// %c cc cc ccc ccc cccc cccc cccc cccc ccccc ccccc ccccc ccccc
// %f 0.0000000 0.000000000 0.00000000000 0.000000000000000
// [... Lines 15 through 18 omitted ...]
// %/* ilrsb.orb.lageos2.160319.v35.sp3 Reference TRF: SLRF2008
// %/* Input orbits: ASI v35 GRGS v35 NSGF v35 ESA v35
// %/* GFZ v35 DGFI v35 JCET v35
// %/* Combination details in README_CC.ilrsb
// * 2016 3 13 0 0 0.00000000
// PL52 2505.232038 -10564.815750 -5129.314387
// VL52 34323.584276 -10455.947218 38998.988200

DegreesOfFreedom<ITRS> const initial_dof_ilrsb = {
ITRS::origin + Displacement<ITRS>({ 2505.232038 * Kilo(Metre),
-10564.815750 * Kilo(Metre),
-5129.314387 * Kilo(Metre)}),
Velocity<ITRS>({ 34323.584276 * Deci(Metre) / Second,
-10455.947218 * Deci(Metre) / Second,
38998.988200 * Deci(Metre) / Second})};
StandardProduct3 initial_ilrsb(
SOLUTION_DIR / "astronomy" / "ilrsb.orb.lageos2.160319.v35.sp3",
StandardProduct3::Dialect::ILRSB);

// ilrsa.orb.lageos2.180804.v70.sp3, headers and first record, from
// ilrsa.orb.lageos2.180804.v70.sp3, from
// ftp://cddis.gsfc.nasa.gov/pub/slr/products/orbits/lageos2/180804/.
// #cV2018 7 29 0 0 0.00000000 5040 SLR SLR08 FIT COMB
// ## 2012 0.00000000 120.00000000 58328 0.0000000000000
// + 1 L52 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
// [... Lines 4 through 12 omitted ...]
// %c L cc UTC ccc cccc cccc cccc cccc ccccc ccccc ccccc ccccc
// %c cc cc ccc ccc cccc cccc cccc cccc ccccc ccccc ccccc ccccc
// %f 0.0000000 0.000000000 0.00000000000 0.000000000000000
// [... Lines 15 through 18 omitted ...]
// %/* ilrsa.orb.lageos2.180804.v70.sp3 Reference TRF: SLRF2008
// %/* Input orbits: ASI v70, BKG v70, DGFI v70, ESA v70,
// %/* GFZ v70, JCET v70, NSGF v70,
// %/* Combination details in README_CC.ilrsa
// * 2018 7 29 0 0 0.00000000
// PL52 -11150.750217 5070.184012 1340.324930 999999.999999
// VL52 -15231.027828 -21132.111357 -44478.560714 999999.999999
StandardProduct3 final_ilrsa(
SOLUTION_DIR / "astronomy" / "ilrsa.orb.lageos2.180804.v70.sp3",
StandardProduct3::Dialect::ILRSA);

StandardProduct3::SatelliteIdentifier const lageos2_id{
StandardProduct3::SatelliteGroup::General, 52};

CHECK_EQ(initial_ilrsa.orbit(lageos2_id).Begin().time(),
initial_ilrsb.orbit(lageos2_id).Begin().time());

Instant const initial_time = initial_ilrsa.orbit(lageos2_id).Begin().time();
DegreesOfFreedom<ITRS> const initial_dof_ilrsa =
initial_ilrsa.orbit(lageos2_id).Begin().degrees_of_freedom();

DegreesOfFreedom<ITRS> const initial_dof_ilrsb =
initial_ilrsb.orbit(lageos2_id).Begin().degrees_of_freedom();

constexpr Instant final_time = "2018-07-29T00:00:00,000"_UTC;
DegreesOfFreedom<ITRS> const expected_final_dof = {
ITRS::origin + Displacement<ITRS>({-11150.750217 * Kilo(Metre),
5070.184012 * Kilo(Metre),
1340.324930 * Kilo(Metre)}),
Velocity<ITRS>({-15231.027828 * Deci(Metre) / Second,
-21132.111357 * Deci(Metre) / Second,
-44478.560714 * Deci(Metre) / Second})};
Instant const final_time = final_ilrsa.orbit(lageos2_id).Begin().time();
DegreesOfFreedom<ITRS> const expected_final_dof =
final_ilrsa.orbit(lageos2_id).Begin().degrees_of_freedom();

ephemeris_->Prolong(final_time);

Loading