# DVL A50 rangefinder capability

**URL:** <https://discuss.bluerobotics.com/t/dvl-a50-rangefinder-capability/11546>\
**Category:** ArduSub\
**Tags:** ardusub, dvl\
**Created:** [February 11, 2022, 9:56pm UTC](https://discuss.bluerobotics.com/t/dvl-a50-rangefinder-capability/11546 "2022-02-11T21:56:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sammi](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@Sammi](https://discuss.bluerobotics.com/u/Sammi)\
**Post date:** [February 11, 2022, 9:56pm UTC](https://discuss.bluerobotics.com/t/dvl-a50-rangefinder-capability/11546/1 "2022-02-11T21:56:24Z")

</div>

I have been trying to use waterlinked DVL A50 altitude measurement in ArduSub but I am running into some problems.

Background: DVL integration has gone smoothly and Position hold is working fine. I can see DVL’s readings in its GUI and they look good.

Approach: I activated RangeFinder option in waterlinked tab of the companion website and added a case MAVLINK\_MSG\_ID\_DISTANCE\_SENSOR in GCS\_Mavlink. ArduSub does receive a measurement but the latter doesn’t track altitude and seems to catch up with a very long lag (~10s) and the measurement update rate is only 1Hz.

Any pointers to fix these problems? Or perhaps I should take a different approach?

Thanks!

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [February 14, 2022, 12:07pm UTC](https://discuss.bluerobotics.com/t/dvl-a50-rangefinder-capability/11546/2 "2022-02-14T12:07:56Z")

</div>

Hi @Sammi, welcome to the forum 🙂

> [@Sammi](#):
>
> Background: DVL integration has gone smoothly and Position hold is working fine. I can see DVL’s readings in its GUI and they look good.

Glad to hear it - sounds like a solid start 🙂

> [@Sammi](#):
>
> added a case MAVLINK\_MSG\_ID\_DISTANCE\_SENSOR in GCS\_Mavlink.

I’m a bit confused here - the rangefinder messages are sent to the autopilot, and get automatically forwarded to QGC. What modification(s) are you trying to make in ArduSub?

> [@Sammi](#):
>
> ArduSub does receive a measurement but the latter doesn’t track altitude and seems to catch up with a very long lag (~10s) and the measurement update rate is only 1Hz.

The rangefinder updates are [at the same time as the velocity updates](https://github.com/bluerobotics/companion/blob/master/services/waterlinked/dvl-a50/dvl.py#L391-L402). If position holding is working fine I expect that must be faster than 1 Hz.

If I’m understanding your intent correctly, [this thread](https://discuss.bluerobotics.com/t/auto-altitude-control/6265/11) may be worth having a read of.

---

<div class="post-metadata">

**Author:** ![Sammi](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@Sammi](https://discuss.bluerobotics.com/u/Sammi)\
**Post date:** [February 15, 2022, 2:35am UTC](https://discuss.bluerobotics.com/t/dvl-a50-rangefinder-capability/11546/3 "2022-02-15T02:35:49Z")

</div>

Hi @EliotBR,

Thanks for taking the time to reply! These resources have been very helpful to better understand ArduSub background.

Regarding my problem, it turns out it disappeared when testing in deeper water. I haven’t tested again in shallow water but that may have been the problem…
