-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Time to launch into Minimus LAN is slightly off #2
Comments
I'm sorry, always test code before suggesting patches ... |
Thanks. I'll fix that.
…On Sun., Apr. 25, 2021, 2:35 p.m. quetschke, ***@***.***> wrote:
I'm sorry, always test code before suggesting patches ...
TIME:DAY is an integer, so what I suggest instead is to use:
360*((TIME:SECONDS) / 9203545)
to correct for the correct position on the orbit with the sidereal orbital
period of 9203545 s.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASG3BEKTIRXGU7NUUC7VM33TKROFNANCNFSM43RQSAGA>
.
|
Actually, I think I have to use
360*((MOD(TIME:SECONDS, 9203545)) / 9203545)
as SECONDS is seconds since the start of the game. Haven't a chance to test
yet, though.
…On Sun., Apr. 25, 2021, 2:35 p.m. quetschke, ***@***.***> wrote:
I'm sorry, always test code before suggesting patches ...
TIME:DAY is an integer, so what I suggest instead is to use:
360*((TIME:SECONDS) / 9203545)
to correct for the correct position on the orbit with the sidereal orbital
period of 9203545 s.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASG3BEKTIRXGU7NUUC7VM33TKROFNANCNFSM43RQSAGA>
.
|
You are correct, I noticed that and was pondering if I should leave another comment. I actually decided to make it even more accurate to calculate the time from now to the next AN (or DN) including sidereal correction. And then warp there and inc;lude this in my launch script. (Note, I didn't hard-code Minmus, but take a generic LAN parameter.) |
We should move this to the discord. I think for your code, you need to do 360*((ROUND(TIME:SECONDS/21600,0)*21600) / 9203545) because you want to have the sidereal correction for every day that has passed. Never mind, I think that is exactly what your code does, just modulo the 360 degrees. |
One more comment though, by using TIME:SECONDS for the calculation of the sidereal correction, one corrects until "right now". Your original code only corrects until 0:00, the beginning of the day. The difference is negligible, but not the same. The LauLAN script from above corrects until the actual launch time, but that's just me and total overkill. |
Hi Mike,
in MinmusLaunchTime.ks you correct for the position on the sidereal orbit by:
360*((TIME:DAY-1) / 426
This should be 9203545/21600 = 426.090046 instead of 426. (Kerbals need leap minutes ...)
Only a 0.02% correction, but Kerbals will thank you in a thousand years to hit Minmus' orbit at the right inclination.
The text was updated successfully, but these errors were encountered: