Skip to content

Commit

Permalink
fix: WIP better temporary solution, just fail if velocities are in SP3
Browse files Browse the repository at this point in the history
  • Loading branch information
seballgeyer committed Jul 25, 2024
1 parent 9e96872 commit 0f9fc27
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions gnssanalysis/gn_io/sp3.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def _process_sp3_block(
temp_sp3.set_index(dt_index, inplace=True)
temp_sp3.index.name = "J2000"
temp_sp3.set_index(temp_sp3.PRN.astype(str), append=True, inplace=True)
# temp_sp3.set_index(temp_sp3.PV_FLAG.astype(str), append=True, inplace=True)
temp_sp3.set_index(temp_sp3.PV_FLAG.astype(str), append=True, inplace=True)
return temp_sp3


Expand Down Expand Up @@ -166,9 +166,11 @@ def read_sp3(sp3_path: str, pOnly: bool = True, nodata_to_nan: bool = True) -> _
if nodata_to_nan:
sp3_pos_nodata_to_nan(sp3_df) # Convert 0.000000 (which indicates nodata in the SP3 POS column) to NaN
sp3_clock_nodata_to_nan(sp3_df) # Convert 999999* (which indicates nodata in the SP3 CLK column) to NaN
# print(sp3_df)
# if pOnly or parsed_header.HEAD.loc["PV_FLAG"] == "P":
# sp3_df = sp3_df[sp3_df.PV_FLAG == "P"]
if pOnly or parsed_header.HEAD.loc["PV_FLAG"] == "P":
sp3_df = sp3_df.loc[sp3_df.index.get_level_values("PV_FLAG") == "P"]
sp3_df.index = sp3_df.index.droplevel("PV_FLAG")
else:
raise NotImplementedError("Only P* values are currently supported.")
# sp3_df.drop(columns="PV_FLAG", inplace=True)
sp3_df.attrs["HEADER"] = parsed_header # writing header data to dataframe attributes
sp3_df.attrs["path"] = sp3_path
Expand Down

0 comments on commit 0f9fc27

Please sign in to comment.