tomojitakasu / RTKLIB

2.58k stars 1.63k forks source link

Run SPS (pntpos) with precise orbits and clocks #733

Closed rodrigo-moliveira closed 12 months ago

rodrigo-moliveira commented 12 months ago

Hello. I would like to know if it is possible to run function pntpos with precise orbits and clocks (loaded from SP3 and CLK files). I have been able to run it with broadcast navigation (NAV file), but I'd like to also test with the precise products. In my application I need to perform positioning for just one epoch.

A snippet of what my code looks like is the following


// load obs files...

// load SP3 and CLK files
readsp3(sp3_file, nav, 1);
readclk(clk_file, nav, 1);

// setup options
prcopt_t    RTKlib_proc_opt;
rtk_t       RTKlib_sol;
RTKlib_proc_opt.mode = PMODE_SINGLE;
RTKlib_proc_opt.ionoopt = IONOOPT_BRDC;
RTKlib_proc_opt.tropopt = TROPOPT_SAAS;
RTKlib_proc_opt.elmin = 0.;
RTKlib_proc_opt.maxgdop = 10;
RTKlib_proc_opt.sateph = EPHOPT_PREC; // I set this to use precise products
RTKlib_proc_opt.navsys = SYS_GPS;

rtkinit(&RTKlib_sol, &RTKlib_proc_opt);

char    info[1024];
int ret_pntpos = pntpos(obs_data,
    n_of_obs,
    nav,
    &RTKlib_proc_opt,
    &RTKlib_sol.sol,
    NULL, NULL, info);

I always get the error lack of valid sats ns=5. Is there something missing in my setup?

NOTE: This code works when I replace EPHOPT_PREC with EPHOPT_BRDC and the clk/sp3 files with a nav file

Thanks in advance

tomojitakasu commented 12 months ago

See Issue #87.

https://github.com/tomojitakasu/RTKLIB/issues/87

rodrigo-moliveira commented 12 months ago

Thank you for the clarification