Skip to content

Commit

Permalink
fix pitch error
Browse files Browse the repository at this point in the history
  • Loading branch information
callumrollo committed Apr 17, 2024
1 parent eca5128 commit 4370393
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 4 additions & 2 deletions cmd_data_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,16 @@ def measure_drift(path):

return df_vel.dropna(how='all'), total_time


def dst_data(path):
nmea_sep = load_all_cmd(path)
time = nmea_sep.where(nmea_sep[0] == '$SEADST').dropna(how='all').DATE_TIME
surf_z = nmea_sep.where(nmea_sep[0] == '$SEADST').dropna(how='all')[6]
surf_z = surf_z[~surf_z.astype(str).str.lower().str.contains('nan')]
pitch_raw = nmea_sep.where(nmea_sep[0] == '$SEADST').dropna(how='all')[4]
dst_info = pd.DataFrame({"time": time,
"pitch": nmea_sep.where(nmea_sep[0] == '$SEADST').dropna(how='all')[4].astype(float),
"surf_depth":surf_z[surf_z.str.contains('\d', regex=True).astype(bool)].astype(float),
"pitch": pitch_raw[pitch_raw!=""].astype(float),
"surf_depth": surf_z[surf_z.str.contains('\d', regex=True).astype(bool)].astype(float),
"Cycle": nmea_sep.where(nmea_sep[0] == '$SEADST').dropna(how='all').Cycle})
return dst_info

Expand Down
1 change: 0 additions & 1 deletion pilot_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,3 @@ def battery_plots(combined_nav_file, out_dir):
if __name__ == '__main__':
from pathlib import Path
battery_plots(Path('/data/data_l0_pyglider/nrt/SEA44/M85/rawnc/Martorn-rawgli.parquet'), '.')

0 comments on commit 4370393

Please sign in to comment.