Revert "Hide normal node execute buttons when Principia is installed. Show abort button on maneuver editor when Principia installed" (commit: 8f536c2) (details)
Fix Principia node execution warpto bug (was warping to relative time-to-node, not to absolute UT). (commit: e392c1a) (details)
Fix execution of stock maneuvers when Principia is installed. (commit: b7583ea) (details)
When executing a maneuver, ensure ullage as soon as you hit the lead time, don't wait for the burn start. (commit: 3aab160) (details)
Node executor: Switch to tracking spent dV by acceleration, not engine thrust. Add an accessor to the attitude controller so one can check desired attitude. (commit: eda4f50) (details)
- Adds a new MaxThrust field to the stage stats display
This is computed as the MaxThrust of all the engines burning at the end of the stage. This is deliberately to avoid counting ullage solids that burnout after a few seconds. It may, however, be viewed as being slightly misleading. But the purpose of this field is really for PVG to have a single number for the thrust of the stage which is more realistic than the current behavior where it gets the initial thrust of the engine including the thrust curve.
- Converts PVG to use MaxThrust + ISP + MassDelta to get total burntime instead of the other way around. PVGs computed burntime for a Castor 30 XL is now 2mins instead of 8 mins.
- The displayed burntime, TWRs and SLTs are still wildly off, those need to be fixed more deeply in the code which analyzes the engine and produces the mass flow rate at conditions.
Apparently we can wind up with situations where there's a tiny segment with burned out engines that shouldn't really be burned out at the end or something, so just calculate the time averaged maxthrust, which should be good enough for PVG and still mostly works around the issue of burned out ullage motors.
Adjust the diffstep way down, experimentation with Matlab indicates this may not hinder convergence as much as the alglib author suggests.
Adjust EPSX upwards so stopping conditions are more lenient.
This worked on my one test so far with a high level of accuracy on a target from a horrible parking orbit on Earth to Saturn with a periapsis altitude of 2010km (2,010,006m actual).
Node executor: Switch to tracking spent dV by acceleration, not engine thrust. Add an accessor to the attitude controller so one can check desired attitude. (commit: eda4f50)
Clean up TimeToPlane (fix reverse planetary rotations and poles)
- Cleans up TimeToPlane based on #1551. - Adds reasonably thorough tests around all the different edge conditions. - Fixes behavior for planets rotating backwards. - Fixes behavior at the exact poles just 'cuz it was there to be fixed. - The use of SafeAcos eliminated a lot of the special handling of lat<inc. - I changed the handling of reverse planetary rotations to keep the values positive, which just makes it more readable for my own brain... might just be me.
This change should not fix any in-game breakage on planets that RSS/RO/PVG users have reported. It just lays a bit more solid and readable foundations for the underlying math.
1. MJ uses a negative inclination sign as a flag that the southern launch window should be chosen; however, this flag is not set by the `MinimumTimeToPlane` function, thereby making the heading used for the initial guess fed into the optimizer wrong.
2. The boundary conditions in PVG assume that the inclination is always positive, which caused PVG to try and launch into the wrong plane (LAN offset by 180°, or AN and DN swapped).
The fix is to change the `MinimumTimeToPlane` function to feed-back whether the chosen launch window is the north or south one, and to update the sign of the inclination accordingly. This is then fed into the HeadingForInclination function to determine the heading for the initial guess. After this, the inclination is stripped of its sign flag before being fed into the PVG boundary condition functions.
The reason that it worked previously most of the time, is that for lower inclinations, the heading error between north and south is small enough that the optimizer can correct it. For near-polar inclinations, the error grows to 180° and the optimizer failed to find a solution.
With these fixes, "Launch into plane of target", "Launch into target LAN" and "Launch to manual LAN" should all work correctly for all cominations of inclination and LAN. (commit: 48f8f30)
Instead of warping to the nearest of the northern or southern windows, warp to the northern window if inclination is positive and southern if inclination is negative.
Only in the case of "Launch into LAN of target" and "Launch into manual LAN"; the case "Launch into plane of target" keeps the previous behavior: for this case, the inclination input by the user is ignored in favor of the inclination of the target (which is always positive), so it seems weird to ignore the user input _except_ for the sign. (commit: 41272b4)
Biggest change here is probably the rewrite of the hermite interpolating polynomials used by the ODE solver, and conversion of the double[] arrays to List<double> which allows removing the dep on System.Buffers.
When launching into the plane of a target with Principia installed, PVG gets stuck on 'INITIALIZING' and never actually launches.
This was previously fixed in cd3d194760f7875658e7e04690e37113d2ca1cd6 by adding the `targetInc` parameter to the PVG constraint setup functions, but the refactor in 136964af2380013e860a04e0433fe6a607874847 broke this. (commit: 277a415)