DJI Mavic, Air and Mini Drones
Friendly, Helpful & Knowledgeable Community
Join Us Now

Does a drone fly a heading or track?

KLJ5

Well-Known Member
Joined
Jan 28, 2022
Messages
57
Reactions
19
Age
77
Location
Victoria, B.C. Canada
Hi everyone. I'm trying to figure out something I haven't yet determined by trial and observation. I'm wondering if some of you could tell me if a gps equipped drone (Mavic 2 Pro) will fly a track or a heading given the following:
  1. autopilot not programmed to fly to a waypoint
  2. good satellite reception
  3. strong crosswind at 90° to the heading
It appeared to me as if while doing figure 8's in a steady wind that there may have been some drift, so maybe it was flying a heading. However, to counter that, if I'm hovering and for example moved the right stick to the left, only one axis would change. i.e. I'd slide to the left but the altitude and heading would remain constant. If I was hovering and moved the left stick back, the drone descends in a wind without changing horizontal position. How about if I'm hovering and only move the right stick forward? The drone changes fore and aft position - a change in one axis - but does it slide left or right in a crosswind?
Thanx in advance for enhancing my wisdom.
 
Heading.

To fly a course you need to use waypoints.

Hovering in place is an entirely different animal. When not moving, Position Hold functionality is active, and depending on AGL, it's either using VPS (<30-45ft depending on model) or GPS to hold position.

Whether moving or stationary, control input will always cause ONLY response on the axis you're controlling, regardless of wind. Roll left and it will tilt left in proportion to the stick deflection. There will be no pitch response.

Once you are commanding movement, the Flight Controller stops trying to hold position, and no longer exhibits small, rapid automatic pitch/roll movements to counter displacement from the held position.

So, if you have a tailwind, the drone is facing away from you hovering, and you roll right for 100' and then left to bring it right back in front of you, it will be further away when it stops due to the tailwind.
 
Last edited:
  • Like
Reactions: sawman
Track. The drone compensates for wind. If only the heading remained constant, the drone would drift with a crosswind, even though it remained pointed in the same direction.
 
  • Like
Reactions: Meta4
I have done one long flight with an m2p/z with a more or less constant sidewind and I am left with the impression it did drift slightly on the out bound leg but I recollect it wasn't so bad on the return.

How are you judging there to be sideslip?
If you are aiming the drone at a target via the camera then the camera need not be 'dead' straight and that will result in what looks to be sideslip.
Equally if you are aiming the drone by looking at the drone and yawing it until you think it is pointing straight at the target then there may be some error in your judgement.
 
Track. The drone compensates for wind. If only the heading remained constant, the drone would drift with a crosswind, even though it remained pointed in the same direction.

Drift – that's exactly what all of mine do.

Further, it would have to either change the heading and crab, or add uncommanded roll, again neither of which I've ever seen in significant wind.

I just may not have noticed, certainly possible.
 
Here below you have a graphical representation out from the data in one of my drones DAT flightlogs...

The green bar shows the wind direction (wind coming from NW with 8-9m/s)
The black bar shows the yaw direction (how the drone was pointing)
The blue bar shows the total tilt direction (combination of pitch & roll)
The red line is the flight path

Here was only pitch applied from my side (right stick fully forward), but as seen from the blue bar the drone both pitched... & rolled (the later without a command from me), this to counter sideways drift.

1708205443400.png
 
@slup well I'll be gobsmacked...
Well... a "photo drone's" gimbal & "secret automated attitude adjustments" in other axis than those you command hides a lot.

Below is a pic. from a flight with my 5" quad (in acro or full manual control) with a fixed camera... I wanted to reach & fly straight towards the red X... the rather strong wind came according to the red arrow. And you can see that I, above pitch for forward speed, also needed to put in quite a lot of roll to fight the side wind... had to lean into the wind. A DJI drone does exactly the same.

1708207554732.png
 
@slup the experience I was referring to was watching the drone directly and observing it's control movements.

Geez, buddy, I am familiar (quite) with that magical, fantasmagorical stabilizing gimbal and what it does for the camera.

Just sayin'... 😁😁😁
 
  • Like
Reactions: landscapetog
Here below you have a graphical representation out from the data in one of my drones DAT flightlogs...

