Skip to content

Commit a272cf9

Browse files
Merge pull request #874 from ourairquality/rtkrcv-ssr-rtcm
rtkrcv show ssr: support rtcm streams as a source
2 parents c9d1c5e + b224b03 commit a272cf9

1 file changed

Lines changed: 14 additions & 9 deletions

File tree

app/consapp/rtkrcv/rtkrcv.c

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ static const char *helptxt[]={
152152
"observ [-n] [cycle] : show observation data",
153153
"navidata [-p] [-n] [cycle] : show navigation data",
154154
"stream [cycle] : show stream status",
155-
"ssr [-c] [-p] [cycle] : show ssr corrections",
155+
"ssr [-[1,2,3]] [-c] [-p] [cycle] : show ssr corrections",
156156
"error : show error/warning messages",
157157
"option [opt] : show option(s)",
158158
"set opt [val] : set option",
@@ -1056,7 +1056,7 @@ static void prstream(vt_t *vt)
10561056
}
10571057
}
10581058
/* print ssr correction ------------------------------------------------------*/
1059-
static void prssr(vt_t *vt, int cbias, int pbias)
1059+
static void prssr(vt_t *vt, int ri, int cbias, int pbias)
10601060
{
10611061
static char buff[128*MAXSAT];
10621062
gtime_t time;
@@ -1067,7 +1067,10 @@ static void prssr(vt_t *vt, int cbias, int pbias)
10671067
rtksvrlock(&svr);
10681068
time=svr.rtk.sol.time;
10691069
for (i=0;i<MAXSAT;i++) {
1070-
ssr[i]=svr.nav.ssr[i];
1070+
if (ri <= 0 || ri > 3)
1071+
ssr[i] = svr.nav.ssr[i];
1072+
else
1073+
ssr[i] = svr.rtcm[ri - 1].ssr[i];
10711074
}
10721075
rtksvrunlock(&svr);
10731076

@@ -1263,8 +1266,9 @@ static void cmd_ssr(char **args, int narg, vt_t *vt)
12631266
trace(3,"cmd_ssr:\n");
12641267

12651268
int cycle = 0;
1266-
int cbias = 0, pbias = 0;
1269+
int ri = 0, cbias = 0, pbias = 0;
12671270
for (int i = 1; i < narg; i++) {
1271+
if (sscanf(args[i], "-%d", &ri) == 1) continue;
12681272
if (strcmp(args[i], "-c") == 0) {
12691273
cbias = 1;
12701274
continue;
@@ -1278,7 +1282,7 @@ static void cmd_ssr(char **args, int narg, vt_t *vt)
12781282

12791283
while (!vt_chkbrk(vt)) {
12801284
if (cycle>0) vt_printf(vt,ESC_CLEAR);
1281-
prssr(vt, cbias, pbias);
1285+
prssr(vt, ri, cbias, pbias);
12821286
if (cycle>0) sleepms(cycle); else return;
12831287
}
12841288
vt_printf(vt,"\n");
@@ -1815,10 +1819,11 @@ static void daemonise(void)
18151819
* stream [cycle]
18161820
* Show stream status. Use option cycle for cyclic display.
18171821
*
1818-
* ssr [-c] [-p] [cycle]
1819-
* Show the RTCM SSR state, with option -c to include code biases and
1820-
* with option -p to include phase biases. Use option cycle for cyclic
1821-
* display.
1822+
* ssr [-[1,2,3]] [-c] [-p] [cycle]
1823+
* Show the RTCM SSR state. Option -1 -2 or -3 selects the respective
1824+
* input, output, or correction RTCM stream index otherwise the combined
1825+
* ssr state is used. Option -c includes code biases and option -p
1826+
* includes phase biases. Use option cycle for cyclic display.
18221827
*
18231828
* error
18241829
* Show error/warning messages. To stop messages, send break (ctr-C).

0 commit comments

Comments
 (0)