tomojitakasu / RTKLIB

2.58k stars 1.63k forks source link

pntpos Requires 7 SVs? #565

Open Hahne29 opened 3 years ago

Hahne29 commented 3 years ago

Hi,

I am trying to use pntpos to do standard positioning with Rinex files. I was wondering why does pntpos require 7 SVs? I am guessing this is to solve for the clock offset between constellations, but if you are only using GPS why is it not possible to only use 4?

Thanks.

tomojitakasu commented 3 years ago

pntpos requires minimum 4 SVs only with GPS. Confirm ns fields of solution file or residuals file for number of satellite in use.

Hahne29 commented 3 years ago

I keep getting this error: 'lack of valid sats ns=4' where it indicates that there are only 4 valid sats. Looking in the code it looks like that happens if there are not at least 7 valid SVs.

In pntpos.c, it defines NX as 7 with:

define NX (4+3) / # of estimated parameters /

then checks if the number of svs is less than that: if (nv<NX) { sprintf(msg,"lack of valid sats ns=%d",nv); break; }

Am I interpreting this error message wrong?

tomojitakasu commented 3 years ago

The nv includes not only number of valid SVs but number of constraints to avoid rank-deficient if a satellite system have no SV. Refer function rescode(). I think it is a little tricky technique and have been looking for better solutions. I agree the error message is not suitable. It should be replaced.

Hahne29 commented 3 years ago

Thank you