Jump to content

Kerbin's Sidereal Year Length and Solar Day


Poodmund

Recommended Posts

In KSP the game clock rolls over a day every 6 hours as it's Solar Day is 21600 seconds. The game clock runs for 426 days and then rolls over into the next year after 426d 0hr 0m 0s have elapsed, giving a Solar Year length of 9201600 seconds.

However, Kerbin's Sidereal Year length is 9203544.618 seconds giving a Sidereal Length of 426d 0hr 32m 24.61s as well all know.

How does KSP interpret this mismatch in Solar Day and Sidereal Day when it comes to calculating the game clock at the end of every year? We would need a leap year every 11 years or so to catch up.

That or Kerbin's SMA should be 13597924514m so that the Sidereal Year and Solar Day align to exactly 9201600s and 21600s respectively.

Am I just being dumb?

Link to comment
Share on other sites

Hello, 

 

No you are not being dumb, but you have to understand that a sidereal and solar day are different things. A solar day is when the sun points at the exact same spot. A sidereal day is when other things (stars) point at the exact spot.

 

Regards,

mabdi36

 

Link to comment
Share on other sites

6 minutes ago, mabdi36 said:

Hello, 

No you are not being dumb, but you have to understand that a sidereal and solar day are different things. A solar day is when the sun points at the exact same spot. A sidereal day is when other things (stars) point at the exact spot.

Regards,

mabdi36

 

Errr.... that's exactly my point. 426 Solar Days ≠ 1 Sidereal Year yet the clock in KSP rolls over to the next year exactly after 426 Solar Days have elapsed.

Link to comment
Share on other sites

I believe  Kerbin's SMA is, in fact, 13597924514m.

In any case, there are no adjustments made. At the beginning of the game, the sun rises at KSC at 04:13, and sets at 01:13. If you fast forward 6 years (which should put it completely out of synch assuming your sidereal year calculation), and then watch the sunrise and sunset -- it's at 04:13 and 01:13.

 

Link to comment
Share on other sites

The wiki page covers this pretty well.

Kerbal day is Sidereal Day, so 1 Sidereal Day = 6 hours / 1 Solar Day = 6 hours 50.8 seconds / 1 Year = 426.08 Sidereal Day on Kerbin.

 

By the way, it's pointless to differentiate Sidereal/ year in Kerbal universe. It comes from axial precession, which I believe is not implemented in KSP.

Edited by Reusables
More accurate calc
Link to comment
Share on other sites

6 minutes ago, bewing said:

I believe  Kerbin's SMA is, in fact, 13597924514m.

In any case, there are no adjustments made. At the beginning of the game, the sun rises at KSC at 04:13, and sets at 01:13. If you fast forward 6 years (which should put it completely out of synch assuming your sidereal year calculation), and then watch the sunrise and sunset -- it's at 04:13 and 01:13.

I have Kerbin's SMA as 13599840256m, a figure pulled straight from KittopiaTech on an otherwise stock install and it also matches the figure listed on the KSP Wiki.

Figures from 1.2.9Pre: Sun Radius: 261,600,000m, Kerbin Orbital Alt: 13,388,240,256m. Therefore Kerbin's SMA: 13,599,840,256m

Anyway:

Kerbin's Orbital Period or Sidereal Year = 2π*SQRT( (13599840256^3) / (667408E-11 * 1.75654591319327E+28) )

= 9203544.618 seconds = 426d 0hr 32m 24.61s

This matches to figures that I have found elsewhere; hence the difference. 

15 minutes ago, Abastro said:

The wiki page covers this pretty well.

Kerbal day is Sidereal Day, so 1 Sidereal Day = 6 hours / 1 Solar Day = 6 hours 50.8 seconds / 1 Year = 426.08 Sidereal Day on Kerbin.

 

By the way, it's pointless to differentiate Sidereal/ year in Kerbal universe. It comes from axial precession, which I believe is not implemented in KSP.

To counter your post, KSP lists the Sidereal Day as 5h, 59m, 9s with the Solar Day being 6hr.

SEUcC1i.png

Link to comment
Share on other sites

57 minutes ago, Poodmund said:

Sidereal Day as 5h, 59m, 9s

Odd, the wiki says it and I think sunrise time is still dependent in the day of the year.

Anyway, just realized that this is unrelated; (1year in sidereal day is exactly 1 bigger than that in solar day)

426 day should be some kind of compromise for simpler clock. There could be leap year.

Link to comment
Share on other sites

4 hours ago, Poodmund said:

However, Kerbin's Sidereal Year length is 9203544.618 seconds giving a [Year] Length of 426d 0hr 32m 24.61s as well all know.

I agree with your math, that neither sidereal nor solar day neatly divides the astronomical year, and your conclusion that they would need leap days to keep the calendar synchronized to the sky.  So does :

So we expect the Kerbal calendar to drift away from the seasons (if we use a mod to give Kerbin an orbital inclination so we see the seasons) and the rising-time of stars to be different on the same calendar date as the years go by.   Neither effect would be obvious in normal use of KSP.

 

Link to comment
Share on other sites

Except for the fact that each Kerbal calendar year, Kerbin will not be located at the same degree of longitude of Periapsis. I think Kerbin falls short of completing an Sidereal Year (Orbital Period) by 0.076064422 degrees every year, meaning that after 4733 years Kerbals would effectively be a whole year ahead on their calendar...?

Link to comment
Share on other sites

There is no handling of leap years when the calendar is set to Earth-based, either: a year in KSP is exactly 365.0 Earth-days long. So yes, KSP's calendar has drift issues.

However, all is not lost: a mod can quite easily replace the date formatter to do the desired calculations. This is one of the changes I did while there.

Link to comment
Share on other sites

19 hours ago, bewing said:

In any case, there are no adjustments made. At the beginning of the game, the sun rises at KSC at 04:13, and sets at 01:13. If you fast forward 6 years (which should put it completely out of synch assuming your sidereal year calculation), and then watch the sunrise and sunset -- it's at 04:13 and 01:13.

This will be the case because the time of day is such that the sun will be directly overhead at the same time every day, thus sunrise and sunset times will not change either, no matter how many years into the game.

What will change is the rise-time of any particular star in the skybox.

39 minutes ago, Poodmund said:

Should this then warrant a bug report on the tracker?

If it matters enough to you, then yes.

Link to comment
Share on other sites

For myself, as long as my multi-year transfer from Kerbin to Jool (via gravity assist at Eve) doesn't require me to burn a bunch of delta-V at correction time because the calendar is off (as opposed to because I couldn't set the transfer accurately enough), I don't much care about Kerbin's calendar...

Link to comment
Share on other sites

Fortunately, the issue of year length is purely cosmetic as internally, all times are in seconds: it is merely the display of those times that poses any problem (however, plugging 1 year into KAC is another matter).

Link to comment
Share on other sites

18 hours ago, taniwha said:

(however, plugging 1 year into KAC is another matter).

Please,  elaborate what the matter with KAC may be. 

I'm under the impression that everything will be fine as long 1KAC year = 1KSP year. 

 

Link to comment
Share on other sites

20 hours ago, Poodmund said:

Should this then warrant a bug report on the tracker?

Probably not.  If it is 'fixed' by adjusting Kerbin's SMA to make the length of a year exactly 457 days, the position of Kerbin will change when for every save-game that is ported to the KSP version with the fix, messing up encounters on trips to or from Kerbin.

The lack of leap-years is not obviously wrong.  Some real-world calendars slip from the solar year.  If I lived on a planet with no seasons, 0° axial tilt and no eccentricity of the orbit, I would rather let the calendar slip relative to the stars, than have leap days.  Better to correct the wiki than change KSP.

Kopernicus would make this more obvious, when the home planet has inclination or eccentricity.  I see that Sigma88 wrote a GetDate() for Kopernicus that reports the solar year, slipping in a leap day as needed. (Edit: The code comment makes sense, but the code itself seems to increment the number given first day of the year, every leap year, so years start with day 2 for a while, then 3...)

Edited by OHara
Link to comment
Share on other sites

8 minutes ago, OHara said:

 If I lived on a planet with no seasons, 0° axial tilt and no eccentricity of the orbit, I would rather let the calendar slip relative to the stars than have leap days. 

I wonder if at this point the concept of year will have any importance. 

Actually,  kerbals would just elaborate the calendar based on the movement of Mun and Minmus  

Link to comment
Share on other sites

On 4/29/2017 at 4:06 PM, Abastro said:

The wiki page covers this pretty well.

Kerbal day is Sidereal Day, so 1 Sidereal Day = 6 hours / 1 Solar Day = 6 hours 50.8 seconds / 1 Year = 426.08 Sidereal Day on Kerbin.

 

By the way, it's pointless to differentiate Sidereal/ year in Kerbal universe. It comes from axial precession, which I believe is not implemented in KSP.

the same wiki that uses on purpose the wrong name for the Sun also gets the rotation period of Kerbin wrong (either on purpose or more likely simply ignorance)

Kerbin rotation period is defined by fixing its sideral solar rotation period at 21600 seconds, I don't remember the orbital period by memory but I guess it doesn't divide in an integer number of days.

using kopernicus clock should solve this, 

On 5/1/2017 at 7:07 AM, OHara said:

ernicus would make this more obvious, when the home planet has inclination or eccentricity.  I see that Sigma88 wrote a GetDate() for Kopernicus that reports the solar year, slipping in a leap day as needed. (Edit: The code comment makes sense, but the code itself seems to increment the number given first day of the year, every leap year, so years start with day 2 for a while, then 3...)

I might need to check the code again if you believe it might not work properly

 

EDIT: fixed the error

Edited by Sigma88
Link to comment
Share on other sites

4 hours ago, Sigma88 said:

Kerbin rotation period is defined by fixing it's sideral rotation period at 21600 seconds, I don't remember the orbital period by memory but I guess it doesn't divide in an integer number of days.

Kerbin is in fact the only body where the rotational period is specified as it's solar day rotational period. It has a Boolean modifier toggled true, solarRotationPeriod, to specify this.

Link to comment
Share on other sites

17 minutes ago, Poodmund said:

Kerbin is in fact the only body where the rotational period is specified as it's solar day rotational period. It has a Boolean modifier toggled true, solarRotationPeriod, to specify this.

Yup, I meant solar not sideral.

When is 2am I should avoid posting on the forums :D

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...