Browse Source

matlab: Allow replay to handle late start GPS data in log

Also minor fix to comments.
master
Paul Riseborough 8 years ago
parent
commit
33e8d5923f
  1. 2
      matlab/EKF_replay/Filter/RunFilter.m
  2. 2
      matlab/scripts/Inertial Nav EKF/quat2yaw312.m

2
matlab/EKF_replay/Filter/RunFilter.m

@ -158,6 +158,7 @@ for index = indexStart:indexStop
% Get most recent GPS data that had fallen behind the fusion time horizon % Get most recent GPS data that had fallen behind the fusion time horizon
latest_gps_index = find((gps_data.time_us - 1e6 * param.fusion.gpsTimeDelay) < imu_data.time_us(imuIndex), 1, 'last' ); latest_gps_index = find((gps_data.time_us - 1e6 * param.fusion.gpsTimeDelay) < imu_data.time_us(imuIndex), 1, 'last' );
if ~isempty(latest_gps_index)
% Check if GPS use is being blocked by the user % Check if GPS use is being blocked by the user
if ((local_time < param.control.gpsOnTime) && (local_time > param.control.gpsOffTime)) if ((local_time < param.control.gpsOnTime) && (local_time > param.control.gpsOffTime))
gps_use_started = false; gps_use_started = false;
@ -206,6 +207,7 @@ for index = indexStart:indexStop
end end
end end
end end
end
% Fuse new Baro data that has fallen beind the fusion time horizon % Fuse new Baro data that has fallen beind the fusion time horizon
latest_baro_index = find((baro_data.time_us - 1e6 * param.fusion.baroTimeDelay) < imu_data.time_us(imuIndex), 1, 'last' ); latest_baro_index = find((baro_data.time_us - 1e6 * param.fusion.baroTimeDelay) < imu_data.time_us(imuIndex), 1, 'last' );

2
matlab/scripts/Inertial Nav EKF/quat2yaw312.m

@ -21,7 +21,7 @@ syms q0 q1 q2 q3 'real'
% function of the quaternions % function of the quaternions
Tbn_quat = Quat2Tbn([q0;q1;q2;q3]); Tbn_quat = Quat2Tbn([q0;q1;q2;q3]);
% calculate the y,x terms required for calculation fo the yaw angle % collect the y,x terms required for calculation of the yaw angle
yaw_input_312 = [-Tbn_quat(1,2);Tbn_quat(2,2)]; yaw_input_312 = [-Tbn_quat(1,2);Tbn_quat(2,2)];
% convert to c code and save % convert to c code and save

Loading…
Cancel
Save