GPS NMEA antenna aiming tracker.

THE_RB

Joined Feb 11, 2008
5,438
You mentioned the simulator and BASIC, but not which BASIC?
Calculating distance and/or bearing between points is going to be a pain in the butt (if possible at all) without trigonometry.
From memory, one of the NMEA data stings that comes out of the GPS module is already nicely formatted and contains the heading (horizontal degrees 0-360) and azimuth (vertical degrees 0-90) of every satellite it is locked to.

So if your moving antenna has a motor for horizontal rotation and a motor for vertical rotation you just turn it to the same two numbers.

That's zero math. :)
-------------------------------------------------------------------


http://www.visualgps.net/visualGPS/default.htm

That freeware above looks ok, and has the circle map showing the satellites position. Not the same freeware I used before but it looks better with more features. :)
 
Last edited:

Thread Starter

camerart

Joined Feb 25, 2013
3,838
From memory, one of the NMEA data stings that comes out of the GPS module is already nicely formatted and contains the heading (horizontal degrees 0-360) and azimuth (vertical degrees 0-90) of every satellite it is locked to.

So if your moving antenna has a motor for horizontal rotation and a motor for vertical rotation you just turn it to the same two numbers.

That's zero math. :)
-------------------------------------------------------------------

http://www.visualgps.net/visualGPS/default.htm

That freeware above looks ok, and has the circle map showing the satellites position. Not the same freeware I used before but it looks better with more features. :)
The tracker has to cater for other sources other than satellites.

How I see is is, a satellite, vehicle, animal etc sends it's NMEA location data with LAT, LON and height. The tracker has it's location LAT, LON and height. The calculation is between these two data. On a PIC! I'm not sure if the calculation is from the centre of the earth or the flat earth:)

EDIT: Thinking about it, I suppose the elevation should allow 180 degree travel.

I'm no mathematician.
 

Attachments

Last edited:

THE_RB

Joined Feb 11, 2008
5,438
Ahh, I misunderstood. You said; "aim antennas towards the signal, based on GPS ... signals."

I thought you wanted to aim something at a GPS satellite. From a stationary base.

