Skip to content

Commit 409b8cf

Browse files
authored
Zero number of observations when decoding MSM observations containing 0 satellites (#88)
If there are no satellites/signals present in a set of MSM observation messages then rtcm->obs.n does not get overridden, meaning that the value from the previous epoch is used, leading to unexpected behaviour
1 parent 192d9a6 commit 409b8cf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/convrnx.c

+4
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ static int input_strfile(strfile_t *str)
243243
trace(4,"input_strfile:\n");
244244

245245
if (str->format==STRFMT_RTCM2) {
246+
str->rtcm.obs.n=0;
246247
if ((type=input_rtcm2f(&str->rtcm,str->fp))>=1) {
247248
str->time=str->rtcm.time;
248249
str->ephsat=str->rtcm.ephsat;
@@ -251,6 +252,7 @@ static int input_strfile(strfile_t *str)
251252
}
252253
}
253254
else if (str->format==STRFMT_RTCM3) {
255+
str->rtcm.obs.n=0;
254256
if ((type=input_rtcm3f(&str->rtcm,str->fp))>=1) {
255257
str->time=str->rtcm.time;
256258
str->ephsat=str->rtcm.ephsat;
@@ -259,6 +261,7 @@ static int input_strfile(strfile_t *str)
259261
}
260262
}
261263
else if (str->format<=MAXRCVFMT) {
264+
str->raw.obs.n=0;
262265
if ((type=input_rawf(&str->raw,str->format,str->fp))>=1) {
263266
str->time=str->raw.time;
264267
str->ephsat=str->raw.ephsat;
@@ -271,6 +274,7 @@ static int input_strfile(strfile_t *str)
271274
}
272275
}
273276
else if (str->format==STRFMT_RINEX) {
277+
str->rnx.obs.n=0;
274278
if ((type=input_rnxctr(&str->rnx,str->fp))>=1) {
275279
str->time=str->rnx.time;
276280
str->ephsat=str->rnx.ephsat;

0 commit comments

Comments
 (0)