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: 9fc967c23752
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2f6f6bd54fe0
Choose a head ref

Commits on Jul 16, 2021

  1. Copy the full SHA
    fd0d405 View commit details

Commits on Jul 18, 2021

  1. merge

    eggrobin committed Jul 18, 2021
    Copy the full SHA
    3cbaead View commit details
  2. Log the compatibility paths

    eggrobin committed Jul 18, 2021
    Copy the full SHA
    18219d5 View commit details
  3. merge

    eggrobin committed Jul 18, 2021
    Copy the full SHA
    bc45c73 View commit details

Commits on Jul 21, 2021

  1. Copy the full SHA
    e41991f View commit details

Commits on Jul 22, 2021

  1. rename

    eggrobin committed Jul 22, 2021
    Copy the full SHA
    07410d7 View commit details

Commits on Jul 25, 2021

  1. a problem for another day

    eggrobin committed Jul 25, 2021
    Copy the full SHA
    a3d2788 View commit details
  2. number

    eggrobin committed Jul 25, 2021
    Copy the full SHA
    d253fb1 View commit details

Commits on Jul 26, 2021

  1. after pleroy’s review

    eggrobin committed Jul 26, 2021
    Copy the full SHA
    fe46775 View commit details

Commits on Jul 30, 2021

  1. review

    eggrobin committed Jul 30, 2021
    Copy the full SHA
    aa77053 View commit details

Commits on Jul 31, 2021

  1. minimal_severity_

    eggrobin committed Jul 31, 2021
    Copy the full SHA
    49fa494 View commit details
  2. Merge pull request #3076 from eggrobin/saves

    Test passage in the compatibility paths, add a save by Reach
    eggrobin authored Jul 31, 2021
    Copy the full SHA
    2594c74 View commit details

Commits on Aug 4, 2021

  1. Copy the full SHA
    f657a77 View commit details
  2. slow save

    eggrobin committed Aug 4, 2021
    Copy the full SHA
    d50b1a5 View commit details
  3. lint

    eggrobin committed Aug 4, 2021
    Copy the full SHA
    71c2bff View commit details
  4. Merge pull request #3080 from eggrobin/reach

    Do not test Reach’s save in debug
    eggrobin authored Aug 4, 2021
    Copy the full SHA
    c60a5a5 View commit details
  5. Copy the full SHA
    7ea5140 View commit details
  6. Merge pull request #3079 from pleroy/Forks

    Do not attempt to delete the prediction if it was already detached by the caller
    pleroy authored Aug 4, 2021
    Copy the full SHA
    8247365 View commit details
  7. just LOG_IF

    eggrobin committed Aug 4, 2021
    Copy the full SHA
    a6de80e View commit details
  8. missed one

    eggrobin committed Aug 4, 2021
    Copy the full SHA
    137b291 View commit details
  9. Merge pull request #3081 from eggrobin/reach

    Just LOG_IF
    eggrobin authored Aug 4, 2021
    Copy the full SHA
    9666ecb View commit details

Commits on Aug 5, 2021

  1. Support for 1.12.2.

    pleroy committed Aug 5, 2021
    Copy the full SHA
    1c37b49 View commit details
  2. Merge pull request #3082 from pleroy/1.12.2

    Support for 1.12.2
    pleroy authored Aug 5, 2021
    Copy the full SHA
    208a2ec View commit details
  3. Next release is Haar.

    pleroy committed Aug 5, 2021
    Copy the full SHA
    4cea0d5 View commit details
  4. Merge pull request #3083 from pleroy/Haar

    Next release is Haar
    pleroy authored Aug 5, 2021
    Copy the full SHA
    12d9ad3 View commit details
  5. better encapsulation

    eggrobin committed Aug 5, 2021
    Copy the full SHA
    071595d View commit details
  6. more refactoring

    eggrobin committed Aug 5, 2021
    Copy the full SHA
    9be1530 View commit details

