baktoft / yaps

YAPS - Yet Another Positioning Solver
GNU General Public License v3.0
17 stars 4 forks source link

Excess 'missed' pings in output of getToaYaps() causing checkInp() to fail #49

Open kphillips10 opened 5 months ago

kphillips10 commented 5 months ago

I'm using tags with rbi_min = 240 sec and rbi_max = 360 sec.

I was getting error inp$datTmb$rbi_min <= min(diff(inp$params$top)) is not TRUE with checkInp(). I followed it back, and found that some of the steps in diff(inp$params$top) were as low as 179 sec, which is approx. half my tags' rbi_max and well below the 228 sec of inp$datTmb$rbi_min (240 sec * 0.95, as calculated in yaps:::getDatTmb() ).

The issue seems to be coming from the TOA object from getToaYaps() having "too many" simulated missed ping columns. I've successfully worked around it with a custom function that identifies affected runs of simulated missed pings, then iteratively shaves a ping off until all the diff(inp$params$top) steps are of a size that checkInp() will accept.

I appreciate that this is a type of fuzziness that 'gappy' data will struggle to escape from.