Closed ngkavin closed 4 years ago
Ugh, upon digging into the code some more, I found a bug 😎
Under the MRU datagram (here)
self.mru_data['timestamp']
records the actual MRU timestamp
but when saving to platform group, we currently have
out_dict['ping_time'] = self.ping_time
which is the ping time from the RAW datagram (echo data) (here).
Lat/lon have another time base from the NME datagram and that timestamp is now correctly saved into the Platform group.
For some EK80 data files, pitch, roll, heave, and NMEA data are not recorded, so they are saved as empty lists. When creating an xarray dataset, pitch, roll, heave, lat, and lon are assumed to have coordinates of time, so an error is raised when these values are empty.
The best solution is likely to fill empty pitch, roll, heave, lat, and lon values with NaNs with length of ping_time so that it can be saved to the xarray dataset.