hugomflavio / actel

Standardised analysis of acoustic telemetry data from fish moving through receiver arrays
https://hugomflavio.github.io/actel-website
26 stars 5 forks source link

Improve speed calculations to take into account receiver detection range #117

Open hugomflavio opened 2 weeks ago

hugomflavio commented 2 weeks ago

When arrays are close together, the receiver range can heavily influence the real distance that the animals traveled. This, in turn, affects the calculated speed, and can generate unnecessary speed warnings. Taking into account the receiver range when calculating speeds would fix this.

Addressing this will pave the way to fix https://github.com/YuriNiella/RSP/issues/12 .

hugomflavio commented 2 weeks ago

Some important points from the discussion with Devon:

Objective 1: Provide a range column for each deployment

Objective 2: Provide range as a new input, of format receiver, timestamp, range. This could work nicely with both manual range testing logs and also with the output of range test estimators.

this function checks the speeds in actel, but it doesn't actually calculate them: https://github.com/hugomflavio/actel/blob/d7f157c5f57212c321d25566bb8e223ba91a1633/R/check.R#L443

this is the one responsible for most of speed calculations work: https://github.com/hugomflavio/actel/blob/d7f157c5f57212c321d25566bb8e223ba91a1633/R/movements.R#L182

and then there's this one to well, do what it says it does: https://github.com/hugomflavio/actel/blob/d7f157c5f57212c321d25566bb8e223ba91a1633/R/movements.R#L286

If range is going to be incorporated into the speed calculations, then these need to be changed.

we'd probably want to split the speed column into two: a minimum and a maximum speed

where the max speed uses the receiver distance + both ranges and the min speed uses the receiver distance - both ranges and if the distance - both ranges is <0, then the fish could have not moved so the min speed in that case is 0

hugomflavio commented 2 weeks ago

Some more updates following a discussion with @jdpye

Range is not just a function of the receiver and time, but also of the tag type used, and whether it was set to high or low power. Even so, our road map here is sound (start simple, build in complexity later).

This means that ultimately, we may want to add a third objective, where the ranges input has a few more columns: receiver, tag, power, timestamp, range

This format raises questions of what should be done when the tag we're detecting is not the one that was used for the range testing (or is not on the same power setting). However, I think this is something we can think of far ahead in the future.

This is also where someone else who actually wants to do this can step in and help out :)