I try to calculate pseudorange with Android GNSS measurements and I find this question. Question
The two answers of this question show two ways to calculate pseudorange. The first one refers to this link and google's GNSSlogger. It calculates pseudrange with:
Pseudorange[m] = (AverageTravelTime[s] + delta_t[s]) * speedOfLight[m/s]
The second one refers to USING GNSS RAW MEASUREMENTS ON ANDROID DEVICES white paper publicated by gsa. link It calculates pseudrange with:
% Select GPS + GAL TOW decoded (state bit 3 enabled)
pos = find( (gnss.Const == 1 | gnss.Const == 6) & bitand(gnss.State,2^3);
% Generate the measured time in full GNSS time
tRx_GNSS = gnss.timeNano(pos) - (gnss.FullBiasNano(1) + gnss.BiasNano(1));
% Change the valid range from full GNSS to TOW
tRx = mod(tRx_GNSS(pos),WEEKSEC*1e9);
% Generate the satellite time
tTx = gnss.ReceivedSvTime(pos) + gnss.TimeOffsetNano(pos);
% Generate the pseudorange
prMilliSeconds = (tRx - tTx );
pr = prMilliSeconds *Constant.C*1e-9;
I wonder if these two ways are both ok? Thank you.