The big problem you are going to have using GPS to aim at something else, from a mobile base, is that you need to know the heading (360' horiz rotation) of your mobile base.

GPS does not know your heading, it calculates it by interpolating two or more position readings AS YOU MOVE horizontally. So you are not going to get any sort of accurate heading of your base unless it is moving in a straight line so the GPS can calculate a heading from multiple position readings in a line. Obviously the more readings, the straighter the road etc the more accurate the heading data becomes over time from averaging.

Do you have a way to deal with this?

It's probably a good idea to explain exactly what this device will do and how it will be used. :)
 

John P

Joined Oct 14, 2008
2,063
If there were a third GPS receiver (the target and the tracker are the first two) then the tracker could be designed to ignore its own heading, and calculate the azimuth of the target relative to the baseline between the tracker and the third receiver. That baseline would be known in the earth's frame of reference, because you'd know the locations of its endpoints. Or of course, you can always get an electronic compass module to tell you your heading. Even if you want to operate worldwide, you could have a lookup procedure to tell you local magnetic deviation, but if you're just working near home, you can assume it's constant.

But now I'm wondering what the distances involved in this setup are going to be. If a GPS receiver gives you a positioning accuracy of 20 feet or so, it seems inevitable that the angular accuracy you'll get will be better for long distances than for short ones, because the positional uncertainty has less effect. So for points 1000ft apart, being 20ft off each end of the true line would give you an angular error of 40/1000 or 1/25 radian, or about 2 degrees. Maybe that's acceptable, but the shorter the distance, the worse it becomes.
 

WBahn

Joined Mar 31, 2012
32,898
If there were a third GPS receiver (the target and the tracker are the first two) then the tracker could be designed to ignore its own heading, and calculate the azimuth of the target relative to the baseline between the tracker and the third receiver. That baseline would be known in the earth's frame of reference, because you'd know the locations of its endpoints. Or of course, you can always get an electronic compass module to tell you your heading. Even if you want to operate worldwide, you could have a lookup procedure to tell you local magnetic deviation, but if you're just working near home, you can assume it's constant.

But now I'm wondering what the distances involved in this setup are going to be. If a GPS receiver gives you a positioning accuracy of 20 feet or so, it seems inevitable that the angular accuracy you'll get will be better for long distances than for short ones, because the positional uncertainty has less effect. So for points 1000ft apart, being 20ft off each end of the true line would give you an angular error of 40/1000 or 1/25 radian, or about 2 degrees. Maybe that's acceptable, but the shorter the distance, the worse it becomes.
But unless I know my heading, how can I aim anything at anything even if I know the positions of numerous other things?

Another thing that needs to be considered is that GPS elevation data is much less accurate, usually, than lat/long data. This isn't as bad as it used to be as more and more receivers are using multiple satellites (e.g., twelve instead of four) to do their calculations from.
 

Thread Starter

camerart

Joined Feb 25, 2013
3,838
Ahh, I misunderstood. You said; "aim antennas towards the signal, based on GPS ... signals."

I thought you wanted to aim something at a GPS satellite. From a stationary base.

The big problem you are going to have using GPS to aim at something else, from a mobile base, is that you need to know the heading (360' horiz rotation) of your mobile base.

GPS does not know your heading, it calculates it by interpolating two or more position readings AS YOU MOVE horizontally. So you are not going to get any sort of accurate heading of your base unless it is moving in a straight line so the GPS can calculate a heading from multiple position readings in a line. Obviously the more readings, the straighter the road etc the more accurate the heading data becomes over time from averaging.

Do you have a way to deal with this?

It's probably a good idea to explain exactly what this device will do and how it will be used. :)
To clarify: (In case I used 'GPS' incorrectly) I use a GPS module to give me test information data.

The Tracker will be stationary, and will be aiming north and levelled. To start, it will need to be aimed at the source. (By sight, calculation etc) then it will read its location sentence in NMEA data form.

$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47
Which decodes to:
Latitude 48 deg 07.038' N Longitude 11 deg 31.000' E Altitude, 46.9,M

The tracker has a similar code, with it's location, these two data are compared, giving the Azimuth angle 0-360 and Elevation angle 0-90 or 0-180.

See ('artist's:) impression of tracker.
 

Attachments

Last edited:

Thread Starter

camerart

Joined Feb 25, 2013
3,838
If there were a third GPS receiver (the target and the tracker are the first two) then the tracker could be designed to ignore its own heading, and calculate the azimuth of the target relative to the baseline between the tracker and the third receiver. That baseline would be known in the earth's frame of reference, because you'd know the locations of its endpoints. Or of course, you can always get an electronic compass module to tell you your heading. Even if you want to operate worldwide, you could have a lookup procedure to tell you local magnetic deviation, but if you're just working near home, you can assume it's constant.

But now I'm wondering what the distances involved in this setup are going to be. If a GPS receiver gives you a positioning accuracy of 20 feet or so, it seems inevitable that the angular accuracy you'll get will be better for long distances than for short ones, because the positional uncertainty has less effect. So for points 1000ft apart, being 20ft off each end of the true line would give you an angular error of 40/1000 or 1/25 radian, or about 2 degrees. Maybe that's acceptable, but the shorter the distance, the worse it becomes.
See #27, for clarification.

1/ being no mathematician, looking at my Azimuth elevation image, and the shaded base. Is it better to calculate from the ground or the centre of the earth?

2/You are correct when you talk about distance and angle! The receiver antenna will be designed to have a signal angle suitable for the finished tracker (Kind of chicken and egg), bearing in mind lateral speed of object and speed of the calculation.
 
Last edited:

THE_RB

Joined Feb 11, 2008
5,438
...
The Tracker will be stationary, and will be aiming north and levelled. To start, it will need to be aimed at the source. (By sight, calculation etc) then it will read its location sentence in NMEA data form.
...
Thanks for the extra info, that clears things up.

Just to make sure, this will always be stationary and at a known lat/long/ele and it's rotation has been precalibrated?

So the entire purpose of the device is that you enter a second lat/long/ele and it points towards the second location?

I think at short ranges you only need basic trig;
You determine horiz distance from the two lat/long values and trig.
Elevation diff is ele1 minus ele2.
Azimuth using trig using horiz distance and ele dif.
Horiz rotation using the two lat/long and trig.

At short distances (local antenna range) you can ignore the curvature of the earth and pretend the earth is flat.

If you get over 10 miles or so you may need to include curvature, but it really depends how accurate you want the aiming. That yagi antenna will be fine within 5 degrees of accurate, which will cover a LONG range before the curvature becomes a problem.
 

Thread Starter

camerart

Joined Feb 25, 2013
3,838
Thanks for the extra info, that clears things up.

Just to make sure, this will always be stationary and at a known lat/long/ele and it's rotation has been precalibrated?

So the entire purpose of the device is that you enter a second lat/long/ele and it points towards the second location?

I think at short ranges you only need basic trig;
You determine horiz distance from the two lat/long values and trig.
Elevation diff is ele1 minus ele2.
Azimuth using trig using horiz distance and ele dif.
Horiz rotation using the two lat/long and trig.

At short distances (local antenna range) you can ignore the curvature of the earth and pretend the earth is flat.

If you get over 10 miles or so you may need to include curvature, but it really depends how accurate you want the aiming. That yagi antenna will be fine within 5 degrees of accurate, which will cover a LONG range before the curvature becomes a problem.
At the moment 'Always stationary at a known location and precalibrated'.

Some targets could be hundreds of miles away, Satellites for example.
 

THE_RB

Joined Feb 11, 2008
5,438
Well it looks like you will need to include curvature and geoid information in your calcs. Ouch.

Ground targets "hundreds of miles away" will be well below the horizon, so not much use to try to point at them. ;)

I would also like to know how you will get the current position (lat/long/ele) of a satellite? :eek:

(Except GPS sats in view, which as I mentioned before are spat out by the GPS text already as neat heading and elevation numbers so no math is required).
 

Thread Starter

camerart

Joined Feb 25, 2013
3,838
Well it looks like you will need to include curvature and geoid information in your calcs. Ouch.

Ground targets "hundreds of miles away" will be well below the horizon, so not much use to try to point at them. ;)

