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: 755f3ec5b30a
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e56cb2619785
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on May 6, 2020

  1. Copy the full SHA
    9d41a39 View commit details

Commits on May 7, 2020

  1. Merge pull request #2558 from pleroy/Masses

    Remove a hack for the masses of the Trappist system now that we can pass UTF-8 strings across the interface
    pleroy authored May 7, 2020
    Copy the full SHA
    e56cb26 View commit details
Showing with 20 additions and 37 deletions.
  1. +8 −8 astronomy/trappist_gravity_model.cfg
  2. +10 −10 astronomy/trappist_initial_state_jd_2457000_000000000.cfg
  3. +2 −19 tools/generate_configuration.cpp
16 changes: 8 additions & 8 deletions astronomy/trappist_gravity_model.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
principia_gravity_model:NEEDS[aSLIPPIST-1] {
body {
name = Sun
gravitational_parameter = 1.18114071600000000e+10 km^3/s^2
gravitational_parameter = 0.0890 GM☉
reference_instant = JD2457000.000000000
axis_right_ascension = -89.9408 deg
axis_declination = 0.0497342 deg
@@ -10,7 +10,7 @@ principia_gravity_model:NEEDS[aSLIPPIST-1] {
}
body {
name = Trappist-1b
gravitational_parameter = 4.05376606799999950e+05 km^3/s^2
gravitational_parameter = 1.017 GM🜨
reference_instant = JD2457000.000000000
axis_right_ascension = -89.9077 deg
axis_declination = 0.0561637 deg
@@ -21,7 +21,7 @@ principia_gravity_model:NEEDS[aSLIPPIST-1] {
}
body {
name = Trappist-1c
gravitational_parameter = 4.60782062399999937e+05 km^3/s^2
gravitational_parameter = 1.156 GM🜨
reference_instant = JD2457000.000000000
axis_right_ascension = -89.9829 deg
axis_declination = 0.0787536 deg
@@ -32,7 +32,7 @@ principia_gravity_model:NEEDS[aSLIPPIST-1] {
}
body {
name = Trappist-1d
gravitational_parameter = 1.18384318799999994e+05 km^3/s^2
gravitational_parameter = 0.297 GM🜨
reference_instant = JD2457000.000000000
axis_right_ascension = -90.0387 deg
axis_declination = 0.0106394 deg
@@ -43,7 +43,7 @@ principia_gravity_model:NEEDS[aSLIPPIST-1] {
}
body {
name = Trappist-1e
gravitational_parameter = 3.07719508800000011e+05 km^3/s^2
gravitational_parameter = 0.772 GM🜨
reference_instant = JD2457000.000000000
axis_right_ascension = -89.9999 deg
axis_declination = -0.0949119 deg
@@ -54,7 +54,7 @@ principia_gravity_model:NEEDS[aSLIPPIST-1] {
}
body {
name = Trappist-1f
gravitational_parameter = 3.72292773600000015e+05 km^3/s^2
gravitational_parameter = 0.934 GM🜨
reference_instant = JD2457000.000000000
axis_right_ascension = -89.9582 deg
axis_declination = 0.0404001 deg
@@ -65,7 +65,7 @@ principia_gravity_model:NEEDS[aSLIPPIST-1] {
}
body {
name = Trappist-1g
gravitational_parameter = 4.57593259199999913e+05 km^3/s^2
gravitational_parameter = 1.148 GM🜨
reference_instant = JD2457000.000000000
axis_right_ascension = -89.9896 deg
axis_declination = 0.0367975 deg
@@ -76,7 +76,7 @@ principia_gravity_model:NEEDS[aSLIPPIST-1] {
}
body {
name = Trappist-1h
gravitational_parameter = 1.31936732400000008e+05 km^3/s^2
gravitational_parameter = 0.331 GM🜨
reference_instant = JD2457000.000000000
axis_right_ascension = -89.8993 deg
axis_declination = 0.0130609 deg
20 changes: 10 additions & 10 deletions astronomy/trappist_initial_state_jd_2457000_000000000.cfg
Original file line number Diff line number Diff line change
@@ -3,21 +3,21 @@ principia_initial_state:NEEDS[aSLIPPIST-1] {
solar_system_epoch = JD2457000.000000000
body {
name = Sun
x = +1.58550064488349977e+05 m
y = -1.06432665783408561e+03 m
x = +1.58550064488349948e+05 m
y = -1.06432665783412517e+03 m
z = -2.19218551472217747e+05 m
vx = -9.98746417254151031e-01 m s^-1
vy = +1.07512534036780984e-02 m s^-1
vz = +2.24365911639758142e+00 m s^-1
vy = +1.07512534036784211e-02 m s^-1
vz = +2.24365911639758231e+00 m s^-1
}
body {
name = Trappist-1b
x = +2.95480080493806362e+08 m
y = -1.27177987046443038e+07 m
x = +2.95480080493806183e+08 m
y = -1.27177987046437394e+07 m
z = -1.66855953806264210e+09 m
vx = +8.27535724100110237e+04 m s^-1
vy = +1.43515876391711174e+02 m s^-1
vz = +1.52058589929091158e+04 m s^-1
vy = +1.43515876391701823e+02 m s^-1
vz = +1.52058589929091104e+04 m s^-1
}
body {
name = Trappist-1c
@@ -48,8 +48,8 @@ principia_initial_state:NEEDS[aSLIPPIST-1] {
}
body {
name = Trappist-1f
x = -2.59648362915529060e+09 m
y = +2.54061548582593650e+07 m
x = -2.59648362915528965e+09 m
y = +2.54061548582600057e+07 m
z = +5.15045349321313095e+09 m
vx = -4.02357159587857896e+04 m s^-1
vy = -9.82167981336698546e+01 m s^-1
21 changes: 2 additions & 19 deletions tools/generate_configuration.cpp
Original file line number Diff line number Diff line change
@@ -105,25 +105,8 @@ void GenerateConfiguration(std::string const& game_epoch,
: name)
<< "\n";
if (body.has_gravitational_parameter()) {
// TODO(phl): We don't properly marshall non-ASCII strings in structs, so
// if the gravity model has references to the solar or terrestrial masses,
// switch to SI units.
if (body.gravitational_parameter().find_first_of(u8"☉🜨") ==
std::string::npos) {
gravity_model_cfg << " gravitational_parameter = "
<< body.gravitational_parameter() << "\n";
} else {
GravitationalParameter const gravitational_parameter =
ParseQuantity<GravitationalParameter>(
body.gravitational_parameter());
gravity_model_cfg << " gravitational_parameter = "
<< std::scientific
<< std::setprecision(
std::numeric_limits<double>::max_digits10)
<< gravitational_parameter /
(Pow<3>(Kilo(Metre)) / Pow<2>(Second))
<< " km^3/s^2\n";
}
gravity_model_cfg << " gravitational_parameter = "
<< body.gravitational_parameter() << "\n";
} else {
// If the mass was provided, convert to a gravitational parameter.
Mass const mass = ParseQuantity<Mass>(body.mass());