Please be aware of all shipping deadlines before placing your order - we cannot guarantee orders will arrive before Christmas!

Ultimate GPS programming
Moderators: adafruit_support_bill, adafruit

Ultimate GPS programming

by n6rob on Mon Sep 24, 2012 1:55 pm

Greetings,

I am attempting to add an Ultimate GPS to my Ice Tube Clock to improve it's accuracy. I have updated the firmware in my clock and wired the GPS as described in the mods page for the clock. The clock does not receive the GPS data as it flashes "no gps" even though the GPS has a lock on satellite signals (I ran it over night).

I've read posts where people have asked if the Ultimate GPS is compatible with the Ice Tube Clock and the answers were affirmative. However, in reading the description page of the GPS, I note that the GPS module sends NEMA data at 9600 baud. The notes on the Ice Tube Clock mods page say it receives data at 4800 baud. At the moment I believe this is the source of at least one problem, and one reason the two won't play together.

I've searched and seen no references on this specific issue in the forums. If you find something, please point me there.

So my tentative plan is (was?) to wire-up the Ultimate board to my serial port, run the Mini GPS Tool (per the tutorial page) and adjust the NEMA string baud rate to 4800 from 9600.

But I am facing two issues:

First, the tutorial does not show how to wire directly to the serial port (in my case via an USB-to-Serial adapter), rather it shows how to wire the GPS to an Arduino. I don't have an Arduino. I can probably figure this one out on my own; I'll research the pin-outs on serial ports and solder-up something and see what I can accomplish.

EDIT: Okay, after researching and thinking about it I see that I'll need a RS-232-to-TTL converter; I've ordered one (FTDI Friend + extras).

The second issue is that upon researching this on the forums, I see that some people have apparently bricked their Ultimate GPS units when attempting to use the GPS Software Tool to configure them (for logging, baud rates, etc.). See post: http://forums.adafruit.com/viewtopic.php?f=19&t=28940&hilit=gps While the support team says not to change the baud rates of the GPS, I interpret this as, "Don't INCREASE the baud rates of the GPS beyond 9600". I need to DROP the baud rate to 4800 so the clock can read it. Is that okay? Also, I am not interested in fast update rates (e.g. 1 Hz, 5 Hz, 10 Hz, etc), I could live with updates every few minutes since all I am doing is updating the clock's time setting. Therefore I don't need a higher baud rate anyway - all I need to do is get the two on the same rate so they can play nice.

Do I run the risk of bricking the GPS? The thread referenced above has no conclusion so I am spooked on the idea of attempting to change anything. Any suggestions? Has anyone else done this? Has anyone else updated their Ultimate board without bricking the unit?

Thanks in advance for any assistance.
n6rob
 
Posts: 18
Joined: Sun Sep 16, 2012 9:39 pm
Location: Silicon Valley, California, USA

Re: Ultimate GPS programming

by n6rob on Tue Sep 25, 2012 1:44 pm

I was really hoping someone could give me some advice on this. Thank you in advance.
n6rob
 
Posts: 18
Joined: Sun Sep 16, 2012 9:39 pm
Location: Silicon Valley, California, USA

Re: Ultimate GPS programming

by wbp on Thu Sep 27, 2012 6:05 pm

I have added support for a GPS at 9600 bps to my IceTube clock firmware but have not had a chance to test it yet. This should work with the Ultimate GPS without any changes. I use the same GPS code in another clock and have tested it there with the Ultimate GPS at 9600 and it works. If anyone wants to test this let me know.

William
User avatar
wbp
 
Posts: 226
Joined: Mon Mar 07, 2011 1:18 pm

Re: Ultimate GPS programming

by n6rob on Sat Sep 29, 2012 12:37 am

I have tested William's code and it works in my Ice Tube Clock with the Ultimate GPS board. The interface is running at 9600 baud. I have switched from the stock ATmega168 to a ATmega328p in order to do this.
n6rob
 
Posts: 18
Joined: Sun Sep 16, 2012 9:39 pm
Location: Silicon Valley, California, USA

