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

Commits on May 25, 2017

  1. Copy the full SHA
    6261bdc View commit details
  2. Merge pull request #1399 from pleroy/Config

    Fix a bug in the generation of the RSS config
    pleroy authored May 25, 2017
    Copy the full SHA
    0d5ebee View commit details
Showing with 8 additions and 2 deletions.
  1. +1 −1 astronomy/sol_initial_state_jd_2433282_500000000.cfg
  2. +1 −0 physics/solar_system.hpp
  3. +5 −0 physics/solar_system_body.hpp
  4. +1 −1 tools/generate_configuration.cpp
2 changes: 1 addition & 1 deletion astronomy/sol_initial_state_jd_2433282_500000000.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
principia_initial_state:NEEDS[RealSolarSystem] {
game_epoch = JD2433647.5
solar_system_epoch = -1.57788000000000000e+09 s
solar_system_epoch = JD2433282.500000000
body {
name = Ariel
x = -1.854514651748800e+08 km
1 change: 1 addition & 0 deletions physics/solar_system.hpp
Original file line number Diff line number Diff line change
@@ -47,6 +47,7 @@ class SolarSystem final {

// The time origin for the initial state.
Instant const& epoch() const;
std::string const& epoch_literal() const;

// The names of the bodies, sorted alphabetically.
std::vector<std::string> const& names() const;
5 changes: 5 additions & 0 deletions physics/solar_system_body.hpp
Original file line number Diff line number Diff line change
@@ -170,6 +170,11 @@ Instant const& SolarSystem<Frame>::epoch() const {
return epoch_;
}

template<typename Frame>
std::string const& SolarSystem<Frame>::epoch_literal() const {
return initial_state_.epoch();
}

template<typename Frame>
std::vector<std::string> const& SolarSystem<Frame>::names() const {
return names_;
2 changes: 1 addition & 1 deletion tools/generate_configuration.cpp
Original file line number Diff line number Diff line change
@@ -97,7 +97,7 @@ void GenerateConfiguration(std::string const& game_epoch,
initial_state_cfg << "principia_initial_state:NEEDS[RealSolarSystem] {\n";
initial_state_cfg << " game_epoch = " << game_epoch << "\n";
initial_state_cfg << " solar_system_epoch = "
<< solar_system.epoch() << "\n";
<< solar_system.epoch_literal() << "\n";
for (std::string const& name : solar_system.names()) {
serialization::InitialState::Cartesian::Body const& body =
solar_system.cartesian_initial_state_message(name);