Suggestions concerning reference-frames and quaternions and rw #182
Replies: 2 comments 1 reply
-
Hi Tom,
The ICRS is not a reference frame, but rather a set of rules and definitions that explain how celestial observations can be tied together to define inertial frame of reference. Once a set of observations is picked, a realization of the ICRS is obtained, with ICRF (note the F here) being the realization of reference. However, note that the origin of the ICRF is the solar system's barycenter. By setting 'earth.isCentralBody = True', you effectively shift the origin of the inertial reference frame origin to the Earth's barycenter. This is equivalent to the reference frame EME2000, colloquially known as "J2000", which is also almost equivalent to the GCRF reference frame (the two differ by tens of arcseconds, according to Luc Maisonobe who's Orekit lead dev). Finally, the output of the local magnetic field is indeed expressed in the inertial frame of reference, a.k.a EME2000/GCRF/ICRF (the origin of the frame is irrelevant here). Regarding MRPs : the rigid body kinematics libraries in Basilisk provide extensive conversion functionalities from practically all attitude parameterizations of interest (Direction Cosine Matrices, quaternions/Euler parameters, Modified Rodrigues Parameters, Classical Rodrigues Parameters, Principal rotation vectors, Euler angles). Each of these have their pros and cons depending on what you are trying to achieve, and MRPs have the major advantage of being singularity-free through their shadow set as well as only requiring three components, where quaternions/EP need 4 on top of the unit-norm constraint. This is a broad family of attitude parameters, but they can really be seen as equivalent, since they all boil down to parameterizing the same DCM. This is quite a mouthful here, but I encourage you to check out CU Boulder's course on Spacecraft Attitude Dynamics which does an excellent job at demystifying these parameterizations. Finally, with regards to RW control, here's one way to look at it. Your goal is to fly spacecraft, so you need to develop and validate GNC FSW that is tailored to the task. That is, the GNC FSW must be ready to command the actuators that will indeed be present on the spacecraft. RWs typically expect speed or torque requests (there are use cases for both). The speed that is requested here is the angular velocity at which the RW's rotor should spin relatively to its stator. The torque here is no else but the time derivative of the speed (e.g the rate at which the speed of the rotor should change) scaled by the rotor's moment of inertia. This should help clarify why the RW simulation module is taking in motor torques (as in, the torques applied by the stator onto the rotor) as inputs. |
Beta Was this translation helpful? Give feedback.
-
Hi @bbercoviciUspace !
How do you give speed as an input to a reaction wheel in basilisk? This one takes in torque : |
Beta Was this translation helpful? Give feedback.
-
Dear All,
thanks for your good work and your nice tool. We use it for the development and testing of our university cubesat project and are very happy with the possibilities Basilisk is providing. Working on attitude control requires to pay close attention to the different used frames and their usage inside algorithms, sensors and simulation software. Especially when doing hardware-in-the-loop testing, finding a common understanding of the reference frames is important.
Unfortunately, sometimes we have trouble finding the corresponding used reference-frames for some of the functions provided in Basilisk. From my understanding, the base inertial frame is the ICRS frame. Actually I am not sure what the effect of the "useCentral" option provided by the gravityEffector results in. Will the corresponding scStatesMsg.r_BN_N will be in Earth Centered Inertial (ECI, I suppose J2000?) converted? Using the Spice interface apparently also uses a different reference frame for its outputs. I also noticed the WMM or the magneticFieldBaseClass (with its associated MagneticFieldMsg) only mentiones "local magnetic field", is this expressed in ECI or the Body frame?
I am sure, I can find the corresponding answers by digging into the source code and maybe reading through the comments in some example scripts. From experience I know that especially reference frames often lead to hard to find errors and inconsistencies. What I'd hope to find is a clear documentation about the used reference frames in the different modules of Basilisk.
Secondly, working in attitude control field the literature very often uses quaternions instead of mrps (while I understand that MRPs are a field of research at the AVSLab). Actually I found some conversions in the RidgitBodyKinematics utilities (eg. MRP2EP and EP2MRP) but they are (at least for me) uncommonly named 4x1 euler parameter vector instead of (unit) quaternions. Renaming or pointing out the equality of the terms might be beneficial to all using quaternions.
Thirdly, when using reaction wheels, personally I find it somewhat counter-intuitive that the commanded torque is the commanded motor torque, not the resulting torque. Is there a specific reasoning behind that?
I hope you don't see my comments as criticism, these are just some suggestions which came into my mind whilst using Basilisk.
Thanks and keep up the good work!
Tom
Beta Was this translation helpful? Give feedback.
All reactions