@@ -53,19 +53,21 @@ impl Observations {
53
53
self . format_epoch_v2 ( w, key, sv_list, numsat) ?;
54
54
55
55
for sv in sv_list. iter ( ) {
56
- // following header specs (strictly)
56
+ // V2 is too badly specified to permit correct SBAS handling
57
57
let observables = if sv. constellation . is_sbas ( ) {
58
- observables
59
- . get ( & Constellation :: SBAS )
60
- . ok_or ( FormattingError :: MissingObservableDefinition ) ?
58
+ observables. get ( & Constellation :: SBAS )
61
59
} else {
62
- observables
63
- . get ( & sv. constellation )
64
- . ok_or ( FormattingError :: MissingObservableDefinition ) ?
60
+ observables. get ( & sv. constellation )
61
+ } ;
62
+
63
+ let observables = match observables {
64
+ Some ( observables) => observables, // correctly identified
65
+ None => continue , // abort
65
66
} ;
66
67
67
68
let mut modulo = 0 ;
68
69
70
+ // following header specs (strictly)
69
71
for ( nth, observable) in observables. iter ( ) . enumerate ( ) {
70
72
// retrieve observed signal (if any)
71
73
if let Some ( observation) = self
@@ -181,14 +183,11 @@ impl Observations {
181
183
write ! ( w, "{:x}" , sv) ?;
182
184
183
185
// following header definitions
184
- let observables = if sv. constellation . is_sbas ( ) {
185
- observables
186
- . get ( & Constellation :: SBAS )
187
- . ok_or ( FormattingError :: MissingObservableDefinition ) ?
188
- } else {
189
- observables
190
- . get ( & sv. constellation )
191
- . ok_or ( FormattingError :: MissingObservableDefinition ) ?
186
+ let observables = observables. get ( & sv. constellation ) ;
187
+
188
+ let observables = match observables {
189
+ Some ( observables) => observables, // correctly identified
190
+ None => continue , // abort
192
191
} ;
193
192
194
193
for observable in observables. iter ( ) {
0 commit comments