Closed oftfrfbf closed 2 months ago
@oftfrfbf : Thanks for reporting this. @ctuguinay and I looked into this briefly and what we found was that this is not a bug in the code. This is due to the GPS data having values that are literally 0 before actual values show up, so the interpolated values are between 0 and 43.xxx.
We think that this is something that we should not try to "fix" automatically in the Echopype codebase, because there are many ways the GPS data can go wrong with interpolation (like the recent #1294). Instead, we will add a warning about GPS values having 0s, since that is unlikely the case for actual measurements. Users can then decide how they want to clean up the GPS data before calling add_location
.
Let us know if you have additional thoughts on this.
Closed by #1296
Hello, I am trying to use echopype to match up Sv data with its associated geospatial information and I am getting strange GPS values when using "add_location()". I have noticed this happening with a number of different raw files, below I include one example.
This is using python 3.10.12 and echopype==0.8.3.
This first piece of code is my manual method for pairing up NMEA datagram latitude and longitudes with the nearest ping_time and this works as expected:
And below here is code that uses the "add_location()" method which seems to introduce new values such as "19.572214" and "23.97964":
The main cruise path is in the upper left, and the new points seem to be extrapolated between the feature and Null Island.![Screenshot 2024-03-20 at 2 59 21 PM](https://github.com/OSOceanAcoustics/echopype/assets/7818564/ec9225df-6866-4341-a62c-8365a21ec7c3)
If you have access to Google Colab, I have a notebook that should be shared here to use:
I am wondering if this is a coding error on my part or if there is a problem with the interpolation. Looking here:
https://github.com/OSOceanAcoustics/echopype/blob/7f7e68bff98ced27644db88e1bf94600826c150f/echopype/consolidate/api.py#L186
Does it make sense to define 'method="nearest"' for the interpolation?
I have traditionally opted for numpy's searchsorted aligned from the "right" so that Sv data isn't paired with potentially stale GPS values in some edge cases where the data jumps position mid-file.
It would be nice to hear what others thoughts are on the subject. And thank you for any help!