Hi,
I do plan design a follow me system.
Moving part will have an arduino and gps, streaming GPS data through RF to base station.
Base will be arduino based and will have also GPS to determine bearing to moving object.
Base station will have servo with laser pointer (for test purposes only now) to aim at moving object.
I guess it is pretty much described hardware and functionality...

Now the question:
I have a fixed GPS point (base) and a moving GPS.
From definition bearing is the angle between 2 gps locations. But to get bearing I need to know heading of base, right?
So I will need a compass on the base station to get heading. Then with heading + base gps, when receive remote gps I can determine bearing, which will be my servo angle to aim at target.
Is this right? Any idea or some code already done for this?

Thanks
NL

I’m not sure I fully understand what you are proposing but it does sound very very wrong. You would get the bearing from the base station to the “moving” part by computing it from the latitude and longitude of each. There is no need for a compass.

OK, but then, and correct me if I am wrong....
With one coordinate pair (lat,long) I do not know where I am facing/heading so not sure where to rotate to be aiming at moving target.
So suppose my system is pointed towards south, and my moving object is north of my location.... so angle would be 180 deg.

I guess that 2 pairs of coordinates would not give you that info, would it? (taking into consideration we do not know bearing or azimuth of base station)

Edit:
I guess you are right.
Bearing we can get with 2 GPS locations, but then I need to know where I am facing to know my rotation to aim, and that needs to be done using (bearing calculation - heading calculation) of base station. right?

I guess pretty much all is here...

Similar approach. Car seen as base station... and target as moving object.
Compass getting the current heading of car, which in base station also is haeding I am aiming

GPS has a crude inbuilt compass so you will only need a separate compass if the GPS compass is not accurate enough for your needs.

"..GPS has a crude inbuilt compass..."

Sorry, could you detail a bit more this? So I can get compass reading from ALL GPS modules?

To be honest, I did not decide yet which unit to use, EM-411 seems to be an option...or mtk3339
Something like this...

stowite:
GPS has a crude inbuilt compass so you will only need a separate compass if the GPS compass is not accurate enough for your needs.

No, GPS can give the bearing of the receiver only if it is moving and moving at a reasonale speed (walking
pace or more). A compass works for a stationary object.

You need a compass on the fixed node if its orientation is unknown, the local magnetic correction, the lat/long of both
nodes to compute the bearing.

OK, that was my idea. Thanks for help on this.

So in order to get the right angle to guide I will calculate bearing (as many sources on web) using 2 gps locations.
I will get bearing, related to true north.
Then I get my static heading, and subtract to calculated bearing. Is that right?

Then I get my static heading, and subtract to calculated bearing. Is that right

Depending on your control method for the base, you might not require a compass. Compasses can be inaccurate if they are too close to magnetic interference.

I use a stepper motor to turn a platform and "count" the steps in order to know my position at any one time. From here, any "bearing" is converted into step positions on a 360 degree base.

The disadvantage to this, is that I don't know my starting location - it's always a step count of 0. So I have a switch on the base that registers "North" for my azimuth (turn table) by turning my azimuth until it receives a switch press. The platform is locked in place so the switch is always facing north. If your base is also moving then you'll definitely require some form of compass...

You can further improve the accuracy of this method by adding an encoder to your motor.

Good luck!

GPS does not have a compass. Some GPS receivers might also have a compass, but that is not part of the GPS system.

GPS devices can tell which way you are moving. They do this, not by a compass, but by comparing the current GPS position to the previous GPS position. If your current GPS latitude and longitude represents a point which is 20 metres north-east of where you were 5 seconds ago, then the GPS device can calculate that you seem to be moving north-east at 24 kilometres/hour. There is no compass, no direction, and no heading involved in this calculation, it is based on the calculation of moving positions.

GPS has no knowledge of heading, or "which way you are facing". It would give you the same answer if you are driving backwards.

Another factor not yet discussed is the accuracy of GPS. Typically, with a good satellite lock the accuracy can be as good as 10' on
But in poor conditions you can be hundreds of feet off. So with two GPS units, the accuracy can be off by 20 feet or more.

if the intent of your project is general direction, this might not be a problem. But you listed having a laser. If your trying to keep a laser pointed from one unit to the other, and keep it on target, your going to have difficulty.

You will need high quality commercial or military grade GPS gear to get closer to keeping a laser on point of a moving object.

You will need high quality commercial or military grade GPS gear to get closer to keeping a laser on point of a moving object.

Surely at this point it's time to move over to visual tracking? I can't imagine a 2 GPS system tracking a moving target with a laser. There's just too many variables...

Surely at this point it’s time to move over to visual tracking? I can’t imagine a 2 GPS system tracking a moving target with a laser. There’s just too many variables…

Seems like a lot of people missed:

Base station will have servo with laser pointer (for test purposes only now) to aim at moving object.

PaulS:

Surely at this point it’s time to move over to visual tracking? I can’t imagine a 2 GPS system tracking a moving target with a laser. There’s just too many variables…

Seems like a lot of people missed:

Base station will have servo with laser pointer (for test purposes only now) to aim at moving object.

I assumed the laser pointer was to visually check the tracking of the base station and that what ever the project was intended for, it still requires the same amount of accuracy.

hi,
I m planning to calculate the GPS bearing between two points of a quadcopter. I want to calculate the angle between the base station and the quadcopter position. with that I need to control the 2 servo motors in the base station where the two antennas are connected with those servos. So please help me with that because I'm very new to arduino.

What, EXACTLY, is "that"?

I m planning to calculate the GPS bearing between two points of a quadcopter.

If you are using TinyGPS++, the library has a method to calculate the bearing between any two points.

If you aren't, you should be.

I want to calculate the angle between the base station and the quadcopter position

That's not quite the same thing as calculating between two points on the quadcopter path. How will you know where the base station is?

with that I need to control the 2 servo motors in the base station

How will you get the bearing information to the base station? Why not just tell it where the quadcopter is, and let the base station figure out the bearing to the quadcopter?

because I'm very new to arduino.

That is no excuse for piss-poor requirements.

crazkas:
hi,
I m planning to calculate the GPS bearing between two points of a quadcopter. I want to calculate the angle between the base station and the quadcopter position. with that I need to control the 2 servo motors in the base station where the two antennas are connected with those servos. So please help me with that because I'm very new to arduino.

Sure, this is very easy. You have a GPS in the base, and a GPS in the copter. You transmit the copter coordinates back to the base. subtract the 3d coordinates of one from the other. Now you have the absolute difference. Plug those numbers into a formula to convert from Cartesian values to angles. Now you have your "bearing". All you need now is a cheap dollar store compass to line up the antenna array.

Done, done and done. What was so hard about that?