Open Mark2000 opened 1 year ago
Relevant to #74 , once the battery reaches 0 the satellite should remain dead.
Why does the battery level increase here when it's not in charging mode? I also meet this phenomenon when I run the example code simple_environment
. I change the action to 'Scan', but the charge level increases sometimes:
while not truncated:
observation, reward, terminated, truncated, info = env.step(action=0)
print(f"Charge level: {observation[1]:.3f} ({env.unwrapped.simulator.sim_time:.1f} seconds)\n\tEclipse: start: {observation[2]:.1f} end: {observation[3]:.1f}")
As in a real spacecraft, the power system models remain active even when not explicitly in a sun pointing mode. As long as there is solar incidence on the panels (i.e. positive dot product and not in eclipse), the battery will gain charge according to the incidence angle, distance from sun, and panel area. The charge mode just explicitly sets the attitude controller to point the panels at the sun.
As in a real spacecraft, the power system models remain active even when not explicitly in a sun pointing mode. As long as there is solar incidence on the panels (i.e. positive dot product and not in eclipse), the battery will gain charge according to the incidence angle, distance from sun, and panel area. The charge mode just explicitly sets the attitude controller to point the panels at the sun.
Thanks for your detailed explanation!
Describe the bug The satellite can die then come back alive over the course of a step without triggering failure.
Additional context Should be fixed by either logging battery and checking at the end of the step, or by adding a continuous terminal event checking battery level. I think the latter is preferable, as it will be less memory intensive (or maybe not, turns out events are time-expensive to check.)