Aelfhe1m / Historian-Expanded

Small utility for adding information to KSP screenshots
9 stars 3 forks source link

<LandingZone> should not show anything when in orbit #18

Open Gordon-Dry opened 4 years ago

Gordon-Dry commented 4 years ago

Only when trajectory meets the ground (could also take the predicted aerobrake trajectory into account).

Aelfhe1m commented 4 years ago

Doing this sort of calculation is well outside of scope for this mod itself. Could possibly be implemented in the future through the API for the Trajectories mod.

Temp fix would be to show a N/A except when landed/splashed.

Problem is this is a poorly named tag that's been around forever and really represents a more detailed version of <Biome> that recognises the micro-biomes at the KSC (and more recently other stock launchsites/anomalies).

Gordon-Dry commented 4 years ago

btw the <LandingZone> even does not show the correct predicted landing biome when already in suborbital trajectory. It still shows the same biome as the vessel is actually over. KER and Trajectories know it. MechJeb knows it (Mechjeb autoland).

Aelfhe1m commented 4 years ago

I agree the name is bad. What the original mod author really meant was LandedAt.

Historian has always been about showing the CURRENT state of the vessel in the overlays and has no code for predicting any sort of future state nor even for displaying simple future information that is present in the stock vessel info (e.g. time to apoapsis).

As for how other mods do it - I looked at the code in MJ, KER and Trajectories. They all have large classes dedicated to running simulations of the vessels future path. It's a very complicated calculation - which is why none of the three ever seem to agree on where my capsules are going to land on Kerbin (or Earth).

The only one with a well defined public API to let other mods hook into its calculations is Trajectories. Trying to get the information from either MJ or KER would require hooking in to internal code that could change location whenever the mods are updated.

TL;DR - I'm not saying it can't be done, just that it could be a lot of work and I'd need to be sure that this was going to be used by a good number of people before taking that work on.