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

Personal Challenge - A-B and Land

mccay_a

New Member
Joined
Sep 4, 2021
Messages
1
Reactions
0
Age
40
Location
Derry N.Ireland
I have set myself a personal challenge after watching so many Mini 2 videos.

I wish to take off from a location at the top of a hill at 200 M above sea level ( The local heights restriction is 120 M - yet I know that this is set above the current ground level, so any flying objects will always be above 120 M from the highest ground point / not sea level. - not to mention that there will be no flying objects at point A. ) I am also not in any restricted or Yellow Zones when taking off, but Point B is in Yellow consideration Zone of local air port ( The authorisation zone (Blue Zone ) is still many KM away from anywhere I am flying. I need to be below 120M before approaching Point B however.

That being said, my questions is > If I take off from 200 M above sea level and set max height to something like 70 M which I know will clear any terrain between point A - B. Will the drone use its onboard sensors to drop down to this level as it descends down the hill and then remain at that level above ground level / Sea level until point B. Or do I need to compensate at take off > and ensure I manually drop down by 100 M from lift off point as i decent the hill, so it is still 100M above Sea level until point B.

The direct path from Point A to Point B is 4.7 KM so I don't expect to bring it home but instead land at point B ( My worry is that if the onboard sensors cannot compensate then my return to home altitude at any point will be below 200 M and go straight into the side of the hill.

I'm not an idiot however. I plan in testing this to death in increments at every point. I just need to know what the sensors are cable of.

Regards, Alan.
 

Attachments

  • Drone Terrain.jpg
    Drone Terrain.jpg
    93.4 KB · Views: 3
  • Drone Path 1.jpg
    Drone Path 1.jpg
    37.7 KB · Views: 3
  • drone terrain close up.png
    drone terrain close up.png
    489.8 KB · Views: 3
That being said, my questions is > If I take off from 200 M above sea level and set max height to something like 70 M which I know will clear any terrain between point A - B. Will the drone use its onboard sensors to drop down to this level as it descends down the hill and then remain at that level above ground level / Sea level until point B.
First, forget sea level.
It's completely irrelevant to anything related to drone flying.
Your drone has no way to know what sea level is.

The drone has no onboard sensors that could track ground level (the downward facing sensors have a very limited range).
It won't automatically follow the terrain.
Altitude management will be completely up to you.
 
( My worry is that if the onboard sensors cannot compensate then my return to home altitude at any point will be below 200 M and go straight into the side of the hill.
If you were to to use the RTH feature, the drone would ascend to the RTH height you set (RTH height is relative to your launch point) and come home at that level.
If you manually fly home, you can fly at whatever level you choose.
 
If you start a flight at the top of a 200m hill, your flight will record the start/home point as 0m. You can then lift off and fly down the hill, down the slope, and watch the drone altitude drop below zero as it descends. If there were a beach at the bottom of the hill, you'd be able to land at -200m.

Said another way: if you take off from 200m (MSL) with an RTH altitude of 70m (AGL), using the RTH function will cause the drone to fly up to 270m (MSL).

The primary thing that tells the drone altitude information is GPS. And like your car GPS, the GPS signal doesn't care where the receiver is. It simply computes it's XYZ position in space, or LAT, LONG, ALT. GPS knows nothing about the terrain around you.

The maps that accompany the DJI apps may have altitude information, but those are only used for planning and tracking, not real-time flight: so also won't affect your control.
 
Last edited:
The primary thing that tells the drone altitude information is GPS. And like your car GPS, the GPS signal doesn't care where the receiver is. It simply computes it's XYZ position in space, or LAT, LONG, ALT. GPS knows nothing about the terrain around you.
Your drone gets it's altitude data from a barometric sensor, not GPS.
 
Your drone gets it's altitude data from a barometric sensor, not GPS.

@mccay_a said:
I have set myself a personal challenge after watching so many Mini 2 videos.

@meta,
Are you certain the DJI Mini 2 uses a barometer for altitude? The DJI Mini 2 spec sheets states altitude is via GPS or IR/Vision.

  • Hovering Accuracy Range​

  • Vertical: ±0.1 m (with Vision Positioning), ±0.5 m (with GPS Positioning)
    Horizontal: ±0.3 m (with Vision Positioning), ±1.5 m (with GPS Positioning)

ps: there is a DJI authored white paper regarding enterprise drones that will fall back to using a barometer when vision and gps fail... but nothing in that paper hints the RTK system discussed is in Mavic 2 Air or Minis. But even the Matrice using the RTK system specs GPS is used for altitude; though the SDK says using the barometers can be more stable (and unreliable) when writing custom code.


 
Last edited:
Are you certain the DJI Mini 2 uses a barometer for altitude? The DJI Mini 2 spec sheets states altitude is via GPS or IR/Vision.

  • Hovering Accuracy Range​

  • Vertical: ±0.1 m (with Vision Positioning), ±0.5 m (with GPS Positioning)
    Horizontal: ±0.3 m (with Vision Positioning), ±1.5 m (with GPS Positioning)
Yes, I'm certain.
The wording in the specs is misleading.
What they are trying to say is that hovering precision is different when VPS is helping, from when horizontal positioning is using only GPS.

But if you want to confirm, just try flying without GPS and you'll still get good altitude data because the barometric sensor doesn't need GPS.
 
Yes, I'm certain.
The wording in the specs is misleading.
What they are trying to say is that hovering precision is different when VPS is helping, from when horizontal positioning is using only GPS.

But if you want to confirm, just try flying without GPS and you'll still get good altitude data because the barometric sensor doesn't need GPS.
The spec is 0.1 with vision, 0.5 with GPS. Horizontal position is a different spec. Even the enterprise drones say they use gps until it fails, then they fall back to the barometer. So yes, the drone will still operate, but the fact is lack of altitude correction can cause 20% altitude errors.

I'll reiterate - I may very well be wrong... but the spec sheets are the spec sheets.
 
The spec is 0.1 with vision, 0.5 with GPS. Horizontal position is a different spec. Even the enterprise drones say they use gps until it fails, then they fall back to the barometer. So yes, the drone will still operate, but the fact is lack of altitude correction can cause 20% altitude errors.

I'll reiterate - I may very well be wrong... but the spec sheets are the spec sheets.
But I'm not wrong.
VPS will give horizontal and vertical position holding and it's precision is tighter than GPS.
But if your drone is out of VPS range, it uses GPS for horizontal position holding and the barometric sensor for verttical.

I have no idea about the enterprise Mavics except seeing some users complain about mysterious altitude stability issues.
If they are using GPS for altitude, that might help explain the mysterious altitude non-holding problems that have been reported for them.
But all consumer Mavics and Phantoms have always used barometric data for altitude - not GPS.

And you can confirm this by blocking your GPS antenna with aluminium foil and flying with no satellite data, but still maintaining proper altitude and seeing altitude data in the app.
 
  • Like
Reactions: AZDave
The spec is 0.1 with vision, 0.5 with GPS. Horizontal position is a different spec.
You can check the altitude data for the flight in this thread:
A Mavic 2 pro flown in atti mode, without GPS, held altitude beautifully for 1:22.
 
I'm learning, not arguing. So bear with me here. lol.

From what I have read directly from DJI sources linked above, if the GPS fails, the drone reverts to barometric. So your test isn't 100% valid, and what DJI says also explains the guy flying indoors to 33 feet or so. GPS and the other nav systems are (rather can be) quite accurate when you have 12 satellites, a lot closer than what a simple uncal'd barometer gives you.

The altitude info - from what I have read - uses visual data first, when that fails the GPS gets used, and when that fails the barometer is used.

At this point - it isn't relevant to the OP issue. Maybe I'll open up a new thread to bash my head against.
 
The altitude info - from what I have read - uses visual data first, when that fails the GPS gets used, and when that fails the barometer is used.
I've gone as far as I can on this.
Perhaps @sar104 can explain in better detail

But your point about the enterprise models is quite interesting because there have been a couple of puzzling altitude hold troubles reported for those models in the last few months.
Do you have a source for that info?
 
As posted in the link above:

Reading what Sar104 wrote about how the drone determines flight data, I'm no longer sure the altitude finding process is as simple as I've stated earlier, but the overall 'fusion' solution can work with all sources and fall back in that order.
 

Attachments

  • Capture.JPG
    Capture.JPG
    200.4 KB · Views: 5
Last edited:
As posted in the link above:

Reading what Sar104 wrote about how the drone determines flight data, I'm no longer sure the altitude finding process is as simple as I've stated earlier, but the overall 'fusion' solution can work with all sources and fall back in that order.
There's no mystery regarding the principles involved in determining position in these control systems, although the details are certainly proprietary.

The traditional sensors involved are 3-axis accelerometers, 3-axis rate gyroscopes, 3-axis magnetometers (aka the compass), barometer and GNSS. Then you can add the more recent various visual, infrared and ultrasonic sensors into the mix.

Only the GNSS system measures absolute 3-D position with useful accuracy. The barometer measures elevation/altitude in a standard atmosphere (pressure altitude in aviation terms), but that can be hundreds of meters off actual elevation/altitude in a non-standard atmosphere. Barometric pressure is a fairly accurate measure of relative changes in altitude, but neither barometric pressure nor even ideal GNSS reception provide sufficient position/velocity resolution to the FC for P-GPS (loiter) mode or altitude hold modes.

That's where the concept of data fusion comes in. The most sensitive measurements of motion, and the primary source of position and orientation data, come from the accelerometers and rate gyros, but they suffer from two complications:
  1. Neither are absolute measurements: they only indicate changes in position or orientation and so they need a starting value from some other source(s).
  2. Both are rate measurements: the accelerometers measure the second time-derivative of position while the rate gyros measure the first time-derivative of orientation, and so they have to be integrated with respect to time (twice for the accelerometers) in order to get change in position and orientation. This leads to accumulating position and velocity errors that increase with time due to uncertainties and changes (drift) in sensor bias.
(1) is fixed by supplying a starting 3-D position and orientation when the aircraft is powered up and the IMU is initialized. Position is determined by the GNSS solution, if available, and orientation is determined horizontally by the compass and vertically by the accelerometers (which can accurately determine which way is up).

(2) is fixed by data fusion, in which less accurate, but absolute values, for position and orientation are used to correct gradually for the accumulating inertial errors. The algorithms use a Kalman filter or similar to get a stable solution, but if the errors accumulate too fast then that fails and you get the dreaded "position mismatch" or "compass error" faults. The compass is used to correct heading, while the barometer (primary) and GNSS (secondary) are used to correct the altitude. The visual and ultrasonic sensors are not very useful for altitude since the measurements also depend on terrain elevation, which is variable.
 
  • Like
Reactions: eEridani
There's no mystery regarding the principles involved in determining position in these control systems, although the details are certainly proprietary. [snip]
Thanks for chiming in Sar. I read your fine short primer on the drone math in your analysis thread. Excellent overview - quite informative and filled in a few holes I had about general drone flight theory. The details are way over my head - calculus was a subject I studied but never really learned. Thank you for writing it up.

My initial belief was the drone was using visual to hover, gps as a fall back; but your primer made it clear a lot more is going on; especially that I hadn't really considered the flight dynamic and need for real time positional awareness. And that each of the sensors are weighted inputs to the math, and the SK math squirts out a best estimate of reality. Well, until it doesn't.

Again - thank you for your continued support for us mere hobbyists.

ps: if the barometers are weighted as primary - I wonder why DJI marketing literature says the GPS is fixing altitude. Seems like a clear distinction that would be easy to correct; though an agency like the FAA would ask how they are compensating for density altitude to avoid overflying flight restrictions. Perhaps a mystery that will never be solved... lol.
 
Last edited:
Thanks for chiming in Sar. I read your fine short primer on the drone math in your analysis thread. Excellent overview - quite informative and filled in a few holes I had about general drone flight theory. The details are way over my head - calculus was a subject I studied but never really learned. Thank you for writing it up.

My initial belief was the drone was using visual to hover, gps as a fall back; but your primer made it clear a lot more is going on; especially that I hadn't really considered the flight dynamic and need for real time positional awareness. And that each of the sensors are weighted inputs to the math, and the SK math squirts out a best estimate of reality. Well, until it doesn't.

Again - thank you for your continued support for us mere hobbyists.

ps: if the barometers are weighted as primary - I wonder why DJI marketing literature says the GPS is fixing altitude. Seems like a clear distinction that would be easy to correct; though an agency like the FAA would ask how they are compensating for density altitude to avoid overflying flight restrictions. Perhaps a mystery that will never be solved... lol.
I think that the GNSS solution for altitude (takeoff elevation) is used to initialize the IMU - it's more accurate in absolute terms than the barometric altitude AMSL which varies wildly with atmospheric conditions. But the barometric altitude has historically been more accurate (at least with approximately correct density altitude and no sudden changes in atmospheric pressure) for small(fish) relative changes in altitude (~ 100s of ft) than the GNSS, although that is improving as more constellations come on line.
 
I think that the GNSS solution for altitude (takeoff elevation) is used to initialize the IMU - it's more accurate in absolute terms than the barometric altitude AMSL which varies wildly with atmospheric conditions. But the barometric altitude has historically been more accurate (at least with approximately correct density altitude and no sudden changes in atmospheric pressure) for small(fish) relative changes in altitude (~ 100s of ft) than the GNSS, although that is improving as more constellations come on line.
Using a gps fix along with an initial barometer reading to estimate local air density ... that might improve the overall solution moving forward and avoid the bulk errors of using an uncalibrated barometer.
 
Using a gps fix along with an initial barometer reading to estimate local air density ... that might improve the overall solution moving forward and avoid the bulk errors of using an uncalibrated barometer.
It may be adjusting the standard atmosphere based on the difference between actual altitude and pressure altitude. For actual density it needs air temperature though, and I don't think it is measuring that.
 
Lycus Tech Mavic Air 3 Case

DJI Drone Deals

New Threads

Forum statistics

Threads
130,601
Messages
1,554,309
Members
159,608
Latest member
carlos22