Blaarkies / ksp-visual-calculator

Online tool for Kerbal Space Program that helps players determine delta-v requirements for a mission, and what type of comms dishes a certain satellite requires.
https://ksp-visual-calculator.blaarkies.com
Other
23 stars 0 forks source link

Orbit editor won't let me enter large values #26

Closed mferrie closed 3 years ago

mferrie commented 3 years ago

When I try to specify an orbit for a spacecraft, it won't let me enter large values, for example an altitude of 2,863,333 meters above Kerbin or 15,000,000 km above the Sun.

Blaarkies commented 3 years ago

Hi @mferrie , thanks for reporting this one.

This looks like it is part of an action that has not been fully implemented yet. Each time the "Orbit parent" is changed, it should also update the available range of altitudes to select from (with the slider). After the new fixes to the slider, I believe this one got limited to Gilly's shere of influence as a limit to all options.

The offending line is somewhere around here https://github.com/Blaarkies/ksp-visual-calculator/blob/9da0a2b946efe12cac7627ff4695af44a65e50d9/src/app/overlays/craft-details-dialog/craft-details-dialog.component.ts#L80

But a simple line change won't fix this yet, i will have to look into the update on changing orbit parent.

mferrie commented 3 years ago

Thank you for looking into this!

Blaarkies commented 3 years ago

Hi @mferrie

I just deployed the fix to this, it should work correctly now. At first (before any orbit parent is selected), the altitude limit is the size of Gilly's sphere of influence. Once an orbit parent is selected, that limit will update to the selected orbit parent's SOI.

It should be possible to place craft on the rim of any SOI now given the controls.