What happens when you have a compass error?
Uploading and Loding Picture ...(0/1)
o(^-^)o
dorbot
lvl.4
Flight distance : 844770 ft
France
Offline

I have a P4 Pro and I am trying to better understand what decisions are made in the aircraft in the event of a compass error.
When you have a correctly calibrated compass or pair of compasses in the Pro and you take off and fly around with the 12-16 or so GPS locks, everything is hunky dory, but I have heard many tales of compass errors leading to GPS being ignored and automatic Atti mode. Sometimes this is followed by stories of erratic controlability, speed errors , yaw errors and "flyaways and crashes"...

If I calibrate my compass in a region which significantly different from the natural magnetic field of the earth I understand that when I take off into clear air there is the possibility that "something" will happen.
Not wishing to deliberatly perform a bad calibration next to a large neodymium magnet (for example) just to see what happens, I though I'd post here and see if the community can clarify a few things.

Having calibrated your drone next to a massive magnet, you elect to take off. Immediately your drone leaves the anomalous magnetic field region and into the clear blue sky where the Earth's magnetic field is dominant. What happens now?
The GPS system and the compass systems are in conflict?
You get a compass error, that much I understand, but why do you lose the benefit of GPS and end up in Altitude Attitude mode, and why would having a very wonky compass make the aircraft unflyable? Do you need a compass reading to get a heading?

Can we discuss what logic the drone goes through so we can all understand exactly why what happens, happens.

Curious.

2018-2-13
Use props
G Davidson
First Officer
Flight distance : 263465 ft
United Kingdom
Offline

I have to admit I've pondered this question too.
Without a reliable compass signal to the flight controller, the drone loses definintive cardinal sense of direction (North/South/East West). The solid state gyros should sense yaw (course) rotation but not be able to bring it back on a definintive compass/magnetic heading. This is probably why loss of compass often leads to the drone flying in large arcs as the yaw gyro drifts with time, vibration from the craft also polluting the gyro signals too.

Although we have GPS to give position this will not provide compass heading unless derived from change in position over time. Imagine the flight controller trying to maintain position with a GPS signal if it does not know which way to travel to get back on station. This is likely why GPS is the first thing to go when compass is lost - must be like trying to get back to the middle of a spinning room wearing a blindfold! As this stage it appears the flight controller gives up navigation and lets the pilot deal with it instead (VLOS essential!). Can't be much fun navigating home a craft that slowly wants to yaw all by itself...

However, I have often wondered why we can't have an automatic in-flight emergency compass calibration given that most compass errors arise from bad calibrations on the ground. I would have thought it would be possible for the flight controller to rely on the gyros to perform a slow rotation mid-air at altitude, away from the common sources of interference, to come up with calibration good enough to fly home with.



2018-2-13
Use props
Nigel_
Second Officer
Flight distance : 388642 ft
United Kingdom
Offline

"Having calibrated your drone next to a massive magnet,"
It would be a good idea to never do that!

However you don't need to manually calibrate the compass near a magnet to cause a problem, all you need to do is start the motors near a magnet and then the compass will be badly calibrated for that flight.

If following the compass produces a movement that doesn't match the change in GPS coordinates then how does the aircraft know which to believe?   The GPS location quite often changes by several meters for various reasons, so a mismatch is normally due to GPS inaccuracies, thus it is the GPS that is ignored.  Also it is not possible to fly properly with a bad compass calibration anyway, the compass doesn't just give the horizontal direction to fly, it also gives the magnetic inclination which tells the aircraft which way is up, with a bad calibration the aircraft falls over as it moves away from the magnet, it can't balance itself properly, and that means it unintentionally gains speed and becomes hard to control even if it was to trust the GPS.

If you get a warning about magnetic issues then don't fly from that location, and if you have already taken off, retrace your path back into the magnetic field and land ASAP.  If you have already lost control then land anyway ASAP, better to loose a few props in a crash landing than loose the whole aircraft.
2018-2-13
Use props
ArgenBrewer
lvl.3
Flight distance : 18638 ft
Argentina
Offline

A question about it, calibrate the compass on each flight or do it once in an optimal area, without radiations and leave that forever?
2018-2-13
Use props
Nigel_
Second Officer
Flight distance : 388642 ft
United Kingdom
Offline

ArgenBrewer Posted at 2018-2-13 14:31
A question about it, calibrate the compass on each flight or do it once in an optimal area, without radiations and leave that forever?

Once each year, a long way away from any metal or concrete.
2018-2-13
Use props
RedHotPoker
Captain
Flight distance : 165105 ft
Canada
Offline

You only need do a proper compass calibration once.
Unless you move locations by 100 miles or more... Even then.


RedHotPoker
2018-2-13
Use props
Nigel_
Second Officer
Flight distance : 388642 ft
United Kingdom
Offline

RedHotPoker Posted at 2018-2-13 14:45
You only need do a proper compass calibration once.
Unless you move locations by 100 miles of more... Even then.

I don't believe the 100 miles thing is required with current firmware, it does an automatic location calibration each flight.  The manual calibration is to calibrate the magnetic field of the aircraft, not the Earth, so it only needs doing if you modify the aircraft, eg replace a motor, or if it has been near strong magnets which may have changed the magnetic field of the aircraft.
2018-2-13
Use props
RedHotPoker
Captain
Flight distance : 165105 ft
Canada
Offline

Nigel_ Posted at 2018-2-13 17:08
I don't believe the 100 miles thing is required with current firmware, it does an automatic location calibration each flight.  The manual calibration is to calibrate the magnetic field of the aircraft, not the Earth, so it only needs doing if you modify the aircraft, eg replace a motor, or if it has been near strong magnets which may have changed the magnetic field of the aircraft.

Oh, yeah, but with my Phantom 3 Pro' that auto calibration isn't an option.


RedHotPoker
2018-2-13
Use props
Labroides
Core User of DJI
Flight distance : 9991457 ft
  • >>>
Australia
Offline

ArgenBrewer Posted at 2018-2-13 14:31
A question about it, calibrate the compass on each flight or do it once in an optimal area, without radiations and leave that forever?

Under normal circumstances you should never have to calibrate the compass.
Not new out of the box, not after travelling 101 miles not after travelling 10,000 miles.
Only calibrate if you have worked on the Phantom and added or removed items.
2018-2-13
Use props
dorbot
lvl.4
Flight distance : 844770 ft
France
Offline

There is magnetic variation if you move across the planet, but its normally only a few degrees if you travel 100 miles. Depends where you are. Aviation maps have magnetic variation lines.

Nigel said,
" Also it is not possible to fly properly with a bad compass calibration anyway, the compass doesn't just give the horizontal direction to fly, it also gives the magnetic inclination which tells the aircraft which way is up, with a bad calibration the aircraft falls over as it moves away from the magnet, it can't balance itself properly, and that means it unintentionally gains speed and becomes hard to control even if it was to trust the GPS."
I think this is closet to what my original question was all about.

But wont the accelerometers tell the aircraft about inertial movement? There will always be one axis of the accelerometer which is at 9.8 m/s/s because it is always feeling acceleration due to gravity. This should be enough to derive a vertical.
Yaw drift over time is a problem in all inertial tracking systems but it takes many minutes to manifest itself. Gravity is acting along the yaw axis which is why you need a compass, no matter which way you point in yaw, the gravity component is the same so it is of no utility for deriving yaw.

Height can be held constant with the barometer if you use gravity and the accelerometers to derive a vertical.

Is the sensor fusion in the drones so poor that having bad compass data results in catastrophic outcomes even when other sensors are available and working correctly?
Or is the compass so critical for reasons I don't understand properly?
Surely it is possible to derive useful heading information by combining the remaining sensors? Or is this impossible?
Sorry if the questions are not very well formed.



2018-2-14
Use props
Nigel_
Second Officer
Flight distance : 388642 ft
United Kingdom
Offline

dorbot Posted at 2018-2-14 00:38
There is magnetic variation if you move across the planet, but its normally only a few degrees if you travel 100 miles. Depends where you are. Aviation maps have magnetic variation lines.

Nigel said,


I don't think it has a gravity sensor.  It has a 6 axis accelerometer so can accurately make changes to it's speed and orientation, but an accelerometer measures acceleration, if the aircraft is hovering perfectly still then there is no acceleration, not even acceleration due to gravity, and so the accelerometers will measure nothing and there is no way to tell which direction is up or which direction is north except for the compass.

The GPS could be used to work out where north is, but only by taking a short journey to find out how the GPS location changes with movement, or a longer journey if you want it accurate, that is how it works out that there is a mismatch between the compass and the GPS, however the result will be inaccurate if there is any wind since it doesn't have an anemometer or wind vane, or even air speed sensors, so it doesn't know what effect the wind is having - in a strong wind it may need to fly north west to fly north but rotating 180 degrees isn't going to take it south, it would need 270 degrees for that.  If it is just hovering then the GPS can't even guess at a heading.

The magnetic variation across the planet is calibrated out every time you take off, that is the reason that taking off from near a magnet is no problem, it is when you move away from the magnet that you run into trouble.  If this calibration requires a big correction then it gives you a warning so normally you only run into trouble if you either ignore the warning, or manually recalibrate to remove the warning.  You should always change location on a warning, not recalibrate.
2018-2-14
Use props
G Davidson
First Officer
Flight distance : 263465 ft
United Kingdom
Offline

Nigel_ Posted at 2018-2-14 03:11
I don't think it has a gravity sensor.  It has a 6 axis accelerometer so can accurately make changes to it's speed and orientation, but an accelerometer measures acceleration, if the aircraft is hovering perfectly still then there is no acceleration, not even acceleration due to gravity, and so the accelerometers will measure nothing and there is no way to tell which direction is up or which direction is north except for the compass.

The GPS could be used to work out where north is, but only by taking a short journey to find out how the GPS location changes with movement, or a longer journey if you want it accurate, that is how it works out that there is a mismatch between the compass and the GPS, however the result will be inaccurate if there is any wind since it doesn't have an anemometer or wind vane, or even air speed sensors, so it doesn't know what effect the wind is having - in a strong wind it may need to fly north west to fly north but rotating 180 degrees isn't going to take it south, it would need 270 degrees for that.  If it is just hovering then the GPS can't even guess at a heading.

The accelerometers in the IMU measure force whether it be through change in velocity (acceleration) or the force of gravity. The IMU will certainly be able to tell which way is up as one of the largest forces being experienced by the IMU is the gravitational one

2018-2-14
Use props
Nigel_
Second Officer
Flight distance : 388642 ft
United Kingdom
Offline

G Davidson Posted at 2018-2-14 04:22
The accelerometers in the IMU measure force whether it be through change in velocity (acceleration) or the force of gravity. The IMU will certainly be able to tell which way is up as one of the largest forces being experienced by the IMU is the gravitational one

Even if the accelerometer does measure gravity, it will have no way of distinguishing acceleration due to gravity from other acceleration forces and so it does not know which direction to subtract acceleration due to gravity from the accelerometer values to get actual acceleration, unless it has a working compass to tell it which way up it is, then there is no problem.  You couldn't use GPS to do that so the compass always takes priority over GPS.  
2018-2-14
Use props
G Davidson
First Officer
Flight distance : 263465 ft
United Kingdom
Offline

Nigel_ Posted at 2018-2-14 06:29
Even if the accelerometer does measure gravity, it will have no way of distinguishing acceleration due to gravity from other acceleration forces and so it does not know which direction to subtract acceleration due to gravity from the accelerometer values to get actual acceleration, unless it has a working compass to tell it which way up it is, then there is no problem.  You couldn't use GPS to do that so the compass always takes priority over GPS.

Using trigonometry to subtract out the known gravity force for a particular aircraft attitude would reveal acceleration due to change in motion. The gyros would provide the necessary angles to calculate a 3D vector representing the force of gravity.

Consider for a moment what would happen if the craft pitched forward from horizontal to 45 degrees. The altitude accelerometer which was formerly measuring the full force of gravity is now pitched forward too and now sees only half the gravity force (since it only measures force in one axis). In the meantime, the accelerometer that was sensing forward/backward acceleration is now pitched 45 degrees forward and sees half the force of gravity too. The flight controller can then take the gyro angles to work out the true attitude and then calculate and subtract out the gravity force vector, leaving motion acceleration values.

Having said all of that... it raises the question; how much need is there to calculate the actual acceleration of the craft by inertial methods?  In the Phantom's case it may be worth considering the IMU as a "gravity compass" that relies on 3 gyros, 3 accelerometers  and clever maths to give the flight controller an accurate attitude reading.

It's hard to avoid maths but here is a link that might explain a little more;
http://tom.pycke.be/mav/69/accelerometer-to-attitude


2018-2-14
Use props
G Davidson
First Officer
Flight distance : 263465 ft
United Kingdom
Offline

dorbot Posted at 2018-2-14 00:38
There is magnetic variation if you move across the planet, but its normally only a few degrees if you travel 100 miles. Depends where you are. Aviation maps have magnetic variation lines.

Nigel said,

I suspect that it would be possible to come up with software that could mitgate against compass failure but it would rely on the craft being in constant motion so as to obtain a heading through change in GPS position. I don't know how much drift exists in the yaw gyros but if they were stable enough to maintain heading between GPS readings, it might be possible to bring a craft back near home point without entering ATTI mode.

The trouble is what happens when the craft stops travelling in order to land; the heading will be at the mercy of yaw gyro drift. Trying to hold position during a vertical descent  could be scary in in that without horizontal movement, the heading may drift off. Add in wind and there could be some significant rapid excursions from the landing zone if mistakes in the heading lead to completely incorrect position correction movements.

I wonder if when close enough to the ground, the VPS cameras could then be used to lock the yaw orientation and provide a virtual compass to allow a controlled descent.

As mentioned earlier in my first reply, if the issue is just a bad compass calibration on the ground I can't see why it would not be possible for an automatic in-flight calibration to provide sufficient correction to get the craft back to do a proper one.


2018-2-14
Use props
Nigel_
Second Officer
Flight distance : 388642 ft
United Kingdom
Offline

G Davidson Posted at 2018-2-14 08:05
Using trigonometry to subtract out the known gravity force for a particular aircraft attitude would reveal acceleration due to change in motion. The gyros would provide the necessary angles to calculate a 3D vector representing the force of gravity.

Consider for a moment what would happen if the craft pitched forward from horizontal to 45 degrees. The altitude accelerometer which was formerly measuring the full force of gravity is now pitched forward too and now sees only half the gravity force (since it only measures force in one axis). In the meantime, the accelerometer that was sensing forward/backward acceleration is now pitched 45 degrees forward and sees half the force of gravity too. The flight controller can then take the gyro angles to work out the true attitude and then calculate and subtract out the gravity force vector, leaving motion acceleration values.

If you see half the gravity force move from the vertical to the horizontal then it may be because you have tilted forward 45 degrees, or maybe you have started to drop with half gravity and accelerated backwards at 0.5G.  The gyros would tell you that you have pitched forward 45 degrees, however they only measure changes in angle, you have to keep track of actual angle by adding up all the changes and that value will become increasingly inaccurate with time.  The gyros are useful for adjusting the angle by the desired amount, but not for measuring which way up the aircraft is long term.  Even in an airliner, the artificial horizon which uses gyros to indicate which way up the aircraft is will have a gravity sensor to correct the accumulated gyro errors, a mechanical artificial horizon has a pendulum for this correction.
2018-2-14
Use props
G Davidson
First Officer
Flight distance : 263465 ft
United Kingdom
Offline

Nigel_ Posted at 2018-2-14 09:08
If you see half the gravity force move from the vertical to the horizontal then it may be because you have tilted forward 45 degrees, or maybe you have started to drop with half gravity and accelerated backwards at 0.5G.  The gyros would tell you that you have pitched forward 45 degrees, however they only measure changes in angle, you have to keep track of actual angle by adding up all the changes and that value will become increasingly inaccurate with time.  The gyros are useful for adjusting the angle by the desired amount, but not for measuring which way up the aircraft is long term.  Even in an airliner, the artificial horizon which uses gyros to indicate which way up the aircraft is will have a gravity sensor to correct the accumulated gyro errors, a mechanical artificial horizon has a pendulum for this correction.

I take your point about the the second possibility of the accelerometer readings but as you say, the flight controller has to work out the craft attitude from a log of events some of which will have cumulative errors but can be brought back to normal through corroboration with other sensor data.

At least the accelerometers will always give a definitive gravity force vector when not accelerating.

Must be a nightmare writing flight controller software...

It's surprising how stable the likes of the Syma X5 are without the input of a magnetic compass.
2018-2-14
Use props
Geebax
Captain
Australia
Offline

