|
|
@ -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' ); |
|
|
|