Manually changing spacecraft states mid-simulation #847
atharris-work
started this conversation in
General
Replies: 1 comment 4 replies
-
I recently was attempting to do the same, and this works for me in complex multi-spacecraft sims for instantaneous changes in position and/or velocity: https://github.com/AVSLab/bsk_rl/blob/0a4a9d09f1c58d8ca8d91fb400f6a7c89c8c6328/src/bsk_rl/sim/fsw.py#L998C1-L1008C1 In short:
It's pretty similar to that example script, but I don't think its exactly the same. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have reason to manually move spacecraft around (i.e., change their position and velocity) mid-simulation. While there is an example of this being done with state references, this approach results in strange SWIG/Eigen errors when multiple spacecraft, each with multiple effectors, exists:
As an alternative, I tried manually changing the
r_BN_N_Init
andv_BN_N_Init
vectors and then callingreset
on the spacecraft; however, this produces a plethora ofBSK_WARNING
messages about creating new states with the same names as old states.What is the correct or preferred way to change spacecraft state values mid-sim?
Beta Was this translation helpful? Give feedback.
All reactions