# Desired depth and heading commands in a manual mode (e.g. depth hold mode)

**URL:** <https://discuss.bluerobotics.com/t/desired-depth-and-heading-commands-in-a-manual-mode-e-g-depth-hold-mode/5640>\
**Category:** Blue Robotics Software\
**Tags:** pymavlink\
**Created:** [July 26, 2019, 7:21pm UTC](https://discuss.bluerobotics.com/t/desired-depth-and-heading-commands-in-a-manual-mode-e-g-depth-hold-mode/5640 "2019-07-26T19:21:55Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![patrickelectric](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/patrickelectric/32/2162_2.png) [@patrickelectric](https://discuss.bluerobotics.com/u/patrickelectric)\
**Post date:** [July 29, 2019, 12:21pm UTC](https://discuss.bluerobotics.com/t/desired-depth-and-heading-commands-in-a-manual-mode-e-g-depth-hold-mode/5640/2 "2019-07-29T12:21:30Z")

</div>

For depth hold, you can use `set_attitude_target` to select the desired attitude of the vehicle, for the depth, you’ll need to use `rc_channels_override_send` with thrust set points until you hit the desired position.

> [@supun](#):
>
> I can do this in the GUIDED mode via mavlink\_msg\_set\_position\_target\_local\_ned message or mavlink\_msg\_command\_long (MAV\_CMD\_CONDITION\_YAW) message. But as soon as I put the ROV to the GUIDED mode (with a faked underwater GPS input) it does some weird movements

This is probably because your GPS information is not a real system that can give position error information to the ROV, without a real position information (or something close to it), the vehicle will do weird things.

---

_[View the full topic](https://discuss.bluerobotics.com/t/desired-depth-and-heading-commands-in-a-manual-mode-e-g-depth-hold-mode/5640)._
