RemoteTechnologiesGroup / RemoteTech

Community developed continuation of Kerbal Space Program's RemoteTech mod.
http://remotetechnologiesgroup.github.io/RemoteTech
GNU General Public License v2.0
233 stars 102 forks source link

Automatic hibernation when power low #451

Closed ec429 closed 6 years ago

ec429 commented 9 years ago

When a real space probe's batteries are running low, it will typically shut down many of its functions, including communications, until it has recharged sufficiently. For example, the Philae lander recently came out of hibernation and regained contact with Rosetta, having landed in a location that gave it less solar illumination than expected.

Probes in RemoteTech should be able to automatically deactivate their antennas when electric charge approaches zero, then reactivate them when over some threshold (e.g. half charge). This would (for example) mean that a probe to Jool or Eeloo, getting insufficient solar power for constant operation, would hibernate most of the time and link up for a comms pass every few hours. The intermittent comms would force the player to plan much further ahead than the few minutes of signal delay, but still be better than a totally dead probe.

At the moment I'm having to do this manually by programming delayed actions into the FC and keeping record in a text file (or KAC) of when each probe's next comms pass is, which is really quite tedious. The alternative, deactivating batteries to shut down the probe, feels like cheating as it totally bypasses RT, plus it still needs some delayed-action-fu to recharge the batteries once they get low.

Suggested UI would be something like a pair of sliders on each antenna which set the lower and upper thresholds as a percentage of the craft's total charge capacity; alternatively a similar single setting (probably on the FC UI) that controls all antennas on the craft.

Another alternative, since the most annoying part of manual hibernation is the inability to program in a delayed "activate" command on a currently-active antenna (absent action-group workarounds that have to be set up in the VAB), is to give the antennas a Toggle button, or put a manual "Hibernate for <time input>" button+textbox in the FC UI. This would require more player attention / planning than the automatic hibernation, but still make outer-planets probes (that don't have the huge solar panel area needed for continuous comms) less painful to operate.

I'm making an attempt to implement automatic hibernation, but it's my first foray into KSP modding and indeed C#, so it'll probably be horrific.

neitsa commented 7 years ago

RT dev note: probe cores now have a hibernate feature in ksp 1.2. What does it restrict exactly when in this mode and does RT plays nicely with it?

KSP-TaxiService commented 7 years ago

Quote from KSP 1.2.0 changes:

Probe cores now have a hibernate feature which offers only partial control when activated but draws much less electricity. Can be set to automatically hibernate in warp (advanced tweakable).

According to KSPedia, the following actions are permitted by the partial control (probes):

Comments: 1) I think the flight computer is belonged to the autopilot (can enter pending commands when in hibernation mode) 2) Given that a RT probe has a full control when not in hibernation mode, the only benefit of the hibernation is the less electricity consumption (useful when the hibernated probe with no connection is automatically inserting itself into an orbit under the dark side). 3) There is only one design issue: When the FC executes a maneuver, does the restriction of throttle up/down apply to the FC? Or the FC under the autopilot disguise can ignore this restriction?

KSP-TaxiService commented 6 years ago

I added two new commands of Flight Computer, related to the power saving (Issue #739).

Obviously, the Wake command should be scheduled in advance so that the hibernating probe could wake up automatically in absence of working connection.

This, however, is not same as this issue since this issue is asking for a different kind of power-low state i.e. reduced FC functionality and retaining of working connection.

rsparkyc commented 6 years ago

I've actually made this possible here: https://github.com/rsparkyc/AntennaPowerSaver

KSP-TaxiService commented 6 years ago

Oh wow, I was thinking of a new FC power button and never thought of using a separate part module to do this in an intuitive way.

I need to go over Antenna Power Saver and see if the new FC power button and 2 sliders for all antennas would be useful or unnecessary.

KSP-TaxiService commented 6 years ago

@rsparkyc, just let you know I am integrating some of AntennaPowerSaver codes/concepts into existing RTModuleAntenna and FlightComputer, along with your credits.

I am putting a new power button for FC to automatically deactivate/re-activate activated antennas with their PartActionUI thresholds.

rsparkyc commented 6 years ago

@KSP-TaxiService Awesome! If that became integrated into RT, it would be one less mod for me to maintain :)