magico13 / StageRecovery

NOTE Now maintained at https://github.com/linuxgurugamer/StageRecovery An addon for Kerbal Space Program that recovers funds from spent stages.
28 stars 18 forks source link

Distance calculations don't account for different launch sites? #6

Open ts826848 opened 9 years ago

ts826848 commented 9 years ago

I usually play with the RO set of mods, and when hopping around launch sites, I noticed that some launch sites have massively reduced distance modifiers compared to others.

For example, the Cape Canaveral launch site gets "normal" recovery rates (I think?), like you would at the stock KSC. The MH - Omelek site, however, gets recovery rates of ~47.1% if the part is even the smallest bit off of KSC grounds. The Chinese sites get even worse rates (~20something%, I think?)

Is it possible to do distance calculations based on the currently selected KSC, rather than the default KSC?

magico13 commented 9 years ago

It should be possible to have it be based on the active site or even the closest site. Currently it just checks what the coordinates of the "SpaceCenter" entity are. It should be possible to poll RSS to get the coordinates of all the other sites, or at least the active site.

ts826848 commented 7 years ago

Ran into this again, but I noticed that the behavior changed somewhat, so I don't know whether it's still a SR issue.

Recovery distances are still off, but it appears to be by a consistent few thousand km no matter where the launch site is. For example, for the kick stage of a sounding rocket launched straight up from:

I have no clue where the KSC coordinates are being pulled from, unfortunately... Vessel coordinates appear to be correct, though.

So at this point, I don't know whether it's a SR problem, or a KSCSwitcher/RSS/Kopernicus problem, for not having SpaceCenter.Instance spitting out the right coordinates. What do you think?