DRVeyl / RealAntennas

KSP Mod to add better antenna / link calculations to CommNet.
29 stars 22 forks source link

Feature Request: Auto search for best comm nod #85

Open SaberCF opened 1 year ago

SaberCF commented 1 year ago

Hi, I hope that you could add a function to make the antenna auto search for the best comm nod.

For example, I have launched three comm Sats at GEO, and my craft at LEO wants to use the comm Sats to transfer data. For now, I can just peer one antenna to one comm Sat, and if the connection is blocked by Earth, I'll get comm lost. So I need three antennas and peer each antenna to each comm Sat, then I can use the comm Sats continuously.

If you can add the auto search function to this mod, the antenna will be able to search the best comm nod to connect, so I can just use one antenna to do this job. If searching all comm nods is too heavy to this mod, maybe can add a search list that the antenna will only search the nods which are in the list.

DRVeyl commented 1 year ago

There's a couple problems with this as a general case, I think. Including the performance one -- most of the calculation is figuring out a link between the possible pairs, now doing that just to figure out pointing to then repeat the calculations now that you've chosen one seems bad. I'm also generally unwilling to add something that will dynamically change pointing that drastically, because this system needs to also work in the background and at warp.

I don't imagine I'll be doing this. But if you or someone particularly interested wants to look into https://github.com/DRVeyl/RealAntennas/blob/master/src/RealAntennasProject/Targeting/AntennaTarget.cs, I tried to make that extensible so a completely new mode, such as what you're describing, could be added without really impacting the rest of the system. The antenna target becomes a gameobject that can move itself around at whatever refresh rate it desires.