Kalman filter accelerometer, gyroscope and magnetometer

조회 수: 24 (최근 30일)
Giuseppe Rinaldi
Giuseppe Rinaldi 2019년 11월 28일
답변: Chidvi Modala 2020년 1월 2일
Hi, I have a question. I have to design a Kalman filter for accelerometer, gyroscope and magnetometer and apply the sensor fusion to it. The sensor data is in three different .txt files. How can I change the filter in the link to pass my files to it? Thanks in advance!

답변 (1개)

Chidvi Modala
Chidvi Modala 2020년 1월 2일
Hi,
From my understanding, you are trying to extract data from the .txt files and use the data to design Kalman filter
You can use the following code and obtain required data from your files
fileID = fopen('data.txt');
Out = textscan(fileID,'%f %f %f');
A = Out{1};
B = [ Out{2} , Out{3} ];
For more information, you can refer to textscan

카테고리

Help CenterFile Exchange에서 State-Space Control Design and Estimation에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by