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

Dynamic reconfiguration during simulation #150

Open
AdamDorwart opened this issue Dec 3, 2024 · 1 comment
Open

Dynamic reconfiguration during simulation #150

AdamDorwart opened this issue Dec 3, 2024 · 1 comment

Comments

@AdamDorwart
Copy link

AdamDorwart commented Dec 3, 2024

I'm trying to design a mission where a spacecraft has payloads that detach and become independent bodies/spacecraft. Even better I could then join spacecraft to other spacecraft to simulate docking/assembly.

I've taken a look through the code and AFAIK this is currently not possible with the current spacecraft/bodies/joints implementation. Furthermore it's not trivial to add because the underlying dynamics seems like it assumes static configurations. Before I move on I just wanted to confirm that I didn't overlook some existing capability.

@ericstoneking
Copy link
Owner

Hi Adam,

There may be a couple of approaches, depending on how independent you want your splinter S/C to be.

  1. 6DOF joints are supported, and all joint DOFs can be locked/unlocked on the fly. Define a two-body S/C with the joint DOFs locked, and it behaves as a single body. Unlock the joints, and the bodies separate. It will still be considered a single S/C, just with disconnected bodies.

  2. S/C existence (see Inp_Sim.txt) can be toggled on the fly. Define S/C A, S/C B, and S/C A+B. Initially, A+B exists and A and B don't. When you want to separate, set SC[A+B].Exists to FALSE, and SC[A].Exists and SC[B].Exists to TRUE. You will need to write your own code to match the dynamic states accurately.

I've never had the occasion to do it, but the SC array of structs is dynamically allocated, so could be resized during a run. It would be up to you to properly populate any new S/C you add.

Regards,
-Eric

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants