KSP-KOS / KOS

Fully programmable autopilot mod for KSP. Originally By Nivekk
Other
691 stars 229 forks source link

Hardcoded values in Timespan don't use in-game calendar. They should be queried instead. #2502

Closed Dunbaratu closed 5 years ago

Dunbaratu commented 5 years ago

The TimeSpan class contains this:

    private const in DAYS_IN_YEAR = 365;

It also contains this:

    public const int HOURS_IN_KERBIN_DAY = 6;

The first is a problem in stock KSP because the stock Kerbin year is not 365 kerbin days. (nor is it 365 earth days either.)

The second is a possible problem in modded solar systems because the "homeworld" day is not necessarily the same as a Kerbin day when the homeworld isn't Kerbin.

If possible, these values should come from something queried in the game's API, or from querying the orbital information about the bodies themselves.

The severity of this bug isn't that bad since it only affects the display of things and all the real physics calculations just use seconds anyway, but it still should be possible to do something about it.

ElWanderer commented 5 years ago

Related issue: https://github.com/KSP-KOS/KOS/issues/1800