- Convert Quaternion to Rotation Matrix: First, convert the estimated quaternion obtained from the first EKF to a rotation matrix. This rotation matrix represents the orientation of the UAV. You can use "quat2rotm" function for this in MATLAB.
- Use Accelerometer Measurements: Next, use the accelerometer measurements to estimate the position and velocity in the NED (North-East-Down) frame. The accelerometer readings can provide information about the gravitational force acting on the UAV, which can be used to estimate the orientation and position.
- Combine Rotation Matrix and Accelerometer Measurements: Use the rotation matrix obtained from the quaternion and the accelerometer measurements to transform the gravitational force from the body frame to the NED frame. This transformation will provide information about the orientation and position of the UAV.
- Implement EKF for Position and Velocity Estimation: Utilize the transformed gravitational force and the accelerometer measurements as inputs to a new EKF to estimate the position and velocity in the NED frame.
- Update State and Covariance: Update the state and covariance matrices of the EKF using the combined measurements, considering the process and measurement models.
How find position from quaternions and accelerometer?
30 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello everyone, I am doing a small project based on an article. Basically from the measurements of gyroscope, magnetometer and accelerometer, I find the quaternion and estimate the attitude of a UAV with the extended kalman filter. I do it with simulink.
But now I can't find a way to estimate, again with EKF, the attitude by taking this estimated quaternion from the first EKF. I was thinking of taking quaternion estimated from the first EKF, accelerometer measurements to construct position and velocity measurements in NED. I don't know what equations to use to tie them together, though.
This is the pattern I should follow.
0 comentarios
Respuestas (1)
Ayush
el 29 de Nov. de 2023
Hey Lorenzo,
I understand that you are willing to find the quaternion and estimate the altitude of a UAV with EKF from the measurements of gyroscope, magnetometer, and accelerometer in Simulink. For this you are looking to use the estimated quaternion from the first EKF to further estimate the attitude.
To tie together the estimated quaternion and accelerometer measurements for position and velocity, you can follow these steps:
By following these steps, you can tie together the estimated quaternion from the first EKF with the accelerometer measurements to estimate the position and velocity in the NED frame using a new EKF. This approach should allow you to further estimate the altitude of the UAV based on the initial quaternion estimation and the accelerometer measurements.
Please refer to the following MathWorks documentation link for more information on "quat2rotm" function:
Hope this helps!
Regards,
Ayush Goyal
0 comentarios
Ver también
Categorías
Más información sobre UAV en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!