I would also like to know how you will get the current position (lat/long/ele) of a satellite? :eek:

(Except GPS sats in view, which as I mentioned before are spat out by the GPS text already as neat heading and elevation numbers so no math is required).
All math/s is 'ouch' to me.

I'm really only interested in a 180Degree disc at ground level.

The tracker will be for many 'targets' satellites being one. Pre-knowledge or perhaps looking at the night sky, or in the case of an animal with a transmitter on it, simply scan with the antenna till the signal is high enough to start the tracker.

Regarding your comment "GPS sats in view" when they spit out the data, can you explain how the tracker knows what angles to move to, without any math/s being required, please?
 

ericgibbs

Joined Jan 29, 2010
21,454
hi C,
Trust me , you will require fast Trig maths to resolve the data.
I was designing electronics surveying equipment for many years.
Eric
 

Thread Starter

camerart

Joined Feb 25, 2013
3,838
hi C,
Trust me , you will require fast Trig maths to resolve the data.
I was designing electronics surveying equipment for many years.
Eric
Hi E,

Is it possible to design fast enough maths for this? Can you give an estimate of time for each calculation please? The whole tracker will need to be designed around the maths speed.

Cheers, Camerart.
 

ericgibbs

Joined Jan 29, 2010
21,454
hi C,
I used a Z80A cpu based system, running at 6Mhz, it was able to cope with most maths.

On some of my laser ranger X, Y scanners I had to use 3 , Z80A's for the different functions.

With ship borne GPS a single Z80A was fast enough.
 

Thread Starter

camerart

Joined Feb 25, 2013
3,838
hi C,
I used a Z80A cpu based system, running at 6Mhz, it was able to cope with most maths.

On some of my laser ranger X, Y scanners I had to use 3 , Z80A's for the different functions.

With ship borne GPS a single Z80A was fast enough.
Ah, the good old Z80! I used a couple of Spectrums to run a photographic lab I built. Happy days.

I will most likely be using 16F886 Pics with XTL and perhaps running at 20MHz.

Do you have 16F886s, are you familiar with them?

C.
 

THE_RB

Joined Feb 11, 2008
5,438
...
Regarding your comment "GPS sats in view" when they spit out the data, can you explain how the tracker knows what angles to move to, without any math/s being required, please?
Check this page;
http://aprs.gids.nl/nmea/
it is a good reference of the text data spat out by most GPS modules. You module won't output every NMEA sentence, but it will output the satellites in view.

Check out the sentence;
$GPGSV
it has data for every GPS satellite in view. You can use these two data fields;
5 = Elevation in degrees, 90 maximum
6 = Azimuth, degrees from true north, 000 to 359

which show the satellite position relative to your GPS ground position. To point at that satellite just turn the rotation motor to match 6 (Azimuth) and the elevation motor to match 5.

Your antenna will then be pointed at the satellite. No maths required. :)

(edit) The PC freeware I linked to in a post above uses that elevation/azimuth data to show the satellites on a circle map. The GPS outputs those two data fields for every satellite in view, so the software shows them on a little circle map of the "sky".
 

jjw

Joined Dec 24, 2013
823
Hi E,

Is it possible to design fast enough maths for this? Can you give an estimate of time for each calculation please? The whole tracker will need to be designed around the maths speed.

Cheers, Camerart.
What is fast enough? Doesn't it depend of the speed of the object?
I checked the speed of the floating point functions in Oshonsoft Basic.
At 20MHz they take about 10ms / function.
My guess is that calculating the bearing takes about 0.15s.
 

Thread Starter

camerart

Joined Feb 25, 2013
3,838
What is fast enough? Doesn't it depend of the speed of the object?
I checked the speed of the floating point functions in Oshonsoft Basic.
At 20MHz they take about 10ms / function.
My guess is that calculating the bearing takes about 0.15s.
Yes it depends on the speed and distance of the object.

0.15, thanks, that seems good enough for what I want. Once I have the calculation, I will design the tracker to be as fast as the calculation.
 
Top