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: Kopernicus/Kopernicus
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7f8926c5090b
Choose a base ref
...
head repository: Kopernicus/Kopernicus
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 92c535524daa
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Apr 1, 2017

  1. Update OrbitLoader.cs

    Sigma88 authored Apr 1, 2017
    Copy the full SHA
    21d090d View commit details

Commits on Apr 5, 2017

  1. Merge pull request #164 from Sigma88/patch-6

    fix finalize orbits G
    Dorian Stoll authored Apr 5, 2017
    Copy the full SHA
    92c5355 View commit details
Showing with 1 addition and 1 deletion.
  1. +1 −1 Kopernicus/Kopernicus/Configuration/OrbitLoader.cs
2 changes: 1 addition & 1 deletion Kopernicus/Kopernicus/Configuration/OrbitLoader.cs
Original file line number Diff line number Diff line change
@@ -208,7 +208,7 @@ public static void FinalizeOrbit(CelestialBody body)
Math.Max(body.Radius * Templates.SOIMinRadiusMult, body.Radius + Templates.SOIMinAltitude));

// this is unlike stock KSP, where only the reference body's mass is used.
body.orbit.period = 2 * Math.PI * Math.Sqrt(Math.Pow(body.orbit.semiMajorAxis, 2) / 6.674E-11 * body.orbit.semiMajorAxis / (body.referenceBody.Mass + body.Mass));
body.orbit.period = 2 * Math.PI * Math.Sqrt(Math.Pow(body.orbit.semiMajorAxis, 2) / 6.67408e-11 * body.orbit.semiMajorAxis / (body.referenceBody.Mass + body.Mass));
body.orbit.meanMotion = 2 * Math.PI / body.orbit.period; // in theory this should work but I haven't tested it

if (body.orbit.eccentricity <= 1.0)