I'm getting data From an IMU and a Magnetometer synchronously, my roll and pitch drifts are corrected with accelerometer inside IMU and now I have the DCM
matrix during my sensor reading i also have the true heading from Magnetometer as a simple H
degrees from north. what is the most straightforward way of correcting the my DCM
with this H
angle, i don't want to go through kalman filtering, just i want the formulation to simply compensate my yaw angles from this H
value.
Based on the answered and comment i think my question was not clear so i try to clarify it more
more detail:
I have an IMU witch has an accelerometer and gyroscope that internally compensates for pitch and roll drift; this IMU not only provides me compensated pitch and roll angles as well as uncompensated yaw angle but also provides all raw data of accelerometer and gyroscope. by roll, pitch and yaw angle i mean three Euler angles as φ, θ, ψ (witch are result of 3->2->1 Rotation).
now i have added a magnetometer sensor to my system. i read raw data from magnetometer and using atan2
i convert it to heading. now i want to use a simple complementary filter to compensate for yaw drift and i ask here for it's formulation. my main problem arises from the fact that the ψ (yaw) angle from the IMU is not directly only related to Heading. i mean for instance i cannot replace the yaw angle (ψ) with the heading value! so i want to know witch witch formulation i can simply relate this heading to yaw angle.