Re: Ultimate GPS programming

by majestic-mike on Mon Oct 29, 2012 7:07 pm

I encountered a similar problem when I used an Adafruit Ultimate GPS Breakout v3. To solve this problem, I used the original manual and the source code for it, and a slightly modified file iv.c. The above-mentioned changes in the file "iv.c" were associated with the correction of line №518. In the original version of "iv.c" the "uart_init(BRRL_4800);" was listed on the 518th line, but I have corrected it to "uart_init(BRRL_9600);". After that I rebuild firmware with WinAVR software, and update the Ice-Tube clock with it, using avrdude and USBTinyISP (according the "Installing mods" description on the GPS-mod webpage). And it's seems to work fine (please correct me if I did something wrong, I'm a newbie). And I'm sorry for my bad english (I'm from Russia).
majestic-mike
 
Posts: 1
Joined: Tue Aug 28, 2012 4:36 am

Re: Ultimate GPS programming

by efrank03gps on Thu Nov 01, 2012 8:49 pm

Can one get two ultimate GPS units (MTK3339) to get the same LatLong position when they are next to each other? Most of the satellites they are using are the same except the WAAS ones: one is using 51 and the other is using 48 for WAAS. Each unit gives a stable position within about +- 5 meters, but as their positions wander around within this range, the two units wander differently. I want the 2 units to give the same result as each other so if I compare the readings, I can tell where one is relative to the other. That is more important for my use than the absolute position at high accuracy. Can one control which satellites they are each using, or get them to use the same WAAS satellite (which might be enough to synchronize their reported positions)? Alternatively, are there other ways to get two GPS units near each other to give very similar positions?
efrank03gps
 
Posts: 3
Joined: Tue Oct 23, 2012 10:56 am

Re: Ultimate GPS programming

by wbp on Thu Nov 01, 2012 11:08 pm

GPS works by measuring the time the signals from different satellites arrive at the receiver vs. what time they were sent. The measurement requires significant precision, as you can imagine. The arrival time of the signal is affected by many things, including the Earth's ionosphere. I am not surprised that two side by side modules would report slightly different positions. 5 meters is well within the specification for GPS without using a differential signal. Most commercial GPS units will do position averaging while stationary. You might try doing this to achieve higher accuracy. With averaging you can get down to 1 meter in under 20 seconds.

Interesting reading on the subject, with really cool graphics: http://www.syz.com/gps/gpsaveraging.html

William
User avatar
wbp
 
Posts: 226
Joined: Mon Mar 07, 2011 1:18 pm

Re: Ultimate GPS programming

by efrank03gps on Sat Nov 03, 2012 10:25 pm

William, Thanks for your interesting input. The article you suggested was indeed helpful and the graphics were great although the information is seriously out-of-date. I still don't understand why two GPS units, supposedly identical, give different positions even when they are at the same location. All the atmospheric effects would be the same for the two units, and I can see that they are using the same satellites - even the same WAAS satellite. I have even been plotting the difference in readings between the two units, and that changes over time as well.
efrank03gps
 
Posts: 3
Joined: Tue Oct 23, 2012 10:56 am

Re: Ultimate GPS programming

by john444 on Sat Nov 03, 2012 11:00 pm

Hi E Frank,

efrank03gps wrote:Each unit gives a stable position within about +- 5 meters, but as their positions wander around within this range, the two units wander differently.

I believe that the variations between the two GPS receivers that you see is predominately due
to the receiver circuitry's inability to differentiate time intervals that vary by less than about 20-nS.
It comes up with a number but that number is only within a range of possible values.
It is a type of 'noise' for the absolute position.
efrank03gps wrote:if I compare the readings, I can tell where one is relative to the other.

I am unaware of any fast way to eliminate this 'noise'.
Although, as was pointed out by WBP, long-term averaging will do it.

Good Luck, John
john444
 
Posts: 443
Joined: Sun Mar 04, 2012 2:42 pm
Location: Claremore, Ok