diff --git a/cmd_data_plots.py b/cmd_data_plots.py index 755e228..26f533a 100644 --- a/cmd_data_plots.py +++ b/cmd_data_plots.py @@ -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 diff --git a/pilot_plots.py b/pilot_plots.py index f29f6b9..ebd2f10 100644 --- a/pilot_plots.py +++ b/pilot_plots.py @@ -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'), '.') - \ No newline at end of file