Compass vs. GPS

Joined
Mar 13, 2017
Messages
103
Reaction score
17
Age
68
I like to figure out what my P4P uses compass for ! It uses GPS, so why does it need compass ? Doesn't GPS show where North, South ... is ?
Thanks.
 
The compass tells the drone which direction it's facing. The GPS data is used to find the latitude/longitude location.

Doesn't GPS show where North, South ... is ?
No.
 
If the compass is only for the direction of the drone then how does that cause flyaways? You here about bad compass calibrations causing flyaways. Wouldn't letting off the sticks override it having the wrong direction info and just cause it to hover in place? And wouldn't putting it in homelock override that as well and bring it home?
 
If the compass is only for the direction of the drone then how does that cause flyaways? You here about bad compass calibrations causing flyaways. Wouldn't letting off the sticks override it having the wrong direction info and just cause it to hover in place? And wouldn't putting it in homelock override that as well and bring it home?
The Phantom needs to know which way it is facing for you to be able to control it properly, have RTH work properly etc.
There are different degrees of compass error.
At the less severe end, your Phantom just has a calibration that gives it an actual heading that is different from what it is telling the flight controller.
With this kind of compass error, the Phantom would hover with sticks centred. (It will probably slowly spiral too).
BUT the Phantom can't deal with the conflicting data it gets from the GPS and compass so it ignores the GPS and drops into Atti mode.
That can cause pilot disorientation and confusion and/or Phantom being blown away if there's a wind.
This example is at the low end of the scale:
To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
With that sort of compass error, homelock etc won't work as the Phantom will be in atti mode.
Even if it wasn't, there would be problems as the Phantom won't be able to get it's direction of travel right.

At the more serious end of the scale it's possible to have a compass error that actually causes the Phantom to fly off.
The cause is more complex but is explained in this post:
Looking for Trouble ??
 
Bear in mind that in a fluid such as air, Course (path across ground) and Heading (direction nose is pointed) are often different. Only in dead calm conditions would they be the same.
Same as a boat subject to the water currents or a car 'drifting'.
 
To add a little to @Meta4's explanation:

If you push the right stick forwards in GPS mode, for example, you are telling the FC to move in the direction in which the aircraft is facing (determined by compass reading), and thus the course, or track, that you want it to follow. In still air the FC will apply positive elevator with no aileron and expect to see a course that reflects that direction. If the resulting course is not as expected, the FC will adjust, with aileron, until the course matches the direction in which the FC thinks the aircraft is facing - just as it would to compensate for a crosswind.

However, if the original heading was slightly incorrect due to a compass error, that will result in an apparent sideways drift. If the error is too large then the FC will revert to ATTI and ignore the GPS data, using the compass data just to prevent spinning as part of its attitude hold. It's not going to produce a flyaway other than due to drifting on the wind or inappropriate stick inputs from the pilot.
 
  • Like
Reactions: Meta4
Thanks for replies. I guess you need several GPS satellite locks to determine where the drone is in space and compass determine the heading of drone. If in GPS lock mode, theoretically yaw only affects the compass, not GPS. Right ?
Thanks
 
GPS provides position, compass provides direction even when not changing position. You would think though that the AC could compensate for compass loss by using GPS as long as it was moving. It might be erratic as it tries to get it's true bearings but still would be better than no GPS at all.
 
GPS provides position, compass provides direction even when not changing position. You would think though that the AC could compensate for compass loss by using GPS as long as it was moving. It might be erratic as it tries to get it's true bearings but still would be better than no GPS at all.

That's what I was thinking too[emoji848]
 
As I was writing, I realized what the others were saying. Sure, the AC could determine it is moving north, but is it causing it's movement north or are external forces, hopefully only wind, moving it north? If external forces are causing movement, which way should the AC apply it's force? Forward? Aft? Your 3 o'clock? It could probably figure that out though by some trial and error as long as the wind isn't too bad.
 
As I was writing, I realized what the others were saying. Sure, the AC could determine it is moving north, but is it causing it's movement north or are external forces, hopefully only wind, moving it north? If external forces are causing movement, which way should the AC apply it's force? Forward? Aft? Your 3 o'clock? It could probably figure that out though by some trial and error as long as the wind isn't too bad.

Superficially it seems like it should be a relatively easy feedback problem to solve even without compass data - basically the systematic version of the "trial and error" method that you alluded to. However, DJI chose not to follow that route, and instead disregard GPS data when compass and GPS conflict and drop into ATTI. That may be because of the extra degree of freedom (rotation around the vertical axis) that GPS cannot detect, but that could, potentially, render the problem insoluble.
 
The electronic compass ( or two for redundancy) will give your bird a direction input when the GPS cannot. If you're in a steady hover, you aren't moving relative to the GPS birds, it needs the relative motion to calculate direction and speed.
 
The electronic compass ( or two for redundancy) will give your bird a direction input when the GPS cannot. If you're in a steady hover, you aren't moving relative to the GPS birds, it needs the relative motion to calculate direction and speed.

Well even when stationary you are obviously moving relative to the GPS satellite constellation, but just not relative to the reference ellipsoid. But even if you are, the GPS system cannot determine aircraft orientation, only course (track).
 
Thanks guys. What is AC ? !!! Air Craft ? I thought I knew all he acronyms of this hobby :)
It is clear as mud ( I didn't know that) that GPS is for position of the drone and compass is for direction. How does that translate to the sticks controlling the drone ?
1) Does YAW (mode 2, left stick left/right) only CHANGE the compass telemetry and NOT Compass telemetry ?

I am a retired Software/Firmware engineer and really like to know how the the bird flies from a Software point of view. I know it can differ from manufacturer to another, depending on how they implement their firmware.Thanks for pointing out how dji implements
So, let me ask and please reply according:

2) Why need so many GPS Satellites before you take off ?
I always thought of GPS being ONE signal that tells me where I am on earth. That's latitude and longitude. I was assuming
you need more satellite s to locate it in space ? Right ?
Thanks
 
2) Why need so many GPS Satellites before you take off ?
I always thought of GPS being ONE signal that tells me where I am on earth. That's latitude and longitude. I was assuming
you need more satellite s to locate it in space ? Right ?
The GPS system requires a minimum of 4 satellites to give a good fix.
If satellite geometry is poor, it may need more.
On the P3 Standard, DJI have set a minimum of 6 sats to allow a safety margin.
Other Phantoms using both GPS and Glonass sats require more because the GPS receiver still requires 6 GPS sats or 6(?) Glonass sats.
It won't work with 3 of each
 
  • Like
Reactions: BigAl07
The electronic compass ( or two for redundancy) will give your bird a direction input when the GPS cannot. If you're in a steady hover, you aren't moving relative to the GPS birds, it needs the relative motion to calculate direction and speed.
Compass gives direction nose is pointing ONLY.
This can differ from direction of travel or course above surface.
 
GPS only knows direction if it is moving. Take a handheld GPS and stop. You can turn the GPS and it will only display the proper direction after you start moving again. You need a compass to know what direction you are facing if you aren't moving.
 
GPS provides position, compass provides direction even when not changing position. You would think though that the AC could compensate for compass loss by using GPS as long as it was moving. It might be erratic as it tries to get it's true bearings but still would be better than no GPS at all.


It seems simple but look at it this way:

You're blindfolded standing on a Segway in the middle of a dynamic obstacle course. You've got a group of 12 people standing around you to give you verbal directions on which way to go. Some of them see you clearly while some see a blurry version and some may be looking at you via mirrors etc. All of them are yelling at you turn left, turn right, speed up, slow down, back up.... You're trying to listen to everyone while navigating an obstacle course that is constantly moving around you. You have to calculate which ones are collectively telling you correct info and which ones to disregard. All while someone else is remotely trying to drive your Segway.

All of this is done "behind the curtain" while we are trying to learn to fly and not crash into things
 
Thanks guys. What is AC ? !!! Air Craft ? I thought I knew all he acronyms of this hobby :)
It is clear as mud ( I didn't know that) that GPS is for position of the drone and compass is for direction. How does that translate to the sticks controlling the drone ?
1) Does YAW (mode 2, left stick left/right) only CHANGE the compass telemetry and NOT Compass telemetry ?

I am a retired Software/Firmware engineer and really like to know how the the bird flies from a Software point of view. I know it can differ from manufacturer to another, depending on how they implement their firmware.Thanks for pointing out how dji implements
So, let me ask and please reply according:

2) Why need so many GPS Satellites before you take off ?
I always thought of GPS being ONE signal that tells me where I am on earth. That's latitude and longitude. I was assuming
you need more satellite s to locate it in space ? Right ?
Thanks

If you consider how GPS works it should be apparent that one satellite cannot give you any useful position data.

Your time-dependent location is described by four coordinates - three spatial and time. The code sequences transmitted by the satellites do just one thing - they allow the receiver to determine, continuously, the time of transmission of any element (epoch) of the sequence.

If your GPS receiver clock were sufficiently accurate (i.e. if it knew the time as defined by the GPS system), one such transmission would tell you distance from that satellite and, since the receiver already knows the GPS satellite ephemeris data, and thus the location of the satellite as a function of time, it would constrain your position to the surface of a virtual sphere centered on the satellite's position when it transmitted that element of code.

But, firstly, your GPS receiver clock is not accurate enough to do that to any useful level of positional accuracy and, secondly, the interesection of the virtual sphere centered on the GPS satellite in orbit with the earth's surface will, in general, be a circle, so it could not even constrain latitude and longitude, and certainly not elevation above the reference ellipsoid that defines the earth.

A second GPS transmission would result in a different circle of intersection with the ellipsoid giving, in general, two possible location solutions (two overlapping circles intersect at two points).

A third satellite transmission is needed to resolve the correct intersection and would also yield elevation (because it's really the intersection point of 3 spheres which is a 3-D solution) if the receiver clock were sufficiently synchronized with the GPS satellite clocks.

However, as noted above, the receiver clocks are inadequate for that task, leading to another (4th) unknown (actual epoch reception time), and so a fourth satellite transmission is required to solve the complete set.
 
  • Like
Reactions: Shammyh and BigAl07

Members online

No members online now.

Forum statistics

Threads
143,066
Messages
1,467,358
Members
104,936
Latest member
hirehackers