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 Center および File ExchangeState-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