Commits on Aug 6, 2021

  1. Fix #3074

    eggrobin committed Aug 6, 2021
    Copy the full SHA
    cb096e7 View commit details
  2. Iron out some bugs

    eggrobin committed Aug 6, 2021
    Copy the full SHA
    2420f8e View commit details
  3. centre

    eggrobin committed Aug 6, 2021
    Copy the full SHA
    b6be713 View commit details
  4. Merge pull request #3084 from eggrobin/3074

    Avoid Earth-specific terms for apsides in the Chinese translation
    eggrobin authored Aug 6, 2021
    Copy the full SHA
    38624b0 View commit details
  5. A new UI

    eggrobin committed Aug 6, 2021
    Copy the full SHA
    16c31c4 View commit details
  6. spacing tweaks, words

    eggrobin committed Aug 6, 2021
    Copy the full SHA
    bd8e8da View commit details

Commits on Aug 7, 2021

  1. style

    eggrobin committed Aug 7, 2021
    Copy the full SHA
    36fe477 View commit details
  2. pinning

    eggrobin committed Aug 7, 2021
    Copy the full SHA
    b4999e1 View commit details
  3. not making the button green

    eggrobin committed Aug 7, 2021
    Copy the full SHA
    02f9ab9 View commit details

Commits on Aug 8, 2021

  1. tooltips

    eggrobin committed Aug 8, 2021
    Copy the full SHA
    4594544 View commit details
  2. height

    eggrobin committed Aug 8, 2021
    Copy the full SHA
    39402bc View commit details
  3. drop the in-window tooltip

    eggrobin committed Aug 8, 2021
    Copy the full SHA
    a5feb4b View commit details
  4. Copy the full SHA
    6a0b9f7 View commit details
  5. Announce Grothendieck

    pleroy authored Aug 8, 2021
    Copy the full SHA
    6d5759a View commit details
  6. delay

    eggrobin committed Aug 8, 2021
    Copy the full SHA
    f068e33 View commit details
  7. delay

    eggrobin committed Aug 8, 2021
    Copy the full SHA
    f71742d View commit details
  8. after pleroy’s review

    eggrobin committed Aug 8, 2021
    Copy the full SHA
    0aaccc3 View commit details
  9. Merge pull request #3085 from eggrobin/refactor-frame-selector-api

    Refactor the ReferenceFrameSelector API
    eggrobin authored Aug 8, 2021
    Copy the full SHA
    ca535f3 View commit details
  10. Merge pull request #3086 from eggrobin/tooltip

    Add support for tooltips popping up near the pointer
    eggrobin authored Aug 8, 2021
    Copy the full SHA
    5661950 View commit details
  11. Copy the full SHA
    9d962e9 View commit details
  12. missing localization

    eggrobin committed Aug 8, 2021
    Copy the full SHA
    443e6cb View commit details

Commits on Aug 9, 2021

  1. after pleroy’s review

    eggrobin committed Aug 9, 2021
    Copy the full SHA
    06141ca View commit details
  2. Merge pull request #3087 from eggrobin/frame-selector-ui

    Overhaul the frame selector UI
    eggrobin authored Aug 9, 2021
    Copy the full SHA
    d93197e View commit details
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Principia

