GPS alt lower than reality

Greetings,

I’ve encountered it on two of my drones, both running Matek F405 miniTE, loaded with Arducopter (one is 4.2.3, another is 4.3.0).
Both of them get GPS altitude offset by about 3-5-8 metres lower, than reality. I can see it visually analyzing the logs (for example on DroneLogbook) - drone “dives” in and out of the terrain.

Annoying problem though is that it affects flight plans/guided, as I tried to fly to waypoint 5m AGL, and drone wanted to fly into ground (caught it just before).

It happens both with a cheap aliexpress M8N GPS, and with Matek M8Q-5883 receivers.
I have on average 13-17 satellites.

Is there a workaround to manually specify altitude offset in QGroundControl or MissionPlanner ?

Thanks.

1 Like

We would need a .bin log file to tell what’s happening.

Fly 5 meters off the ground on GPS altitude source is not a good idea, unless you are in RTK fixed. We use GPS alt source all the time and our job is flying over things at low altitude to take detailed pics, the only way of doing it is on a F9P or equivalent with an ntrip or base correction.

interesting, is there a way to have corrections sent from “base station” being a phone/tablet running QgroundControl ? I know QGC uses this king of feedback for “follow me” mode in PX4, but anything similar in Arducopter?

A .bin log will tell us if there’s anything else we can do with the existing setup.

The Follow Me data is the same low accuracy info that you already have from your standard GPS unit, so it doesnt help.

The way to improve the accuracy is get a GPS unit with at least M9N chipset or go to a ground station with RTK (which requires a better unit on your aircraft anyway)
https://ardupilot.org/copter/docs/common-positioning-landing-page.html#rtk-gps

This one: flight plan was:
take off to 10m
go to waypoint at 5m
go to waypoint at 10m,
RTL (I have it set to always RTL at 15m AGL, safer from trees and buildings).

As you can see, started fine, up to 10, down to 5, back to 10, then up to 15 for RTL, then somehow it landed at -5 m.
(and I’ve interfered with the slow landing descent, selected to Stabilize and landed manually).

Thanks

log_1_UnknownDate.zip (525.2 KB)

M9N is ABSOLUTELY not enough to fly at 5 meters. If GPS source is used as alt reference than RTK Fixed is needed.

1 Like

Yes agreed, I’m just saying the newer chipset should be a bit better than the old M8

QGC can’t at the moment. MP will inject RTK corrections from a cors and send it to ardupilot to use them over mavlink.
We use an onboard modem and a raspberry to get cors corrections and feed them direcly to the F9P.

1 Like

Tuning can be improved, that will actually help in that you can better see what’s going on and trust the copter more. Also you’ll know if problems are creeping in. Use Loiter instead of PosHold.
As a summary, I think the changes I’m proposing will improve the GPS situation and start to improve the tuning - these combined should make a big difference to the position errors you are seeing.

But first, the GPS HDOP is bad for a lot of that flight, HDOP is not everything but it is a strong indicator. A value of below 1.0 is OK and 0.8 or below is quite good.

And vibrations are bad, you need to get them all below about 15 or 20, especially Z axis.
Hold off on doing flying until you fix the vibrations at least! There’s sections in the doc about fixing vibrations.

These two things combined mean your GPS track and IMU-calculated position are never aligning - the copter will be having a hard time working out where it is exactly. The red and blue lines should be one on top of the other when everything is operating correctly.
image

To improve the GPS performance try
GPS_GNSS_MODE,5 or 65
and see which gives you the best/most stable HDOP - you can do this outside while connected to MissionPlanner via cable if you need to. Power-cycle between changes. There’s no need to launch and fly.

Then improve the tuning and a few things
Set these
ARMING_CHECK,1
BATT_FS_CRT_ACT,1
BATT_FS_LOW_ACT,3
FENCE_ENABLE,1 ← see text further down
INS_ACCEL_FILTER,10 ← the new default, advised to use this
INS_HNTCH_ENABLE,1
INS_LOG_BAT_MASK,1
INS_LOG_BAT_OPT,0

Next, connect to MissionPlanner / Mandatory… / Initial Parameters
and put in your battery cells and prop size.
Accept every change it offers.

If you’ve sorted the vibrations you can test fly, no need for aerobatics or Auto missions, just some Althold and Loiter. This way we can check how things are going and adjust the Harmonic Notch Filter before doing an Autotune.

