diff --git a/rinex/src/header.rs b/rinex/src/header.rs index 1cf330381..cde89e601 100644 --- a/rinex/src/header.rs +++ b/rinex/src/header.rs @@ -1610,11 +1610,14 @@ impl Header { /* * List of observables */ - for (constell, observables) in &obs.codes { + for (index, (constell, observables)) in obs.codes.iter().enumerate() { let mut descriptor = String::new(); descriptor.push_str(&format!("{:x}{:5}", constell, observables.len())); - for observable in observables { - descriptor.push_str(&format!(" {}", observable)); + for (i, observable) in observables.iter().enumerate() { + if (i % 13) == 0 && (i > 0) { + descriptor.push_str(&format!(" ")); // TAB + } + descriptor.push_str(&format!(" {}", observable)); // TAB } writeln!(f, "{}", fmt_rinex(&descriptor, "SYS / # / OBS TYPES"))?; } diff --git a/rinex/src/lib.rs b/rinex/src/lib.rs index d604f4e2d..c3282a2da 100644 --- a/rinex/src/lib.rs +++ b/rinex/src/lib.rs @@ -147,12 +147,9 @@ pub(crate) fn fmt_rinex(content: &str, marker: &str) -> String { for i in 0..nb_lines { let start_off = i * 60; let end_off = std::cmp::min(start_off + 60, content.len()); - string.push_str(&format!( - "{: