-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patherror_plot.m
75 lines (62 loc) · 1.2 KB
/
error_plot.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
error_data=load('D:\StudySource\惯性导航原理\作业3-惯导机械编排\mechanization_result.txt');
timestamp=error_data(:,1);
posx=error_data(:,2);
posy=error_data(:,3);
posz=error_data(:,4);
velx=error_data(:,5);
vely=error_data(:,6);
velz=error_data(:,7);
attx=error_data(:,8);
atty=error_data(:,9);
attz=error_data(:,10);
%% 打印位置误差
figure(1);
subplot(3,1,1);
plot(timestamp,posx)
xlabel('time(s)');
ylabel('latitude(deg)');
grid on;
subplot(3,1,2);
plot(timestamp,posy)
xlabel('time(s)');
ylabel('longitude(deg)');
grid on;
subplot(3,1,3);
plot(timestamp,posz)
xlabel('time(s)');
ylabel('height(m)');
grid on;
%% 打印速度误差
figure(2)
subplot(3,1,1);
plot(timestamp,velx)
xlabel('time(s)');
ylabel('velX(m/s)');
grid on;
subplot(3,1,2);
plot(timestamp,vely)
xlabel('time(s)');
ylabel('velY(m/s)');
grid on;
subplot(3,1,3);
plot(timestamp,velz)
xlabel('time(s)');
ylabel('velZ(m/s');
grid on;
%% 打印姿态误差
figure(3);
subplot(3,1,1);
plot(timestamp,attx)
xlabel('time(s)');
ylabel('roll(deg)');
grid on;
subplot(3,1,2);
plot(timestamp,atty)
xlabel('time(s)');
ylabel('pitch(deg)');
grid on;
subplot(3,1,3);
plot(timestamp,attz)
xlabel('time(s)');
ylabel('yaw(deg)');
grid on;