Skip to content
Snippets Groups Projects
Commit 9d47e5ca authored by Javier Laplaza Galindo's avatar Javier Laplaza Galindo
Browse files

Navigation can hold Galileo satellites now

parent 3d3a7870
No related branches found
No related tags found
1 merge request!2Resolve "Enable Standard Point Positioning (SPP) computation"
......@@ -94,11 +94,15 @@ Navigation createNav(char * nav_path)
FILE *fp = fopen(nav_path,"r");
/* Set constellation mask -SYS=sys[,sys...]: select navi systems (sys=G:GPS,R:GLO,E:GAL,J:QZS,C:BDS,S:SBS) */
char* opt = "-SYS=S";
char* opt = "-SYS=G";
/* Read navigation file */
/* Read navigation file, SYS can be SYS_ALL, SYS_GPS, SYS_SBS, SYS_GLO, SYS_GAL, ... */
if (readrnxnav(fp, opt, 3.03, SYS_ALL, &nav)){
std::cout << "Navigation file loaded" << std::endl;
std::cout << "GPS satellites: " << nav.n << std::endl;
std::cout << "GLONASS satellites: " << nav.ng << std::endl;
std::cout << "SBAS satellites: " << nav.ns << std::endl;
std::cout << "Almanac satellites: " << nav.na << std::endl;
}
else {
......@@ -108,12 +112,12 @@ Navigation createNav(char * nav_path)
/* Print Constellation Satellites ids */
for (int i=0;i<nav.n;i++)
{
std::cout << i << " Sat Id: " << nav.eph[i].sat << std::endl;
std::cout << i << "GPS/GAL Sat Id: " << nav.eph[i].sat << std::endl;
}
for (int i=0;i<nav.ng;i++)
{
std::cout << i << " Sat Id: " << nav.geph[i].sat << std::endl;
std::cout << i << "GLONASS Sat Id: " << nav.geph[i].sat << std::endl;
}
for (int i=0;i<nav.ns;i++)
......@@ -149,8 +153,10 @@ int main(int argc, char *argv[])
// Create Navigation object
Navigation navigation = createNav("/home/jlaplaza/gitlab/gnss_utils/src/examples/raw_201805171357.nav");
//readrnx()
/* Set processing options */
/*
prcopt_t prcopt = prcopt_default;
prcopt.mode = PMODE_SINGLE;
prcopt.soltype = 0;
......@@ -161,19 +167,26 @@ int main(int argc, char *argv[])
prcopt.ionoopt = IONOOPT_OFF;
prcopt.tropopt = TROPOPT_OFF;
prcopt.sbascorr = SBSOPT_FCORR;
*/
std::cout << "Processing options defined." << std::endl;
//Compute fix
/*
int stat;
sol_t solb={{0}};
char msg[128]="";
std::cout << "Test3" << std::endl;
*/
//stat = pntpos(&observations[0], observations.size(), navigation, &prcopt, &solb, NULL, NULL, msg);
std::vector<obsd_t> obs = observations.getObservations();
nav_t nav = navigation.getNavigation();
stat = pntpos(&obs[0], obs.size(), &nav, &prcopt, &solb, NULL, NULL, msg);
std::cout << "Stat: " << stat << std::endl;
std::cout << "Position: " << solb.rr[0] << ", " << solb.rr[1] << ", " << solb.rr[2] << std::endl;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment