OceanGNS / PGPT

A python-based processing tool to turn slocum glider binary files to self-describing US IOOS GDAC v3.0 netcdf files
3 stars 1 forks source link

Dead Reckoning Correction Sometimes Fails #6

Open nbronikowski opened 5 months ago

nbronikowski commented 5 months ago

Sometimes the dead-reckoning code doesn't work. The current implementation relies on the Slocum glider x_dr_state variable to properly identify the dive state e.g. whether the glider is a the surface or about to dive. This information is used to identify the various phases of recording the GPS signal at the surface and estimate surface drift which is used to correct the glider compass recorded m_lon and m_lat variables.

If the code doesn't work the toolbox will still complete and save the netcdf trajectory file but there won't be any data in the lon_qc and lat_qc variables.

The dead reckoning correction code can be found here: https://github.com/OceanGNS/PGPT/blob/77ee28944e5a7d493f5b0b2dfb0406ef02548baf/scripts/gliderfuncs.py#L277

The theory for how the code works is explained here and also shown in the attached image: https://oceangliderscommunity.github.io/DepthAverageCurrents_SOP/sections/DACs_rtqc.html

water-velocity-calculations-fig1