Open ElWanderer opened 6 years ago
Validating the solar system map generation against the game for Y1 D1:
As part of calculating the position on an inclined orbit: latitude = arcsin(sin(inclination) sin(true anomaly + argument of periapsis)) The radius as seen from directly above (i.e. within the ecliptic plane) would then be given by actual radius for that true anomaly cos(latitude)
There may be a shortcut for that - having implemented it, it seems to have come out with similar planet-placing to the version I'd come up with myself.
Another work-in-progress screenshot: The white flecks below some of the orbit lines are where the orbit ellipse would be if the inclination were 0. I don't think the scaling I'm doing accurately shows inclined orbits, though. It is good enough for now, I guess.
I have put together the very first stage of a Lambert solver for determining interplanetary transfers. It is currently hard-coded to produce a specific transfer orbit's semimajor axis, eccentricity (and hence orbital period, with the central body taken into account), true anomalies and flight time. These can then be compared to the example on the Wikipedia page(!)
Things to do with that:
Or I could look to existing implementations such as this one in C#: https://github.com/TriggerAu/TransferWindowPlanner/blob/master/TransferWindowPlanner/SharedStuff/LambertSolver.cs
This may no longer be necessary if we can use the kOS-Career plugin I've seen, if that can pull details out of contracts.
Currently boot scripts have to be manually edited to set the desired parameters.
Issue #78 exists for providing a GUI on launch that allows a user to enter parameters. This idea is similar, but different - a standalone application (e.g. written in Java) that allows a boot script to be generated based on various inputs.
Being standalone, this could read in the game's savefile to pull out the parameters of certain contracts and offer them in a dropdown. It could also be used to enter craft/mission-specific details that otherwise would have to be hand-edited into a craft-specific file with the right name.