The green bar shows the wind direction (wind coming from NW with 8-9m/s)
The black bar shows the yaw direction (how the drone was pointing)
The blue bar shows the total tilt direction (combination of pitch & roll)
The red line is the flight path

Here was only pitch applied from my side (right stick fully forward), but as seen from the blue bar the drone both pitched... & rolled (the later without a command from me), this to counter sideways drift.

View attachment 172677
That's an excellent graphical response. I believe what you've said so well with your response is that the track and heading coincide, the wind being offset by GPS input influencing the drone to slide to its left to compensate for wind. Thanx for taking the trouble to post this.
 
  • Like
Reactions: slup
That's an excellent graphical response. I believe what you've said so well with your response is that the track and heading coincide, the wind being offset by GPS input influencing the drone to slide to its left to compensate for wind. Thanx for taking the trouble to post this.
Heading and track don't have to coincide. Consider a drone pointed north into a north wind and being flown west (right stick pushed to the left) while still pointed north. The drone will automatically pitch downward to compensate for the wind and maintain a 0 degree heading while flying a 270 degree track.

Of course, heading doesn't have quite the same meaning for a quadcopter drone as it does for a conventional airplane, since they can fly similarly in any direction.
 
Heading and track don't have to coincide. Consider a drone pointed north into a north wind and being flown west (right stick pushed to the left) while still pointed north. The drone will automatically pitch downward to compensate for the wind and maintain a 0 degree heading while flying a 270 degree track.

Of course, heading doesn't have quite the same meaning for a quadcopter drone as it does for a conventional airplane, since they can fly similarly in any direction.
You're absolutely right! Late at night when I wrote a response that I know better than to write. Having racked up over 20,000 flying hours, I know better. :>)
 
  • Like
Reactions: MS Coast
You're absolutely right! Late at night when I wrote a response that I know better than to write. Having racked up over 20,000 flying hours, I know better. :>)
I know what you mean. Sometimes I think drones might be easier to understand if you didn't know anything about conventional aircraft.

(It would take me several years of flying 0900-1700 every day to match your flight time.)
 
Heading and track don't have to coincide. Consider a drone pointed north into a north wind and being flown west (right stick pushed to the left) while still pointed north. The drone will automatically pitch downward to compensate for the wind and maintain a 0 degree heading while flying a 270 degree track.

This is how things would work if the FC wasn't actively compensating with roll to counter wind effects, as @sar104 showed.

Unless I've misunderstood what his example shows, it looks like the FC will compensate for a crosswind component by tilting on the roll axes to counter the wind, and keep the GPS derived heading the same as the compass heading.

I can't think of any way to defeat this, and it's not selectable in the control interface. So, bottom line is you can't fly a different track (course, c'mon guys, that's the correct term 😉😁) than your heading, without using some automation feature like waypoints.

9:43am, we are in between storms here in Santa Cruz, but it's windy... perfect opportunity to do some controlled testing of this, gather data, etc. Storms are back with greater fury tonight.

Back in a few hours with some logs. Going to use the Mini 4P as that should get pushed around pretty good by the wind.
 
This is how things would work if the FC wasn't actively compensating with roll to counter wind effects, as @sar104 showed.

Unless I've misunderstood what his example shows, it looks like the FC will compensate for a crosswind component by tilting on the roll axes to counter the wind, and keep the GPS derived heading the same as the compass heading.

I can't think of any way to defeat this, and it's not selectable in the control interface. So, bottom line is you can't fly a different track (course, c'mon guys, that's the correct term 😉😁) than your heading, without using some automation feature like waypoints.

9:43am, we are in between storms here in Santa Cruz, but it's windy... perfect opportunity to do some controlled testing of this, gather data, etc. Storms are back with greater fury tonight.

Back in a few hours with some logs. Going to use the Mini 4P as that should get pushed around pretty good by the wind.
Terrific! I'll be looking forward to seeing your results. I believe that that SLUP's data should confirm that the drone will fly a track in a crosswind. i.e. it will self correct for drift regardless of whether or not an autopilot is programmed to fly to a waypoint.
 
Some nomenclature clarification might be useful.

wind-correction-angle-2660886846.gif

