Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Battery checking should be continuous, not just at steps #59

Open
Mark2000 opened this issue Sep 13, 2023 · 4 comments
Open

Battery checking should be continuous, not just at steps #59

Mark2000 opened this issue Sep 13, 2023 · 4 comments
Labels
bug Something isn't working modeling Satellite and environment capabilities

Comments

@Mark2000
Copy link
Contributor

Mark2000 commented Sep 13, 2023

Describe the bug
The satellite can die then come back alive over the course of a step without triggering failure.

Screenshot 2023-09-13 at 12 08 22 PM

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.)

@Mark2000 Mark2000 added bug Something isn't working triage Needs to be reviewed by a maintainer and removed triage Needs to be reviewed by a maintainer labels Sep 13, 2023
@Mark2000 Mark2000 added the modeling Satellite and environment capabilities label Oct 31, 2023
@Mark2000
Copy link
Contributor Author

Relevant to #74 , once the battery reaches 0 the satellite should remain dead.

@Mark2000 Mark2000 mentioned this issue Dec 20, 2023
15 tasks
@YYan99
Copy link

YYan99 commented Oct 21, 2024

image
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}")

@Mark2000
Copy link
Contributor Author

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.

@YYan99
Copy link

YYan99 commented Oct 23, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working modeling Satellite and environment capabilities
Projects
None yet
Development

No branches or pull requests

2 participants