Pose Estimation and Orientation for a UAV in MATLAB

1 view (last 30 days)
I have the following data:
  1. Ax, Ay, Az (m/s^2) - update rate 10 Hz
  2. Gx, Gy, Gz (rad/s) - update rate 10 Hz
  3. GPS LLA (deg deg meters) - update rate 2 Hz
  4. Roll, Pitch, Yaw (degrees) update rate 10 Hz
I want to develop a GNSS aided INS.
I am following the example given below:
trajOrient = trajData.Orientation;
I got this using the below code:
%%
clear all;
close all;
clc;
%%
%Load sensor data
load IMUData.mat IMUData;
accelerometerReadings = IMUData(:, 2:4);
gyroscopeReadings = IMUData(:, 5:7);
%% Sampling Rate
imuFs = 10; %Hz
decim = 1;
fuse = imufilter('SampleRate',imuFs,'DecimationFactor',decim, 'ReferenceFrame', 'ENU','AccelerometerNoise',1e-6, 'GyroscopeDriftNoise',1e-6);
%%
OrientationData = fuse(accelerometerReadings,gyroscopeReadings);
trajVel = trajData.Velocity;
How do I get this data?
trajPos = trajData.Position;
How do I get this data?
trajAcc = trajData.Acceleration;
accelerometerReadings = IMUData(:, 2:4);
trajAngVel = trajData.AngularVelocity;
gyroscopeReadings = IMUData(:, 5:7);
Also, I do not have magnetometer. I have to do it using acc-gyro only.
initstate = [1-4 % Orientation as a quaternion
5-7 % Position (NED) %but my frame is in NEU maybe
8-10 % Velocity (NED)
11-13 % Delta Angle Bias (XYZ)
14-16 % Delta Velocity Bias (XYZ)
17-19; % Geomagnetic Field Vector (NED)
20-22] % Magnetometer Bias (XYZ)
How can I proceed with this?

Answers (1)

Brian Fanous
Brian Fanous on 3 Feb 2025
The data in trajData is recorded synthetic data using imuSensor and gpsSensor.
If you do not have a magnetometer you should use the insEKF workflow.
  1 Comment
Aashir
Aashir on 9 Feb 2025
How can I generate my own trajectory?
I have a data having LLA (deg deg meters). Can I use this data to generate accelero and gyro data in the format as in the trajData?

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!