From 13b738f3409891b831e0ff154fcf35aef0dbfa4c Mon Sep 17 00:00:00 2001 From: Nathan <95725385+treefern@users.noreply.github.com> Date: Wed, 16 Oct 2024 03:50:05 +0000 Subject: [PATCH] NPI-3547 attempt to address crash related to sp3 flag rendering code --- gnssanalysis/gn_io/sp3.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gnssanalysis/gn_io/sp3.py b/gnssanalysis/gn_io/sp3.py index 5ceaa37..e2a3588 100644 --- a/gnssanalysis/gn_io/sp3.py +++ b/gnssanalysis/gn_io/sp3.py @@ -598,8 +598,13 @@ def gen_sp3_content( # Squish all the flag columns into a single string with the required amount of space (or none), so that # DataFrame.to_string() can't mess it up for us by adding a compulsory space between columns that aren't meant # to have one. + # Types are also conformed to str here due to occaisional concat errors, where one of these flags is interpreted as an int. flags_squished_df = _pd.DataFrame( - flags_df["Clock_Event"] + flags_df["Clock_Pred"] + " " + flags_df["Maneuver"] + flags_df["Orbit_Pred"] + flags_df["Clock_Event"].astype(str) + + flags_df["Clock_Pred"].astype(str) + + " " # Two blanks (unused), as per spec. Should align with columns 77,78 + + flags_df["Maneuver"].astype(str) + + flags_df["Orbit_Pred"].astype(str) ) flags_squished_df.columns = ["FLAGS_MERGED"] # Give it a meaningful name (not needed for output)