nasa / jeod

Other
26 stars 5 forks source link

Initializing dyn body states using frames defined with mass points #13

Open samvgarza opened 1 month ago

samvgarza commented 1 month ago

Question

Has any thought been put towards initializing a dyn body's translational and rotational state directly using mass points?

For example, one vehicle's lidar location is 5m from its CG. A target vehicle has a reflector 5m from its CG. Both of these locations are defined with mass points on their respective vehicles and the latter is used to define a corresponding LVLH frame. I want to use these points to initialize the vehicle such that the lidar is some distance away from the reflector

Ideally, we could do something like this: image

Due to how the initialize_simulation function inside the DynManager wraps up both the initialization of the mass bodies and dyn bodies into a single function call, I do not think it is possible to define a frame (a reflector LVLH frame in this case) using a mass point that is then used in the initialization of a dyn body

I've effectively gotten this to work by simply separating the functions as such (inside lib/jeod/JEOD_S_Modules/Base/dynamics.sm): image

And adjusting the priority of the initialization jobs. I then initialize an LVLH frame using a mass point at priority 40.

As you can imagine I'd rather not mess with JEOD source code (I created the initlaize_mass_bodies function). Is there a simpler way of accomplishing this that I'm missing? Thanks!

excaliburtb commented 1 week ago

thanks for the input. We have a suspicion that this could be accomplished in the current code base. We'll confirm one way or another and get back to you.