Skip to content

Commit

Permalink
Update MechJebLib copyright headers
Browse files Browse the repository at this point in the history
This utilizes the SPDX-License-Identifier to be more permissive and
legally clear and extend the license under MechJebLib.

It follows https://cr.yp.to/publicdomain.html in order to place the
work under the public domain.

The other licenses are also included to satisfy license checkers and
to provide a deliberate fallback for any concerns over the public
domain declaration.  Worst case this should be equivalent to dual
licensing under 0BSD and LGPL2.1+.

The License Identifier also clears up my poor wording using "and" under
the dual license when the intent was to make it at the choice of the
user, not to have both always applied (which doesn't make any sense to
me which is why I didn't think it needed any clarification)

This work is hereby placed into the public domain.

Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
  • Loading branch information
lamont-granquist committed May 27, 2023
1 parent b5d28ac commit 34a9667
Show file tree
Hide file tree
Showing 58 changed files with 221 additions and 608 deletions.
361 changes: 0 additions & 361 deletions GPLv2-LICENSE.md

This file was deleted.

14 changes: 0 additions & 14 deletions MIT-LICENSE.md

This file was deleted.

5 changes: 2 additions & 3 deletions MechJeb2/MechJebLib/Control/PIDLoop.cs
@@ -1,7 +1,6 @@
/*
* Copyright Lamont Granquist (lamont@scriptkiddie.org)
* Dual licensed under the MIT (MIT-LICENSE) license
* and GPLv2 (GPLv2-LICENSE) license or any later version.
* Copyright Lamont Granquist, Sebastien Gaggini and the MechJeb contributors
* SPDX-License-Identifier: LicenseRef-PD-hp OR Unlicense OR CC0-1.0 OR 0BSD OR MIT-0 OR MIT OR LGPL-2.1+
*/

using System;
Expand Down
2 changes: 1 addition & 1 deletion MechJeb2/MechJebLib/Core/Bisection.cs
@@ -1,6 +1,6 @@
/*
* Copyright Lamont Granquist, Sebastien Gaggini and the MechJeb contributors
* SPDX-License-Identifier: MIT-0 OR LGPL-2.1+ OR CC0-1.0
* SPDX-License-Identifier: LicenseRef-PD-hp OR Unlicense OR CC0-1.0 OR 0BSD OR MIT-0 OR MIT OR LGPL-2.1+
*/

#nullable enable
Expand Down
5 changes: 2 additions & 3 deletions MechJeb2/MechJebLib/Core/BrentMin.cs
@@ -1,7 +1,6 @@
/*
* Copyright Lamont Granquist (lamont@scriptkiddie.org)
* Dual licensed under the MIT (MIT-LICENSE) license
* and GPLv2 (GPLv2-LICENSE) license or any later version.
* Copyright Lamont Granquist, Sebastien Gaggini and the MechJeb contributors
* SPDX-License-Identifier: LicenseRef-PD-hp OR Unlicense OR CC0-1.0 OR 0BSD OR MIT-0 OR MIT OR LGPL-2.1+
*/

using System;
Expand Down
2 changes: 1 addition & 1 deletion MechJeb2/MechJebLib/Core/BrentRoot.cs
@@ -1,6 +1,6 @@
/*
* Copyright Lamont Granquist, Sebastien Gaggini and the MechJeb contributors
* SPDX-License-Identifier: MIT-0 OR LGPL-2.1+ OR CC0-1.0
* SPDX-License-Identifier: LicenseRef-PD-hp OR Unlicense OR CC0-1.0 OR 0BSD OR MIT-0 OR MIT OR LGPL-2.1+
*/

#nullable enable
Expand Down
@@ -1,7 +1,6 @@
/*
* Copyright Lamont Granquist (lamont@scriptkiddie.org)
* Dual licensed under the MIT (MIT-LICENSE) license
* and GPLv2 (GPLv2-LICENSE) license or any later version.
* Copyright Lamont Granquist, Sebastien Gaggini and the MechJeb contributors
* SPDX-License-Identifier: LicenseRef-PD-hp OR Unlicense OR CC0-1.0 OR 0BSD OR MIT-0 OR MIT OR LGPL-2.1+
*/

#nullable enable
Expand Down
@@ -1,8 +1,6 @@
/*
* Copyright Lamont Granquist (lamont@scriptkiddie.org)
* Copyright Sebastien Gaggini (sebastien.gaggini@gmail.com)
* Dual licensed under the MIT (MIT-LICENSE) license
* and GPLv2 (GPLv2-LICENSE) license or any later version.
* Copyright Lamont Granquist, Sebastien Gaggini and the MechJeb contributors
* SPDX-License-Identifier: LicenseRef-PD-hp OR Unlicense OR CC0-1.0 OR 0BSD OR MIT-0 OR MIT OR LGPL-2.1+
*/

using System;
Expand Down
7 changes: 4 additions & 3 deletions MechJeb2/MechJebLib/Core/Functions/Angles.cs
@@ -1,7 +1,6 @@
/*
* Copyright Lamont Granquist (lamont@scriptkiddie.org)
* Dual licensed under the MIT (MIT-LICENSE) license
* and GPLv2 (GPLv2-LICENSE) license or any later version.
* Copyright Lamont Granquist, Sebastien Gaggini and the MechJeb contributors
* SPDX-License-Identifier: LicenseRef-PD-hp OR Unlicense OR CC0-1.0 OR 0BSD OR MIT-0 OR MIT OR LGPL-2.1+
*/

using System;
Expand All @@ -10,6 +9,8 @@
using MechJebLib.Utils;
using static MechJebLib.Utils.Statics;

#nullable enable

// ReSharper disable InconsistentNaming
namespace MechJebLib.Core.Functions
{
Expand Down
7 changes: 4 additions & 3 deletions MechJeb2/MechJebLib/Core/Functions/Interpolants.cs
@@ -1,9 +1,10 @@
/*
* Copyright Lamont Granquist (lamont@scriptkiddie.org)
* Dual licensed under the MIT (MIT-LICENSE) license
* and GPLv2 (GPLv2-LICENSE) license or any later version.
* Copyright Lamont Granquist, Sebastien Gaggini and the MechJeb contributors
* SPDX-License-Identifier: LicenseRef-PD-hp OR Unlicense OR CC0-1.0 OR 0BSD OR MIT-0 OR MIT OR LGPL-2.1+
*/

#nullable enable

using System.Collections.Generic;
using MechJebLib.Primitives;

Expand Down
7 changes: 4 additions & 3 deletions MechJeb2/MechJebLib/Core/Functions/Maneuvers.cs
@@ -1,9 +1,10 @@
/*
* Copyright Lamont Granquist (lamont@scriptkiddie.org)
* Dual licensed under the MIT (MIT-LICENSE) license
* and GPLv2 (GPLv2-LICENSE) license or any later version.
* Copyright Lamont Granquist, Sebastien Gaggini and the MechJeb contributors
* SPDX-License-Identifier: LicenseRef-PD-hp OR Unlicense OR CC0-1.0 OR 0BSD OR MIT-0 OR MIT OR LGPL-2.1+
*/

#nullable enable

using MechJebLib.Core.TwoBody;
using MechJebLib.Primitives;
using MechJebLib.Utils;
Expand Down
6 changes: 2 additions & 4 deletions MechJeb2/MechJebLib/Core/Gooding.cs
@@ -1,8 +1,6 @@
/*
* Copyright Lamont Granquist (lamont@scriptkiddie.org)
* Copyright Sebastien Gaggini (sebastien.gaggini@gmail.com)
* Dual licensed under the MIT (MIT-LICENSE) license
* and GPLv2 (GPLv2-LICENSE) license or any later version.
* Copyright Lamont Granquist, Sebastien Gaggini and the MechJeb contributors
* SPDX-License-Identifier: LicenseRef-PD-hp OR Unlicense OR CC0-1.0 OR 0BSD OR MIT-0 OR MIT OR LGPL-2.1+
*/

using System;
Expand Down
5 changes: 2 additions & 3 deletions MechJeb2/MechJebLib/Core/Maths.cs
@@ -1,7 +1,6 @@
/*
* Copyright Lamont Granquist (lamont@scriptkiddie.org)
* Dual licensed under the MIT (MIT-LICENSE) license
* and GPLv2 (GPLv2-LICENSE) license or any later version.
* Copyright Lamont Granquist, Sebastien Gaggini and the MechJeb contributors
* SPDX-License-Identifier: LicenseRef-PD-hp OR Unlicense OR CC0-1.0 OR 0BSD OR MIT-0 OR MIT OR LGPL-2.1+
*/

using System;
Expand Down
2 changes: 1 addition & 1 deletion MechJeb2/MechJebLib/Core/ODE/AbstractIVP.cs
@@ -1,6 +1,6 @@
/*
* Copyright Lamont Granquist, Sebastien Gaggini and the MechJeb contributors
* SPDX-License-Identifier: MIT-0 OR LGPL-2.1+ OR CC0-1.0
* SPDX-License-Identifier: LicenseRef-PD-hp OR Unlicense OR CC0-1.0 OR 0BSD OR MIT-0 OR MIT OR LGPL-2.1+
*/

using System;
Expand Down
2 changes: 1 addition & 1 deletion MechJeb2/MechJebLib/Core/ODE/AbstractRungeKutta.cs
@@ -1,6 +1,6 @@
/*
* Copyright Lamont Granquist, Sebastien Gaggini and the MechJeb contributors
* SPDX-License-Identifier: MIT-0 OR LGPL-2.1+ OR CC0-1.0
* SPDX-License-Identifier: LicenseRef-PD-hp OR Unlicense OR CC0-1.0 OR 0BSD OR MIT-0 OR MIT OR LGPL-2.1+
*/

#nullable enable
Expand Down
2 changes: 1 addition & 1 deletion MechJeb2/MechJebLib/Core/ODE/BS3.cs
@@ -1,6 +1,6 @@
/*
* Copyright Lamont Granquist, Sebastien Gaggini and the MechJeb contributors
* SPDX-License-Identifier: MIT-0 OR LGPL-2.1+ OR CC0-1.0
* SPDX-License-Identifier: LicenseRef-PD-hp OR Unlicense OR CC0-1.0 OR 0BSD OR MIT-0 OR MIT OR LGPL-2.1+
*/

#nullable enable
Expand Down
2 changes: 1 addition & 1 deletion MechJeb2/MechJebLib/Core/ODE/DP5.cs
@@ -1,6 +1,6 @@
/*
* Copyright Lamont Granquist, Sebastien Gaggini and the MechJeb contributors
* SPDX-License-Identifier: MIT-0 OR LGPL-2.1+ OR CC0-1.0
* SPDX-License-Identifier: LicenseRef-PD-hp OR Unlicense OR CC0-1.0 OR 0BSD OR MIT-0 OR MIT OR LGPL-2.1+
*/

#nullable enable
Expand Down
7 changes: 6 additions & 1 deletion MechJeb2/MechJebLib/Core/ODE/Event.cs
@@ -1,4 +1,9 @@
#nullable enable
/*
* Copyright Lamont Granquist, Sebastien Gaggini and the MechJeb contributors
* SPDX-License-Identifier: LicenseRef-PD-hp OR Unlicense OR CC0-1.0 OR 0BSD OR MIT-0 OR MIT OR LGPL-2.1+
*/

#nullable enable

using System;
using System.Collections.Generic;
Expand Down
5 changes: 2 additions & 3 deletions MechJeb2/MechJebLib/Core/TwoBody/Farnocchia.cs
@@ -1,7 +1,6 @@
/*
* Copyright Lamont Granquist (lamont@scriptkiddie.org)
* Dual licensed under the MIT (MIT-LICENSE) license
* and GPLv2 (GPLv2-LICENSE) license or any later version.
* Copyright Lamont Granquist, Sebastien Gaggini and the MechJeb contributors
* SPDX-License-Identifier: LicenseRef-PD-hp OR Unlicense OR CC0-1.0 OR 0BSD OR MIT-0 OR MIT OR LGPL-2.1+
*/

#nullable enable
Expand Down
9 changes: 8 additions & 1 deletion MechJeb2/MechJebLib/Core/TwoBody/Shepperd.cs
@@ -1,6 +1,13 @@
using System;
/*
* Copyright Lamont Granquist, Sebastien Gaggini and the MechJeb contributors
* SPDX-License-Identifier: LicenseRef-PD-hp OR Unlicense OR CC0-1.0 OR 0BSD OR MIT-0 OR MIT OR LGPL-2.1+
*/

using System;
using MechJebLib.Primitives;

#nullable enable

namespace MechJebLib.Core.TwoBody
{
public static class Shepperd
Expand Down
7 changes: 7 additions & 0 deletions MechJeb2/MechJebLib/Maneuvers/ChangeOrbitalElement.cs
@@ -1,7 +1,14 @@
/*
* Copyright Lamont Granquist, Sebastien Gaggini and the MechJeb contributors
* SPDX-License-Identifier: LicenseRef-PD-hp OR Unlicense OR CC0-1.0 OR 0BSD OR MIT-0 OR MIT OR LGPL-2.1+
*/

using System;
using MechJebLib.Primitives;
using static MechJebLib.Utils.Statics;

#nullable enable

namespace MechJebLib.Maneuvers
{
public static class ChangeOrbitalElement
Expand Down
7 changes: 7 additions & 0 deletions MechJeb2/MechJebLib/Maneuvers/ReturnFromMoon.cs
@@ -1,9 +1,16 @@
/*
* Copyright Lamont Granquist, Sebastien Gaggini and the MechJeb contributors
* SPDX-License-Identifier: LicenseRef-PD-hp OR Unlicense OR CC0-1.0 OR 0BSD OR MIT-0 OR MIT OR LGPL-2.1+
*/

using System;
using JetBrains.Annotations;
using MechJebLib.Core.TwoBody;
using MechJebLib.Primitives;
using MechJebLib.Utils;

#nullable enable

namespace MechJebLib.Maneuvers
{
public static class ReturnFromMoon
Expand Down
7 changes: 3 additions & 4 deletions MechJeb2/MechJebLib/PVG/ArrayWrapper.cs
@@ -1,7 +1,6 @@
/*
* Copyright Lamont Granquist (lamont@scriptkiddie.org)
* Dual licensed under the MIT (MIT-LICENSE) license
* and GPLv2 (GPLv2-LICENSE) license or any later version.
* Copyright Lamont Granquist, Sebastien Gaggini and the MechJeb contributors
* SPDX-License-Identifier: LicenseRef-PD-hp OR Unlicense OR CC0-1.0 OR 0BSD OR MIT-0 OR MIT OR LGPL-2.1+
*/

#nullable enable
Expand Down Expand Up @@ -213,7 +212,7 @@ public void Dispose()

public static void Clear(ArrayWrapper obj)
{

}
}
}
5 changes: 2 additions & 3 deletions MechJeb2/MechJebLib/PVG/Ascent.cs
@@ -1,7 +1,6 @@
/*
* Copyright Lamont Granquist (lamont@scriptkiddie.org)
* Dual licensed under the MIT (MIT-LICENSE) license
* and GPLv2 (GPLv2-LICENSE) license or any later version.
* Copyright Lamont Granquist, Sebastien Gaggini and the MechJeb contributors
* SPDX-License-Identifier: LicenseRef-PD-hp OR Unlicense OR CC0-1.0 OR 0BSD OR MIT-0 OR MIT OR LGPL-2.1+
*/

#nullable enable
Expand Down
37 changes: 18 additions & 19 deletions MechJeb2/MechJebLib/PVG/AscentBuilder.cs
@@ -1,7 +1,6 @@
/*
* Copyright Lamont Granquist (lamont@scriptkiddie.org)
* Dual licensed under the MIT (MIT-LICENSE) license
* and GPLv2 (GPLv2-LICENSE) license or any later version.
* Copyright Lamont Granquist, Sebastien Gaggini and the MechJeb contributors
* SPDX-License-Identifier: LicenseRef-PD-hp OR Unlicense OR CC0-1.0 OR 0BSD OR MIT-0 OR MIT OR LGPL-2.1+
*/

using System.Collections.Generic;
Expand All @@ -18,7 +17,7 @@ public partial class Ascent
public class AscentBuilder
{
public readonly List<Phase> _phases = new List<Phase>();

public V3 _r0 { get; private set; }
public V3 _v0 { get; private set; }
public V3 _u0 { get; private set; }
Expand All @@ -38,57 +37,57 @@ public class AscentBuilder
public int _optimizedPhase { get; private set; }
public int _optimizedCoastPhase { get; private set; } = -1;
public Solution? _solution { get; private set; }


public AscentBuilder AddStageUsingFinalMass(double m0, double mf, double isp, double bt, int kspStage, bool optimizeTime = false, bool unguided = false)
{
Log($"[MechJebLib.AscentBuilder] AddStageUsingFinalMass({m0}, {mf}, {isp}, {bt}, {kspStage}, {(optimizeTime?"true":"false")}, {(unguided?"true":"false")})");

_phases.Add(Phase.NewStageUsingFinalMass(m0, mf, isp, bt, kspStage, optimizeTime, unguided));
if (optimizeTime)
_optimizedPhase = _phases.Count - 1;

return this;
}

public AscentBuilder AddStageUsingThrust(double m0, double thrust, double isp, double bt, int kspStage, bool optimizeTime = false, bool unguided = false)
{
Log($"[MechJebLib.AscentBuilder] AddStageUsingThrust({m0}, {thrust}, {isp}, {bt}, {kspStage}, {(optimizeTime?"true":"false")}, {(unguided?"true":"false")})");

_phases.Add(Phase.NewStageUsingThrust(m0, thrust, isp, bt, kspStage, optimizeTime, unguided));
if (optimizeTime)
_optimizedPhase = _phases.Count - 1;

return this;
}

public AscentBuilder AddFixedCoast(double m0, double ct, int kspStage)
{
Log($"[MechJebLib.AscentBuilder] AddFixedCoast({m0}, {ct}, {kspStage})");

_phases.Add(Phase.NewFixedCoast(m0, ct, kspStage));

return this;
}

public AscentBuilder AddOptimizedCoast(double m0, double mint, double maxt, int kspStage)
{
Log($"[MechJebLib.AscentBuilder] AddOptimizedCoast({m0}, {mint}, {maxt}, {kspStage})");

_phases.Add(Phase.NewOptimizedCoast(m0, mint, maxt, kspStage));
_optimizedCoastPhase = _phases.Count - 1;

return this;
}

public AscentBuilder Initial(V3 r0, V3 v0, V3 u0, double t0, double mu, double rbody)
{
Check.NonZeroFinite(r0);
Check.NonZeroFinite(v0);
Check.Finite(t0);
Check.PositiveFinite(mu);
Check.PositiveFinite(rbody);

Log($"[MechJebLib.AscentBuilder] Initial({r0}, {v0}, {u0}, {t0}, {mu}, {rbody})");
_r0 = r0;
_v0 = v0;
Expand Down
5 changes: 2 additions & 3 deletions MechJeb2/MechJebLib/PVG/Integrators/IPVGIntegrator.cs
@@ -1,7 +1,6 @@
/*
* Copyright Lamont Granquist (lamont@scriptkiddie.org)
* Dual licensed under the MIT (MIT-LICENSE) license
* and GPLv2 (GPLv2-LICENSE) license or any later version.
* Copyright Lamont Granquist, Sebastien Gaggini and the MechJeb contributors
* SPDX-License-Identifier: LicenseRef-PD-hp OR Unlicense OR CC0-1.0 OR 0BSD OR MIT-0 OR MIT OR LGPL-2.1+
*/

using MechJebLib.Primitives;
Expand Down
5 changes: 2 additions & 3 deletions MechJeb2/MechJebLib/PVG/Integrators/VacuumCoastAnalytic.cs
@@ -1,7 +1,6 @@
/*
* Copyright Lamont Granquist (lamont@scriptkiddie.org)
* Dual licensed under the MIT (MIT-LICENSE) license
* and GPLv2 (GPLv2-LICENSE) license or any later version.
* Copyright Lamont Granquist, Sebastien Gaggini and the MechJeb contributors
* SPDX-License-Identifier: LicenseRef-PD-hp OR Unlicense OR CC0-1.0 OR 0BSD OR MIT-0 OR MIT OR LGPL-2.1+
*/

#nullable enable
Expand Down

0 comments on commit 34a9667

Please sign in to comment.