Reputation: 11
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.
Upvotes: 1
Views: 729
Reputation: 2779
The RAW measurements API gives you the SV time which is basically the time of flight of the signal. To convert this to the actual pseudoranges, you will need ephemeris data. The math is not easy, to I would suggest looking at RTKlib.
Upvotes: 3