The Fence enable parameter is frustrating to many people, but so is your copter headed off to Sea of Japan when it thinks it’s doing a RTL. This wont let you arm in ANY flight mode until there is a good GPS 3D Fix and Home can be set. It can seem to take a LONG time to be ready to arm, although subsequent flights can be much quicker to arm. Small copters close to the ground can be held up in the air or put on a table until conditions are satisfied.
Some people say you can just select Loiter and wait for the green LED (or ability to arm) - that in effect is the same thing but with human error involved. Some would also launch and then switch modes to a GPS-assisted mode and not realise the mode change was denied, and therefor flying with the wrong assumptions.
I think it’s not a default because a few years ago most GPS units would not get a good 3D Fix close to the ground and didnt work properly until airborne. My opinion is it’s better to set this param and wait a few extra minutes so you know the GPS is working.

1 Like

Thank you for a very detailed instruction, i’ve set all the parameters, getting HDOP around 0.8-0.9, best one was 0.71

Sat forever on the ground until I figured out how to “select” fence (kept complaining “fence enabled, but none selected”.

In Loiter, was slowly drifting up and down. Then I accidentally “emergency stopped” the motors and now I have to reprint and replace 2 arms, so more test flying tomorrow.

You dont really need to set the fence inclusion and exclusion zones.
The simplest way is to just set
FENCE_ALT_MAX,120
FENCE_RADIUS,300
FENCE_TYPE,3 (alt and radius)
to suit your conditions and local laws.
The Fence will apply from where ever you arm (Home or Origin set)

If you do set inclusion and exclusion zones then you must be starting from within the inclusion zone, but I’d leave all that alone until everything else is sorted.
Or at least just set the standard cylindrical fence, then add exclusion zones.

EDIT:
From the doco:
You can define many inclusion and exclusion fences. However,multiple inclusions fences, including the cylindrical fences must overlap, since the vehicle can operate only within the complete overlap area of all of the inclusion fences. Exclusion fences may be placed within or outside of inclusion fences.

1 Like

well, flew today with the settings above, handles like a bag of ##!#. In loiter, drifts up. Periodically complains about EKF3. I trust it less than before.

In terms of reducing vibe, is mounting FC on the rubber spacers worth it ? At the moment I got FC bolted to the main body with nylon spacers and screws.
The GPS is mounted about an inch above anything else, to reduce interference. The quad is a 3D printed homemade design, roughly the size of Phantom (same motors and props).

Can you link to the .bin log of that please?
It is very important to reduce vibrations. You’ll need to at least use those little silicone grommets that usually come with the small flight controlles

That will never work with one of the bare board type FC’s like that F405-te even on a very rigid frame. I’m guessing a 3D printed frame is far from that but we have seen some clever designs that are not bad. Find the softest grommets you can find. I double them up when possible for even more compliance. I wouldn’t bother advancing until this bag of shit is corrected.

so do we want frame as rigid as possible ? then wouldn’t every little prop inbalance vibe the whole frame into destruction ?
Or do we want some flex in the arms, to dampen prop vibes, but not too flexible to keep FC from constantly trying to figure out what’s happening ?

We don’t want that. Flex in the arms and the frame is the last thing you want. We have had years of evidence for this. If that’s what you printed perhaps back to the drawing board.

We have seen some cool and very functional 3D printed stuff from @Quadzilla

Here are 2 examples of frames at opposite ends of the Noodle Spectrum (~10" props)

Most Noodle like and worst performing:
Junk

Least Noodle like (AKA Ridid) with great performance:
Shen

To reinforce what Dave says - and he knows all about this stuff - the flexible frames and arms seem to introduce an effect where the flight controller (and center plate) are moving differently (and in opposite up/down directions) to the motors out on the ends of the arms. All the arms flexing differently at different times introduce a whole mess of frequencies that are hard to filter out. So the flight controller and software has a very hard time of making sense of the position, direction and what corrections to make.
Many have found that soft motor mounts (in various forms) have even made vibrations worse on an otherwise reasonable frame.

A rigid frame allows you to employ suitable antivibration materials (if required) and filters in the software can take out any remaining vibrations and resonances, just leaving the actual movements.
This is why tubular carbon fibre arms and carbon fibre plates are so common - very strong and light weight, easy to design with, easy to implement and relatively hard to mess up.

is also messy and hazardous if shattered.

Merry Christmas!

Funny that, I’ve started my drone journey with F450 frame :slight_smile: Still got spare arms and plates lying around.

The main body of my quad is very rigid, literally a PETG box for a battery, with a PETG tray bolted on top, with all the electronics inside (FC in dead centre), and PETG lid bolted over, so no flex there.

Motor arms are about 6 inches long, and printed in a U-profile, to have wiring secured inside, though there is a flex of a few degrees possible if you twist the motor end with your hand. Still trying to come up with a more rigid arm design vs weight - wouldn’t really want to have a 100g arms printed as solid chunks of plastic.

Don’t print plastic arms. Use CF like all the best frames do and adapt them to your frame.