With a crosswind, airplanes achieve the desired track (fly the desired course) by yawing into the wind. Drones match the track to the desired course by adjusting the drone's attitude on the roll axis. That's done automatically by the flight controller, with the aid of the GPS. Using a waypoint is not necessary.
 
Terrific! I'll be looking forward to seeing your results. I believe that that SLUP's data should confirm that the drone will fly a track in a crosswind. i.e. it will self correct for drift regardless of whether or not an autopilot is programmed to fly to a waypoint.

Oh, I believe @slup's example. I'm testing not to confirm what he's already shown, but rather to characterize things like error margin.

Going out in a bit. Simple test: Pitch stick only, go out 1000' crosswind, reverse (pitch back) until it's back, repeat a few times.

I'm expecting there to be some error in return position, and maybe compass heading, that grows with each transition.
 
Using compass and GPS the flight controller predicts the course and speed the aircraft should be traveling based on the
Hi everyone. I'm trying to figure out something I haven't yet determined by trial and observation. I'm wondering if some of you could tell me if a gps equipped drone (Mavic 2 Pro) will fly a track or a heading given the following:
  1. autopilot not programmed to fly to a waypoint
  2. good satellite reception
  3. strong crosswind at 90° to the heading
It appeared to me as if while doing figure 8's in a steady wind that there may have been some drift, so maybe it was flying a heading. However, to counter that, if I'm hovering and for example moved the right stick to the left, only one axis would change. i.e. I'd slide to the left but the altitude and heading would remain constant. If I was hovering and moved the left stick back, the drone descends in a wind without changing horizontal position. How about if I'm hovering and only move the right stick forward? The drone changes fore and aft position - a change in one axis - but does it slide left or right in a crosswind?
Thanx in advance for enhancing my wisdom.
If you push the right stick forward the flight controller is trying to keep the aircraft going straight forward at a consistent speed relative to the earth using GPS.

If there is a cross wind the flight controller will make adjustments to keep it on that straight line by rolling the aircraft. The aircraft is also making pitch corrections to keep the aircraft moving at a constant speed which will be affected by the aircraft rolling.

Having said that, there is a built in limit to how vigorously the aircraft keeps along that straight line. In the flight controller software, if I remember correctly the master parameter for this g_config.control.horiz_pos_gain_0 although there are lots of other parameters that go into it. If you turn this up too high the aircraft will become a jerky sloppy mess. DJI has these things tuned up pretty darn good.

The logic for keeping the aircraft hovering in place after braking is actually a different set parameters.

So in conclusion. It will try to fly straight and it will resist the wind but only up to a point. The further you fly the more the wind will affect it.
 
Why would the drone try to fly a straight line without a specific selected course and how does that differentiate from when it IS trying to maintain a course?
Isn't the GPS data only for stability until a waypoint/flight plan programmed?
 
Using compass and GPS the flight controller predicts the course and speed the aircraft should be traveling based on the

If you push the right stick forward the flight controller is trying to keep the aircraft going straight forward at a consistent speed relative to the earth using GPS.

If there is a cross wind the flight controller will make adjustments to keep it on that straight line by rolling the aircraft. The aircraft is also making pitch corrections to keep the aircraft moving at a constant speed which will be affected by the aircraft rolling.

Having said that, there is a built in limit to how vigorously the aircraft keeps along that straight line. In the flight controller software, if I remember correctly the master parameter for this g_config.control.horiz_pos_gain_0 although there are lots of other parameters that go into it. If you turn this up too high the aircraft will become a jerky sloppy mess. DJI has these things tuned up pretty darn good.

The logic for keeping the aircraft hovering in place after braking is actually a different set parameters.

So in conclusion. It will try to fly straight and it will resist the wind but only up to a point. The further you fly the more the wind will affect it.
Hey Brett. That's really interesting. Thanx for your well written response. Could you please tell me if you know of a reference from which I could read up on what controls what. I believe you've pretty much confirmed what I'd suspected, but I'd sure like to learn more about the why's. Cheers!
 
Lycus Tech Mavic Air 3 Case

DJI Drone Deals

New Threads

Forum statistics

Threads
130,987
Messages
1,558,666
Members
159,981
Latest member
bbj5143