From 05d8e6ceda67b7b26f80e237504305e26e9c647e Mon Sep 17 00:00:00 2001 From: Nazfib Date: Tue, 15 Aug 2023 18:26:42 +0200 Subject: [PATCH 1/3] Fix build on Linux Use the msbuild copy target instead of xcopy; change file encoding to utf-8. --- LunarTransferPlanner.cs | 2 +- LunarTransferPlanner.csproj | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/LunarTransferPlanner.cs b/LunarTransferPlanner.cs index bcf3b46..67128de 100644 --- a/LunarTransferPlanner.cs +++ b/LunarTransferPlanner.cs @@ -424,7 +424,7 @@ void MakeMainWindow(int id) GUILayout.Space(4); GUILayout.Label("Launch Now Incl", GUILayout.ExpandWidth(true)); - GUILayout.Box(new GUIContent($"{(launchOrbit.azimuth > 90d ? -launchOrbit.inclination : launchOrbit.inclination):F2}°", + GUILayout.Box(new GUIContent($"{(launchOrbit.azimuth > 90d ? -launchOrbit.inclination : launchOrbit.inclination):F2}°", "Launch to this inclination now to reach a Lunar parking orbit"), GUILayout.MinWidth(100)); string tooltip = latitude >= target.orbit.inclination ? diff --git a/LunarTransferPlanner.csproj b/LunarTransferPlanner.csproj index b84d252..89b632f 100644 --- a/LunarTransferPlanner.csproj +++ b/LunarTransferPlanner.csproj @@ -84,14 +84,15 @@ - - xcopy /y "$(TargetPath)" "$(ProjectDir)/GameData/LunarTransferPlanner\Plugins\" - + - --> - \ No newline at end of file + From 302f3192c742531ce11fd0c87b48f6f8a9f3559d Mon Sep 17 00:00:00 2001 From: Nazfib Date: Tue, 15 Aug 2023 21:36:33 +0200 Subject: [PATCH 2/3] Small corrections to the calculations - Use double precision quaternion - Make sure the orbit normal always points roughly northwards - The 'East' vector used to point to the west; - Replace latitude with abs(latitude) for checking against inclinations Fixes #7 --- .../Plugins/LunarTransferPlanner.dll | Bin 35840 -> 35840 bytes LunarTransferPlanner.cs | 17 ++++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/GameData/LunarTransferPlanner/Plugins/LunarTransferPlan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-WJKT~H)-p{&%yax4^bbi27ZQ@ef`BM-y&_Fd{=J(z5*OAp7$?+m;yT(?zE#S1ZqJI(KFE+MIp*Uq@u$RJt3WwPmq{PTI$V`0(>~Wql zU?1;X+aa0miB{o@k`~)0S&J(di>pC;!*gvvVutQVs5iXURw}1!n_-W|zzU7xk~F8> zn!3$4%__AybXo|li)XJ5n6MA{gX=9|x&M8X`rgw;E0te|x@faie1^>Swc75X;?ysq z*h0j$tccLhuBtz@^)v42KBAn*7kz^b&RNHoKJ4n&g^odRakH;zJ?N6q#(( zIP}fRep8`lTKR*~yd zABFuVWtV82VP*>BgU05zm{{chCr|YMnW!Yl4H~8}H_Y}ToiR7em6^%gfS(9%)=7m9 zC)>-D7+-TR{!L*=*G||oox6b##xoZCUIZR@N0}V+a=P#ByB!Y7!(qio`9O)|kA^Y5 z4CCvgZa|4YJCyEtI`>flP-1-=P)6a;hyTsg0VRNQiGyb2mtg!<36waS#9^LNfDXD5 zKgRm#CZNQs#<^eM-KqzUxp?1`5pn zXd+P3WE2$m>8C5~Yf(_(_sksF*I}dtO;O`D4Pzu|Dp1mNjER$?@J1J3lHNiO z1-%W#!x(xf=^gY<(7QlM@1bvk4g)*TEl7R_{|m)+;wjOJgVIvlQ?}1+!|k?uY_dx} zyKwHdwNp&{EF6M=^|_jQU3lx?&Qpx#`0G!B(k@Ndq<*5fRBJY8jvcH0jk=jnj}4`r zr3Y~PctQS?uE8CArERKs-gbbF*{bO_d&{Y@r$x)>;J9+~n1h5~^iFZBjyggGd;m=?M#4 zrbL&BoVavhX$iIVbRiQ)IMOv#z18E}DXp3_&73(c$y~H_d+&+GLwok=OIA%M&ssI1eSO_yZl5>qy}7@feq!3s_n}o6 iKHJUf8&kzYElV2fM2mO%zcjhGXN&*dZ^Y^X Math.PI / 2) + { inclination = Math.PI - inclination; + orbitNorm *= -1; // make sure orbitNorm always points roughly northwards + } - Vector3d eastVec = Vector3d.Cross(EarthAxis, upVector).normalized; + // When checking this: remember that Unity (and KSP) use a left-handed coordinate system; therefore, the + // cross product follows the left-hand rule. + Vector3d eastVec = Vector3d.Cross(upVector, EarthAxis).normalized; Vector3d northVec = Vector3d.Cross(eastVec, upVector).normalized; Vector3d launchVec = Vector3d.Cross(upVector, orbitNorm).normalized; double azimuth = Math.Acos(Vector3d.Dot(launchVec, northVec)); - if (Vector3d.Dot(launchVec, eastVec) < 0d) - azimuth = Math.PI - azimuth; return new OrbitData(orbitNorm, inclination * 180d / Math.PI, azimuth * 180d / Math.PI); } @@ -293,7 +296,7 @@ private double EstimateLaunchTime(CelestialBody target, Vector3d launchPos, doub double t = startTime; OrbitData launchOrbit = CalcOrbitForTime(target, launchPos, t); - if (latitude >= target.orbit.inclination) + if (Math.Abs(latitude) >= target.orbit.inclination) { // High latitude path - find the next easterly launch to the target while (Math.Abs(launchOrbit.azimuth - targetAz) > 0.01d) @@ -427,7 +430,7 @@ void MakeMainWindow(int id) GUILayout.Box(new GUIContent($"{(launchOrbit.azimuth > 90d ? -launchOrbit.inclination : launchOrbit.inclination):F2}°", "Launch to this inclination now to reach a Lunar parking orbit"), GUILayout.MinWidth(100)); - string tooltip = latitude >= target.orbit.inclination ? + string tooltip = Math.Abs(latitude) >= target.orbit.inclination ? "Launch at this time for an Easterly launch to Lunar parking orbit" : "Launch at this time for a low inclination launch to Lunar parking orbit"; From 38751ea464e08c9d38b97ff759a97480b81abf09 Mon Sep 17 00:00:00 2001 From: Nazfib Date: Mon, 11 Dec 2023 02:18:21 +0100 Subject: [PATCH 3/3] Update dll --- .../Plugins/LunarTransferPlanner.dll | Bin 35840 -> 35840 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/GameData/LunarTransferPlanner/Plugins/LunarTransferPlanner.dll b/GameData/LunarTransferPlanner/Plugins/LunarTransferPlanner.dll index 3a1e340a8ac10bb34c851f919d7b2952b3e03711..865a377a1b614a502d61c8b71b70580f622bce61 100644 GIT binary patch delta 1069 zcmY+=TSyd97zgnGnQdo}w(YLD=4B-k#VxX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