**[Grossmann](https://github.com/mockingbirdnest/Principia/wiki/Change-Log#grossmann), the July version of Principia, is available, with bug fixes. Download it [here for 1.8.1, 1.9.1, 1.10.1, 1.11.0, 1.11.1, and 1.11.2](https://bit.ly/2Ux2qfC).**
**[Grothendieck](https://github.com/mockingbirdnest/Principia/wiki/Change-Log#grothendieck), the August version of Principia, is available, with support for 1.12.2. Download it [here for 1.8.1, 1.9.1, 1.10.1, 1.11.0, 1.11.1, 1.11.2, and 1.12.2](https://bit.ly/3AnF2Rr).**

**For the convenience of Chinese users, downloads from 腾讯微云: [Principia Grossmann for 1.8.1—1.11.2](https://share.weiyun.com/vg1lo3Ma), [Trappist-1 for Principia](https://share.weiyun.com/5wVtWYQ).**
**For the convenience of Chinese users, downloads from 腾讯微云: [Principia Grothendieck for 1.8.1—1.12.2](https://share.weiyun.com/VjHh6N5Z), [Trappist-1 for Principia](https://share.weiyun.com/5wVtWYQ).**

Principia is a mod for Kerbal Space Program (KSP) which implements N-body and extended body gravitation. Instead of being within the sphere of influence of a single celestial body at any point in time, your vessels are influenced by all the celestials. This makes it possible to implement missions that are more complex and more realistic than in the stock game, especially if used in conjunction with a mod like RealSolarSystem which has real-life celestials.

@@ -18,4 +18,4 @@ The [change log](https://github.com/mockingbirdnest/Principia/wiki/Change-Log) g

Principia is released on every [new moon](https://en.wikipedia.org/wiki/New_moon) with whatever features and bug fixes are ready at the time. This ensures relatively timely improvements and bug fixes.

Download the binary (Ubuntu, macOS, and Windows) [here for 1.8.1, 1.9.1, 1.10.1, 1.11.0, 1.11.1, and 1.11.2](https://bit.ly/2Ux2qfC). Download the [“Trappist-1 for Principia”](https://github.com/mockingbirdnest/Principia/wiki/Installing,-reporting-bugs,-and-frequently-asked-questions#installing-trappist-1-for-principia) mini-mod [here](https://bit.ly/2ZHf3Tt). Or, if you don't trust our binary, [build the mod](https://github.com/mockingbirdnest/Principia/blob/master/documentation/Setup.md) from the [Grossmann](https://github.com/mockingbirdnest/Principia/releases/tag/2021071001-Grossmann) release.
Download the binary (Ubuntu, macOS, and Windows) [here for 1.8.1, 1.9.1, 1.10.1, 1.11.0, 1.11.1, 1.11.2, and 1.12.2](https://bit.ly/3AnF2Rr). Download the [“Trappist-1 for Principia”](https://github.com/mockingbirdnest/Principia/wiki/Installing,-reporting-bugs,-and-frequently-asked-questions#installing-trappist-1-for-principia) mini-mod [here](https://bit.ly/2ZHf3Tt). Or, if you don't trust our binary, [build the mod](https://github.com/mockingbirdnest/Principia/blob/master/documentation/Setup.md) from the [Grothendieck](https://github.com/mockingbirdnest/Principia/releases/tag/2021080814-Grothendieck) release.
15 changes: 0 additions & 15 deletions base/macros.hpp
Original file line number Diff line number Diff line change
@@ -241,20 +241,5 @@ template_and_result declared_name parameters; \
} \
using internal_##package_name::declared_name

#define LOG_IF_EVERY(severity, Δt, condition) \
static std::optional<std::chrono::steady_clock::time_point> \
LOG_EVERY_N_VARNAME(last_log_time, __LINE__); \
bool const LOG_EVERY_N_VARNAME(Δt_elapsed, __LINE__) = \
!LOG_EVERY_N_VARNAME(last_log_time, __LINE__).has_value() || \
(std::chrono::steady_clock::now() - \
*LOG_EVERY_N_VARNAME(last_log_time, __LINE__)) >= (Δt); \
LOG_IF(severity, (condition) && LOG_EVERY_N_VARNAME(Δt_elapsed, __LINE__)) \
<< (LOG_EVERY_N_VARNAME(last_log_time, __LINE__) = \
std::chrono::steady_clock::now(), \
"")

#define LOG_IF_EVERY_SECOND(severity, condition) \
LOG_IF_EVERY(severity, std::chrono::seconds(1), (condition))

} // namespace base
} // namespace principia
13 changes: 13 additions & 0 deletions documentation/bibliography.bib
Original file line number Diff line number Diff line change
@@ -775,6 +775,19 @@ @article{Halley1694
volume = {18},
}

@article{HéHuángZhāng2012,
author = {\chinese{何志洲} and \chinese{黄乘利} and \chinese{张冕}},
shortauthor = {Hé, Zhì Zhōu and Huáng, Chéng Lì and Zhāng, Miǎn},
date = {2012-05},
eprint = {TWJZ201202007},
eprinttype = {cnki},
journaltitle = {\chinese{天文学进展}---Progress in Astronomy},
number = {2},
pages = {220--235},
title = {\chinese{火星重力场模型发展回顾及对萤火一号的展望}---On the Mars Gravity Field Models and Prospects of ``Yinhuo-1'' Mission},
volume = {30},
}

@article{Householder1968,
author = {Householder, Alston Scott},
date = {1968-01},
Binary file modified documentation/bibliography.pdf
Binary file not shown.
3 changes: 1 addition & 2 deletions geometry/orthogonal_map_body.hpp
Original file line number Diff line number Diff line change
@@ -106,8 +106,7 @@ OrthogonalMap<FromFrame, ToFrame>
OrthogonalMap<FromFrame, ToFrame>::ReadFromMessage(
serialization::OrthogonalMap const& message) {
bool const is_pre_frege = message.has_rotation();
LOG_IF_EVERY_SECOND(WARNING, is_pre_frege)
<< "Reading pre-Frege OrthogonalMap";
LOG_IF(WARNING, is_pre_frege) << "Reading pre-Frege OrthogonalMap";
return OrthogonalMap(
is_pre_frege
? Quaternion::ReadFromMessage(message.rotation().quaternion())
4 changes: 2 additions & 2 deletions integrators/integrators_body.hpp
Original file line number Diff line number Diff line change
@@ -565,7 +565,7 @@ AdaptiveStepSizeIntegrator<ODE_>::Parameters::ReadFromMessage(
serialization::AdaptiveStepSizeIntegratorInstance::Parameters const&
message) {
bool const is_pre_cartan = !message.has_last_step_is_exact();
LOG_IF_EVERY_SECOND(WARNING, is_pre_cartan)
LOG_IF(WARNING, is_pre_cartan)
<< "Reading pre-Cartan AdaptiveStepSizeIntegrator";
Parameters result(Time::ReadFromMessage(message.first_time_step()),
message.safety_factor(),
@@ -638,7 +638,7 @@ AdaptiveStepSizeIntegrator<ODE_>::Instance::ReadFromMessage(
auto const& extension = message.GetExtension(
serialization::AdaptiveStepSizeIntegratorInstance::extension);
bool const is_pre_cartan = !extension.has_time_step();
LOG_IF_EVERY_SECOND(WARNING, is_pre_cartan)
LOG_IF(WARNING, is_pre_cartan)
<< "Reading pre-Cartan AdaptiveStepSizeIntegrator Instance";

auto const parameters =
3 changes: 1 addition & 2 deletions ksp_plugin/flight_plan.cpp
Original file line number Diff line number Diff line change
@@ -264,8 +264,7 @@ std::unique_ptr<FlightPlan> FlightPlan::ReadFromMessage(

bool const is_pre_erdős =
!message.has_generalized_adaptive_step_parameters();
LOG_IF_EVERY_SECOND(WARNING, is_pre_erdős)
<< u8"Reading pre-Erdős FlightPlan";
LOG_IF(WARNING, is_pre_erdős) << u8"Reading pre-Erdős FlightPlan";
std::unique_ptr<Ephemeris<Barycentric>::GeneralizedAdaptiveStepParameters>
generalized_adaptive_step_parameters;
if (is_pre_erdős) {
11 changes: 5 additions & 6 deletions ksp_plugin/part.cpp
Original file line number Diff line number Diff line change
@@ -267,12 +267,11 @@ not_null<std::unique_ptr<Part>> Part::ReadFromMessage(
is_pre_fréchet || (message.has_pre_frenet_inertia_tensor() &&
!message.has_intrinsic_torque());
bool const is_pre_galileo = !message.has_centre_of_mass();
LOG_IF_EVERY_SECOND(WARNING, is_pre_galileo)
<< "Reading pre-"
<< (is_pre_cesàro ? u8"Cesàro"
: is_pre_fréchet ? u8"Fréchet"
: is_pre_frenet ? "Frenet"
: "Galileo") << " Part";
LOG_IF(WARNING, is_pre_galileo) << "Reading pre-"
<< (is_pre_cesàro ? u8"Cesàro"
: is_pre_fréchet ? u8"Fréchet"
: is_pre_frenet ? "Frenet"
: "Galileo") << " Part";

std::unique_ptr<Part> part;
if (is_pre_fréchet) {
2 changes: 1 addition & 1 deletion ksp_plugin/pile_up.cpp
Original file line number Diff line number Diff line change
@@ -218,7 +218,7 @@ not_null<std::unique_ptr<PileUp>> PileUp::ReadFromMessage(
message.apparent_part_degrees_of_freedom_size() > 0;
bool const is_pre_frobenius = message.rigid_pile_up().empty() ||
!message.has_angular_momentum();
LOG_IF_EVERY_SECOND(WARNING, is_pre_frobenius)
LOG_IF(WARNING, is_pre_frobenius)
<< "Reading pre-"
<< (is_pre_cartan ? "Cartan"
: is_pre_cesàro ? u8"Cesàro"
5 changes: 2 additions & 3 deletions ksp_plugin/plugin.cpp
Original file line number Diff line number Diff line change
@@ -1459,7 +1459,7 @@ not_null<std::unique_ptr<Plugin>> Plugin::ReadFromMessage(
plugin->UpdatePlanetariumRotation();

bool const is_pre_cauchy = message.has_pre_cauchy_plotting_frame();
LOG_IF_EVERY_SECOND(WARNING, is_pre_cauchy) << "Reading pre-Cauchy Plugin";
LOG_IF(WARNING, is_pre_cauchy) << "Reading pre-Cauchy Plugin";

if (is_pre_cauchy) {
plugin->renderer_ =
@@ -1585,8 +1585,7 @@ void Plugin::ReadCelestialsFromMessages(
int index = 0;
for (auto const& celestial_message : celestial_messages) {
bool const is_pre_cauchy = !celestial_message.has_ephemeris_index();
LOG_IF_EVERY_SECOND(WARNING, is_pre_cauchy)
<< "Reading pre-Cauchy Celestial";
LOG_IF(WARNING, is_pre_cauchy) << "Reading pre-Cauchy Celestial";

auto const& body = is_pre_cauchy
? bodies[index++]
7 changes: 5 additions & 2 deletions ksp_plugin/vessel.cpp
Original file line number Diff line number Diff line change
@@ -250,6 +250,7 @@ void Vessel::AdvanceTime() {
// Squirrel away the prediction so that we can reattach it if we don't have a
// prognostication.
auto prediction = prediction_->DetachFork();
prediction_ = nullptr;

// Read the wall of text below and realize that this can happen for the
// history as well as the psychohistory, if the history of the part was
@@ -466,7 +467,7 @@ not_null<std::unique_ptr<Vessel>> Vessel::ReadFromMessage(
!message.history().has_downsampling();
// TODO(phl): Decide in which version it goes.
bool const is_pre_grothendieck_haar = !message.has_prehistory();
LOG_IF_EVERY_SECOND(WARNING, is_pre_grothendieck_haar)
LOG_IF(WARNING, is_pre_grothendieck_haar)
<< "Reading pre-"
<< (is_pre_cesàro ? u8"Cesàro"
: is_pre_chasles ? "Chasles"
@@ -688,7 +689,9 @@ void Vessel::AttachPrediction(
if (trajectory->Empty()) {
prediction_ = psychohistory_->NewForkAtLast();
} else {
psychohistory_->DeleteFork(prediction_);
if (prediction_ != nullptr) {
psychohistory_->DeleteFork(prediction_);
}
prediction_ = trajectory.get();
psychohistory_->AttachFork(std::move(trajectory));
}
2 changes: 1 addition & 1 deletion ksp_plugin/vessel.hpp
Original file line number Diff line number Diff line change
@@ -245,7 +245,7 @@ class Vessel {
DiscreteTrajectory<Barycentric>& trajectory);

// Attaches the given |trajectory| to the end of the |psychohistory_| to
// become the new |prediction_|.
// become the new |prediction_|. If |prediction_| is not null, it is deleted.
void AttachPrediction(
not_null<std::unique_ptr<DiscreteTrajectory<Barycentric>>> trajectory);

3 changes: 2 additions & 1 deletion ksp_plugin_adapter/burn_editor.cs
Original file line number Diff line number Diff line change
@@ -220,7 +220,8 @@ public Burn Burn() {
};
}

public void ReferenceFrameChanged(NavigationFrameParameters parameters) {
public void ReferenceFrameChanged(NavigationFrameParameters? parameters,
Vessel target_vessel) {
changed_reference_frame_ = true;
}

2 changes: 1 addition & 1 deletion ksp_plugin_adapter/gl_lines.cs
Original file line number Diff line number Diff line change
@@ -152,7 +152,7 @@ private static UnityEngine.Material line_material {
get {
if (line_material_ == null) {
line_material_ = new UnityEngine.Material(
#if KSP_VERSION_1_11_2
#if KSP_VERSION_1_12_2
UnityEngine.Shader.Find("KSP/Particles/Additive"));
#elif KSP_VERSION_1_7_3
UnityEngine.Shader.Find("Particles/Additive"));
Loading