seafloor-geodesy / gnatss

Community Seafloor Global Navigation Satellite Systems - Acoustic (GNSS-A) Transponder Surveying Software
https://gnatss.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
9 stars 12 forks source link

Bug: outliers in deletions.csv not removed when transducer delay is greater than 0 #283

Open johnbdesanto opened 1 month ago

johnbdesanto commented 1 month ago

This is a bug I have found in the 0.1.2/0.1.1 version (prior to gnatss --version being implemented), so there may be some differences between this and the 0.2.0 build.

I am processing a 2019 data set using data collected with the model SV2 wave glider. This is a deprecated surface platform that has some differences compared to the model SV3 data that is the current standard for US GNSS-A ops. However, I can still generate the pxp_tt and POS_FREED_TRANS_TWTT files required to run gnatss.

When I run gnatss on this data set, it generates some outliers as normal. However, when I run gnatss a second time the outliers are not removed and flagged a second time.

The issue is that the transducer delay of the SV2 data is 0.1 s. However, by convention this means that the time in pxp_tt is 0.1 s less than the time in POS_FREED_TRANS_TWTT. Gnatss can account for this by adding the transponder delay to the times in pxp_tt, so it passes the timing cross-check and runs without error. However, it saves the send time after adding 0.1s to the deletions file.

starttime,endtime
613214745.1,613214745.1

When it runs a second time, this outlier is not flagged. However, if I modify the deletion by removing the decimal second, it is.

starttime,endtime
613214745,613214745

I believe what is happening is that the deletion time is being compared to the pxp_tt time, which falls outside the deletion window before the transducer delay is added.

Need to test this on the current build to see if this bug persists and look into deletion flagging to clarify what the code is checking against.