Skip to content
Snippets Groups Projects
Commit a6171638 authored by leprob001's avatar leprob001
Browse files

GPS TOA data is now being adjusted to match the measured TOA.

parent 4cc9bfe9
No related branches found
No related tags found
No related merge requests found
......@@ -70,27 +70,28 @@ soundSourceDriftSinceLaunch = soundSourceDrift ...
%% Predict toa for every gps position
gpsMeasurementCount = size(gpsData, 1);
predictedToa = zeros(gpsMeasurementCount, 1);
predictedToa = NaN(gpsMeasurementCount, 1);
gpsRafosDates = NaN(gpsMeasurementCount, 1);
if (isempty(windowStartTime))
return;
end
for o = 1:gpsMeasurementCount
currentGpsPosition = [str2double(gpsData{o, pRfb.SAT_FORMAT.lat_sat}), str2double(gpsData{o, pRfb.SAT_FORMAT.lon_sat})];
currentGpsPosition = [gpsData(o, pRfb.SAT_FORMAT.lat_sat), gpsData(o, pRfb.SAT_FORMAT.lon_sat)];
gpsRafosDates(o) = artoa.convert.dmy2rd( ...
str2double(gpsData{o, pRfb.SAT_FORMAT.day_sat}), ...
str2double(gpsData{o, pRfb.SAT_FORMAT.month_sat}), ...
str2double(gpsData{o, pRfb.SAT_FORMAT.year_sat}) ...
gpsData(o, pRfb.SAT_FORMAT.day_sat), ...
gpsData(o, pRfb.SAT_FORMAT.month_sat), ...
gpsData(o, pRfb.SAT_FORMAT.year_sat) ...
);
currentSoundsourceDrift = soundSourceDrift * (gpsRafosDates(o) - soundSourceEmissionBegin);
% calculate distance between sound source and gps
distanceSoundSourceToFloat = artoa.data.calculateGeodist(currentGpsPosition, soundSourcePosition);
if (isempty(windowStartTime))
predictedToa(o) = NaN;
else
predictedToa(o) = windowStartTime * 3600 - leapSeconds + currentSoundsourceDrift ...
+ distanceSoundSourceToFloat / (artoa.data.calculateSoundVelocity( ...
pSoundSpeedParameter.temperature, pSoundSpeedParameter.pressure, ...
pSoundSpeedParameter.method, pSoundSpeedParameter.soundSource ...
)/1000); % TODO: CHECK IF /1000 IS CORRECT
end
predictedToa(o) = windowStartTime * 3600 - leapSeconds + currentSoundsourceDrift ...
+ distanceSoundSourceToFloat / (artoa.data.calculateSoundVelocity( ...
pSoundSpeedParameter.temperature, pSoundSpeedParameter.pressure, ...
pSoundSpeedParameter.method, pSoundSpeedParameter.soundSource ...
)/1000) + pRfb.FLOAT.windowstart * 60; % TODO: CHECK IF /1000 IS CORRECT
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment