GPS compas or HMC5883L ?

So I want to build a new project automated car for the moment using only compas as a test but I'm not sure what to trust more the HMC.. or the GPS compas ? I tested the HMC5883L and if I do vibrations or rapidly tilts the data is not accurate it's like jumping around and if I use that module close to motors it may be affected by the magnetic field.

About the GPS compas im not sure how it's working It use the satellites to define the direction or it got a inside magnetometer?

So what should I use? Personally I vote for the GPS but not sure, never had big experience with it.

The GPS compass is determined by difference in position. It doesn’t matter which way the GPS unit is oriented.

GPS isn't a compass, unless you're on the move. A static GPS cannot point to the magnetic North Pole.

The GPS compass is determined by difference in position. It doesn't matter which way the GPS unit is oriented.

GPS isn't a compass, unless you're on the move. A static GPS cannot point to the magnetic North Pole.

So in this case if i stop my car there will be a wrong data coming from the GPS compas and I should use the HMC5883L instead.

If you want your orientation, use the HMC5883. If you want your direction of travel, use the GPS. If you have it mounted in your car, and you are backing up, the two will show 180 degrees different.

If you want your orientation, use the HMC5883. If you want your direction of travel, use the GPS.

Really nice said, I need the direction so yea I think I’m gonna use the GPS only.

The GPS direction of travel (heading) is very unreliable and inaccurate at low speeds, for example, walking or running.

The GPS direction of travel (heading) is very unreliable and inaccurate at low speeds, for example, walking or running.

yea, but what about as a point A and point B? Let's say im at the point A, standing, doing nothing and I want to go to point B, if I drew a line from A to B then I know which direction i need to take, right? That's how the GPS works, right?

That's how the GPS works, right?

No.

GPS gives you a position and a time. From two positions and times, the direction of travel and speed can be worked out.

LordPsycho:
I want to build a new project automated car

Let me google that for you.

If this is to be used for short intervals (<10 minutes), and over small distances (<100 feet) or low speeds (<10mph), GPS will be too inaccurate. GPS will wander by that much if you’re just sitting still. You can average a bunch of locations over 10’s of minutes to get a good absolute position. With 2 absolute positions, you can calculate an accurate distance. And with time, you know the average speed.

But for small distances and short times, counting wheel rotations is much better (if there’s not much slip). Combined with a compass, you can calculate how far you traveled and which direction. That’s very easy.

Integrating multiple sources (GPS, compass, wheel rotations, IMU) to get an accurate position & speed is an advanced topic. That’s what drones do.

How far and how fast will this “automated car” be going?

Cheers,
/dev

How far and how fast will this "automated car" be going?

+1km, +10~30Km/h

I can use the GPS as a direction to my B location and the compas to determine the direction on my A location.