马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
function [pseudoranges] = calculatePseudoranges(trackResults, ...
msOfTheSignal, ...
channelList, settings)
%calculatePseudoranges finds relative pseudoranges for all satellites
%listed in CHANNELLIST at the specified millisecond of the processed
%signal. The pseudoranges contain unknown receiver clock offset. It can be
%found by the least squares position search procedure.
%
%[pseudoranges] = calculatePseudoranges(trackResults, msOfTheSignal, ...
% channelList, settings)
%
% Inputs:
% trackResults - output from the tracking function
% msOfTheSignal - pseudorange measurement point (millisecond) in
% the trackResults structure
% channelList - list of channels to be processed
% settings - receiver settings
%
% Outputs:
% pseudoranges - relative pseudoranges to the satellites.
for channelNr = channelList
%--- Compute the travel times -----------------------------------------
travelTime(channelNr) = ...
trackResults(channelNr).absoluteSample(msOfTheSignal(channelNr)) ...
/ samplesPerCode;
end
%--- Truncate the travelTime and compute pseudoranges ---------------------
minimum = floor(min(travelTime));
travelTime = travelTime - minimum + settings.startOffset;
%--- Convert travel time to a distance ------------------------------------
% The speed of light must be converted from meters per second to meters
% per millisecond.
pseudoranges = travelTime * (settings.c / 1000); |