首先附一个介绍:NaveGo: an open-source MATLAB/GNU Octave toolbox for processing integrated navigation systems and performing inertial sensors analysis.
源码下载地址: NaveGo
编程语言:matlab
这个短小精悍的代码,主要包括以下几个部分:
(1)根据参考数据集和GPS datasheet,生成含有误差的GPS数据:
GPS 误差数据
% Garmin 5-18 Hz GPS error profile
GPS data structure:
t: Mx1 time vector (seconds).
lat: Mx1 latitude (radians).
lon: Mx1 longitude (radians).
h: Mx1 altitude (m).
vel: Mx3 NED velocities (m/s).
std: 1x3 position standard deviations (rad, rad, m).
stdm: 1x3 position standard deviations (m, m, m).
stdv: 1x3 velocity standard deviations (m/s).
larm: 3x1 lever arm (x-right, y-fwd, z-down) (m). 杆臂效应 右-前-下
freq: 1x1 sampling frequency (Hz).
主要是:以米为单位的latitude、longitude、高度误差设置;东北天三个速度误差设置、杆臂长度、频率等信息。
GPS仿真数据(真实数据+误差数据)
参考数据频率为100HZ,在此处主要是通过round函数进行降采样,完成!
% Downsampling GPS estimates from 1/dt Hz to freq Hz.
dt = mean(diff(ref.t));
freq = 1/dt;
dspl = round(freq / gps.freq); %四舍五入
dow = floor(m/dspl); %数据点 ;向负无穷取整
gps_r.t = ref.t (1:dspl:end, :);
gps_r.lat = ref.lat (1:dspl:end, :);
gps_r.lon = ref.lon (1:dspl:end, :);
gps_r.h = ref.h (1:dspl:end, :);
gps_r.vel = ref.vel (1:dspl:end, :);
gps_r.kn = dow;
gps_r.freq =