G Davidson Posted at 2018-2-14 10:27
I take your point about the the second possibility of the accelerometer readings but as you say, the flight controller has to work out the craft attitude from a log of events some of which will have cumulative errors but can be brought back to normal through corroboration with other sensor data.

At least the accelerometers will always give a definitive gravity force vector when not accelerating.

'It's surprising how stable the likes of the Syma X5 are without the input of a magnetic compass.'


Do you know for certain they do not use a compass?
2018-2-14
Use props
G Davidson
First Officer
Flight distance : 263465 ft
United Kingdom
Offline

Geebax Posted at 2018-2-14 15:10
'It's surprising how stable the likes of the Syma X5 are without the input of a magnetic compass.'

Do you know for certain they do not use a compass?

The Syma X5C is based on the MPU 6050  IC (https://store.invensense.com/datasheets/invensense/MPU-6050_DataSheet_V3%204.pdf) which has support for an external 3 axis magnetic compass sensor but does not appear to be present on the X5C. There’s a nice tear down at https://www.digikey.com/en/maker ... ef69988c4cb7b1361da

I am more than happy to set up a test to hover my X5C and set about it with a magnet on a stick to see what happens


2018-2-14
Use props
Geebax
Captain
Australia
Offline

G Davidson Posted at 2018-2-14 15:48
The Syma X5C is based on the MPU 6050  IC (https://store.invensense.com/datasheets/invensense/MPU-6050_DataSheet_V3%204.pdf) which has support for an external 3 axis magnetic compass sensor but does not appear to be present on the X5C. There’s a nice tear down at https://www.digikey.com/en/maker ... ef69988c4cb7b1361da

I am more than happy to set up a test to hover my X5C and set about it with a magnet on a stick to see what happens

Thank you. It appears to be a very basic drone, but if it can do its job without a compass, then that can only be a good thing.
2018-2-14
Use props
RedHotPoker
Captain
Flight distance : 165105 ft
Canada
Offline

Labroides Posted at 2018-2-13 19:47
Under normal circumstances you should never have to calibrate the compass.
Not new out of the box, not after travelling 101 miles not after travelling 10,000 miles.
Only calibrate if you have worked on the Phantom and added or removed items.

You must have a lot of air miles? Haha

That was my error, as the Phantom 3 Pro doesn't do auto compass calibration.
If the Phantom 4 do, that's terrific.

Thanks for the info. Much appreciated.
So, even when we get to Mars, no compass calibration required? Chuckles


RedHotPoker
2018-2-14
Use props
G Davidson
First Officer
Flight distance : 263465 ft
United Kingdom
Offline

Geebax Posted at 2018-2-14 16:05
Thank you. It appears to be a very basic drone, but if it can do its job without a compass, then that can only be a good thing.

I was actually quite astonished at the X5C's stability - it's a great quad to learn to fly on but since it has no altitude hold, you soon learn throttle control to maintain altitude when pitching and rolling. Can be a hard habit to unlearn when flying the Phantom in ATTI where the throttle is replaced by the altitude control.

There is an MPU 9250 IC by TDK which is a full 9axis device with compass onboard but not sure if it's popular on quads.
2018-2-14
Use props
Geebax
Captain
Australia
Offline

G Davidson Posted at 2018-2-14 16:29
I was actually quite astonished at the X5C's stability - it's a great quad to learn to fly on but since it has no altitude hold, you soon learn throttle control to maintain altitude when pitching and rolling. Can be a hard habit to unlearn when flying the Phantom in ATTI where the throttle is replaced by the altitude control.

There is an MPU 9250 IC by TDK which is a full 9axis device with compass onboard but not sure if it's popular on quads.

I would have thought it was not wise to include a compasas along with other functions in the same device. Perhaps better to seperate the compass function some distance away.
2018-2-14
Use props
G Davidson
First Officer
Flight distance : 263465 ft
United Kingdom
Offline

Geebax Posted at 2018-2-14 20:52
I would have thought it was not wise to include a compasas along with other functions in the same device. Perhaps better to seperate the compass function some distance away.

Good point - having fairly high currents passing through the  PCB to the ESCs could lead to interfering magnetic fields and having the compass away from that is better.
2018-2-14
Use props
Nigel_
Second Officer
Flight distance : 388642 ft
United Kingdom
Offline

RedHotPoker Posted at 2018-2-14 16:17
So, even when we get to Mars, no compass calibration required? Chuckles

Mars doesn't have a magnetic field so a compass would be of no use there - don't take a DJI drone to Mars!  And make sure you wear your radiation suit since there is no magnetic field to protect you unlike on Earth!

It does have a few magnetic rocks down in the south which would cause even more confusion for a Phantom.
2018-2-15
Use props
RedHotPoker
Captain
Flight distance : 165105 ft
Canada
Offline

Nigel_ Posted at 2018-2-15 02:39
Mars doesn't have a magnetic field so a compass would be of no use there - don't take a DJI drone to Mars!  And make sure you wear your radiation suit since there is no magnetic field to protect you unlike on Earth!

It does have a few magnetic rocks down in the south which would cause even more confusion for a Phantom.

Oh, when were you there to know?


I will do my own discoveries...


RedHotPoker
2018-2-15
Use props
Nigel_
Second Officer
Flight distance : 388642 ft
United Kingdom
Offline

RedHotPoker Posted at 2018-2-15 02:41
Oh, when were you there to know?

This is the magnetic field map of mars:



Note: the strips are real, just as Earth has magnetically stripy oceans.
2018-2-15
Use props
RedHotPoker
Captain
Flight distance : 165105 ft
Canada
Offline

Home Sweet Home. Haha


Looking forward, never back...



RedHotPoker
2018-2-15
Use props
Electro-Nick
lvl.4
Flight distance : 7083891 ft
  • >>>
United Kingdom
Offline

Where do you get the info that the P4p's do an automatic compass cal before each flight from?

Certainly for the P4 and the I2 that isn't the case. The compass cal is done manually to allow the aircraft's compass to pick up the magnetic field lines in the area you are in. It is calibrated horizontally, and vertically and that helps it to adjust for pitch and yaw movements of the aircraft body/legs.

As to why it's not possible to do it in flight? I'd guess it comes down to having the aircraft stable enough to do it, and also to carrying out the vertical/sideways element of the calibration.


If you have compass errors in flight, then it's best to switch over to atti mode and fly visually. Atti simply uses the barometer and vps for height, the compass and gps aren't relied on for positional or heading info. It's interesting that Dji are now talking about a 'visual compass' on their latest drones - so it begins to have a visual memory of its orientation wrt take off point.

Bad compass cal on the ground can lead to toilet-bowl effect, or wash-bowl. Basically the aircraft begins to oscillate like it's going down a whirlpool or plughole. Bad compass can also lead to loss from activating the RTH function.... watch as your drone flies off in a random direction that it thinks is the way home .   Being able to fly in atti mode, and know when to switch to it, how to orient yourself with the drone in flight visually, and what not to rely on in automatic systems is something we should all know how to do.

As to Mars, guess they'll have it up a MPS satellite constellation before we can fly our drones there ;) maybe it'll be called after the composer of the Planet Suite - the Holst Mars Positioning System constellation
2018-2-15
Use props
solentlife
First Officer
Flight distance : 1087530 ft
Latvia
Offline

Compass does not in anyway indicate right way up or down. Only time you may get any indication is if the compass was directly over a 'pole' - then the magnetism would be pulling the 'needle' down in effect.

Compass is needed to highlight the AC directional component - which GPS cannot do without calculating movement from position to position.
GPS has inherent inaccuracies that at times can be 3 - 4m or more - so positional info of GPS jumps around. Due to averaging - you usually do not see this in your data or displays. With some of the gear I get to play with - it is part of the operating system that averaging can be adjusted. But here with most consumer GPS - you cannot and factory programs in a default 'best average' setting. Get hold of a decent Marine Plotting GPS and leave it perfectly stationary for an hour or so - go back and see the plots ... all over the screen !
But put both compass and GPS together and the compass will keep AC heading as required and allow GPS to wander in its apparent heading but still provide reasonably accurate positional info.
Take away compass and I can well believe that DJI have taken decision to default out of GPS mode .. instead of leaving you fighting the AC with wandering GPS. Do not forget that even in ATTI mode that GPS will still give you Home position ... but without compass its 'screwed'.

Most GPS rx's such as Marine / Air and ground, in fact do have compass function built in - as do many smartphones. It is not as some people believe data based on GPS alone.

If you progress to FPV / Racing and more 'agile' multi-rotors - you find that various Flight Controllers have or do not have Compass input. Even without compass connectivity such as my 450 - it still has GPS and OSD ... but believe me - its YOUR deal to point it in right direction.

Accelerometers : Here we have electronics designed to measure acceleration in a direction. So the Multi Rotors and various aerobatic stabiliser systems use combos of them to provide data input to FC. It is true that if unit is PERFECTLY still - then it has no data to provide. But because we are operating in environment that even in still air - the AC will move about in its hover - the accelerometers are still pumping out data to the FC. The movement of the AC needed to produce a data flow is minuscule and can be less than your eye detects.
Its same as the stabilisers used on aircraft - they detect tiniest movement and correct accordingly. This means that control surfaces will be moving more often but far less amount than you would if done by eye alone. Result is near stationary AC.Simple fact is - fuel savings are made by auto-pilots compared to pilot manually trying to fly same straight / level path... because of the electronics ability to detect before human can.

Overall : Combination of Compass for direction, GPS for position and accelerometers to detect movement in 3D -  produce what we have in the DJI and many other  
Multi Rotors ... plus of course barometer giving us altitude reference.

Happy days !!

Nigel

2018-2-15
Use props
dorbot
lvl.4
Flight distance : 844770 ft
France
Offline

Its quite funny to hear mention of the MPU 6050, I am very familiar with that device and the 9250 because I (and a couple of friends ) manufacture the EDTracker Pro, a follow on from the "DIY headtracker for a tenner" project.
Its a gadget for measuring head orientation for gaming mostly. Possibly useful as an assistive technology for the disabled.
Because of yaw drift we had to use a magnetometer. Gravity takes care of the other two axes. Before using a magnetometer (6050 only)  we would just get the unit to working temperature and enter an offset because yaw drift on mems devices changes with temperature.

Our design now has a separate magnetometer , separate from the mems gyros. All the wireless stuff is shielded on the opposite end of the board too.
Total grief (£22,000) to get the CE and FCC approvals for the wireless aspect but we got there in the end.

Anyway, even if the yaw drift (heading) is anomalous, surely there is a way to guestimate the correct value when you consider the yaw input on the controller. At some point the software decides the heading is inaccurate. So why doesn't the software hold the last known good heading and track yaw input ( using the IMUs ) for a rough idea of which way we are pointing?
Even if it is a bit off, surely you can throw away compass input and just track yaw input from the last known good, and guestimate. That would get you home even though its off by a few degrees.
I wonder if the DJI implementation is too quick and overly agressive when it detects a compass anomaly. Its throwing away information which is still usefull. It isnt out of date yet.There is enough information left to get you home. You dont need to dump it and fly off on a "random" direction or orientation.
The information is there if you can do maths and integrate what you have left.
If the compass goes down you still have the camera to detect the horizon. Just move it 90 degrees left or right and look where the horizion is again, that will tell you where "up" is.
Sensor fusion people!




2018-2-16
Use props
djiuser_naepo5bTw5xf
New

United States
Offline

Nigel_ Posted at 2018-2-14 09:08
If you see half the gravity force move from the vertical to the horizontal then it may be because you have tilted forward 45 degrees, or maybe you have started to drop with half gravity and accelerated backwards at 0.5G.  The gyros would tell you that you have pitched forward 45 degrees, however they only measure changes in angle, you have to keep track of actual angle by adding up all the changes and that value will become increasingly inaccurate with time.  The gyros are useful for adjusting the angle by the desired amount, but not for measuring which way up the aircraft is long term.  Even in an airliner, the artificial horizon which uses gyros to indicate which way up the aircraft is will have a gravity sensor to correct the accumulated gyro errors, a mechanical artificial horizon has a pendulum for this correction.

You are essentially correct but your calculation is suspect.  If you pitch 45 degrees without changing (hover) aggregate thrust (1G), you will accelerate laterally with a force of (1/sqrt(2))G (until thrust and acceleration degrade in tandem due to multiple very complicated factors as speed increases) while descending at (1-1/sqrt(2))G.  Pythagoras, no?  Or if we prefer to be triggy: cosine (45 degrees).

Because half the angle != half the force.

Drone SW coders are either genius physicists or they just get lucky finding good feedback loops.  Crash enough drones, I guess...
2020-10-13
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules