# Issue with Velocity Control in Offboard Mode for FW

**URL:** <https://discuss.px4.io/t/issue-with-velocity-control-in-offboard-mode-for-fw/48331>\
**Category:** PX4 Autopilot\
**Created:** [January 21, 2026, 12:51am UTC](https://discuss.px4.io/t/issue-with-velocity-control-in-offboard-mode-for-fw/48331 "2026-01-21T00:51:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![imindude](https://discuss.px4.io/user_avatar/discuss.px4.io/imindude/32/11653_2.png) [@imindude](https://discuss.px4.io/u/imindude)\
**Post date:** [January 21, 2026, 12:51am UTC](https://discuss.px4.io/t/issue-with-velocity-control-in-offboard-mode-for-fw/48331/1 "2026-01-21T00:51:38Z")

</div>

I am attempting to control a fixed-wing drone in **Offboard mode** using **MAVSDK**. While I have successfully implemented this for multicopters, I am encountering issues with fixed-wing aircraft. Specifically, while position control works as expected, **velocity control does not seem to function.**

Controlling flight speed is critical for my application, but I am currently unable to adjust it. Below is the code snippet I used:

```auto
mavsdk::Offboard::PositionNedYaw posnedyaw {
    .north_m = std::get<0>(position),
    .east_m = std::get<1>(position),
    .down_m = std::get<2>(position),
    .yaw_deg = heading,
};
mavsdk::Offboard::VelocityNedYaw velnedyaw {
    .north_m_s = std::get<0>(velocity),
    .east_m_s = std::get<1>(velocity),
    .down_m_s = std::get<2>(velocity),
    .yaw_deg = heading,
};
_mav_offboard->set_position_velocity_ned(posnedyaw, velnedyaw);

```

Using this approach, the drone moves toward the target direction, but the speed remains constant and ignores the velocity setpoints. I also tried adding the following line to set the speed explicitly, but it had no effect:

```auto
_mav_action->set_current_speed(speed_mps);

```

I am aware that I could potentially change the speed by modifying the parameter FW\_AIRSPD\_TRIM:

```auto
_mav_param->set_param_float("FW_AIRSPD_TRIM", speed_mps);

```

However, updating parameters during flight for real-time control seems like an improper workaround. I also tested `set_velocity_body` as follows, but it still didn’t work:

```auto
mavsdk::Offboard::VelocityBodyYawspeed vel_body_yaw {
    .forward_m_s = 20,
    .right_m_s = 0,
    .down_m_s = 0,
    .yawspeed_deg_s = heading,
};
_mav_offboard->set_velocity_body(vel_body_yaw);

```

**How can I effectively control the flight speed of a fixed-wing drone in Offboard mode?** Am I missing a specific configuration or using the wrong MAVSDK functions for fixed-wing velocity setpoints?

P.S.  
I initially considered posting this in the MAVSDK category since I am using that SDK. However, I decided to post it here because I believe the issue is more closely related to PX4’s Fixed-wing (FW) mode behavior and controller logic.

---

<div class="post-metadata">

**Author:** ![awaisk65](https://discuss.px4.io/user_avatar/discuss.px4.io/awaisk65/32/20968_2.png) [@awaisk65](https://discuss.px4.io/u/awaisk65)\
**Post date:** [January 21, 2026, 4:48am UTC](https://discuss.px4.io/t/issue-with-velocity-control-in-offboard-mode-for-fw/48331/2 "2026-01-21T04:48:00Z")

</div>

I think implementing PID based attitude control for fixed-wing is the best way to control the flight speed.

---

<div class="post-metadata">

**Author:** ![imindude](https://discuss.px4.io/user_avatar/discuss.px4.io/imindude/32/11653_2.png) [@imindude](https://discuss.px4.io/u/imindude)\
**Post date:** [January 23, 2026, 1:14am UTC](https://discuss.px4.io/t/issue-with-velocity-control-in-offboard-mode-for-fw/48331/3 "2026-01-23T01:14:48Z")

</div>

It’s tougher than I thought.

---

<div class="post-metadata">

**Author:** ![system](https://discuss.px4.io/uploads/default/original/3X/7/3/73ce918bdcd64854de904f0c8d9ab70ca9723f2a.png) [@system](https://discuss.px4.io/u/system)\
**Post date:** [April 23, 2026, 1:15am UTC](https://discuss.px4.io/t/issue-with-velocity-control-in-offboard-mode-for-fw/48331/4 "2026-04-23T01:15:09Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
