function [drift] = calculateDrift(pStartRafosDate, pEndRafosDate, pStartOffset, pEndOffset) %CALCULATEDRIFT Calculates the drift corresponding to 1 day. % Calculates the drift of a soundsource in 1 day in seconds. % % Parameters: % pStartRafosDate (double): The start rafos date that should be % taken into account. % pEndRafosDate (double): The end rafos date. % pStartOffset (double): The starting offset [s]. % pEndOffset (double): The end offset [s]. % % Returns: % drift (double): The calculated drift [s/day]. %% Calculate drift duration = pEndRafosDate - pStartRafosDate; totalOffset = pEndOffset - pStartOffset; drift = totalOffset / duration; end