Adding a Bluetooth GPS

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
pbenco
Posts: 71
Joined: 29 Sep 2010, 09:43
Contact:

Re: Adding a Bluetooth GPS

Post by pbenco »

Dear h-g-t

Just to be sure: Were you outside your house??? on openfield area??? Have you wait more than 3 minutes to enable the BT GPS to lock the signal???
Your device seems to be very environnement sensitive, so in a house, you are pretty sure to get troubles.
The documentation of your GPS unit is clear , and the strings in the file seems incomplete, which tends to demonstrate that it hasn't have enought time to lock the satellite signals.

BUT, as it works once, with some strings in the file looking usable, please give it a chance:
1 - Put your BT GPS unit fully charged on a table, outside, in openfield. Wait about 20 mins to enable full stabilisation.
2 - Get a NXT, with the program i give in my article, with a freshly downloaded firmware (1.28 at least) and no BT link at all.
3 - Get your BT be recognized by the NXT at comm port 1 - (be sure to disable BT on your cell phone BEFORE launching the search...)
4 - Run the program, and you will be fixed.

Best regards
Ben
pbenco.wordpress.com/
h-g-t
Posts: 552
Joined: 07 Jan 2011, 08:59
Location: Albania

Re: Adding a Bluetooth GPS

Post by h-g-t »

The unit had been charged and left outside for over an hour this afternoon before being brought back inside. It had switched itself off (as the manual said it might).

It was then connected up to the same external aerial as when it worked (partially) last night but did not get any data the one time it worked then the program did not run properly. I deleted all contacts from the NXT and tried again but just got the 'program running message'.

Tonight I had to take the battery out of the GPS, switch off the NXT and start again to get it working, which it did without the external aerial, but still gave a slightly inaccurate answer.

I deliberately looked for an older device because I thought it might be more compatible with your program. Unfortunately, these were not nearly so good at connecting in adverse conditions.

I have won another (un-named) model off ebay but think I will try for a much newer version as well.

Still, proves you were right and the NXT can talk to a BT GPS - just need to find out how accurate they can get.
A sophistical rhetorician, inebriated with the exuberance of his own verbosity, and gifted with an egotistical imagination that can at all times command an interminable and inconsistent series of arguments to malign an opponent and to glorify himself.
mcsummation
Posts: 220
Joined: 23 Jan 2012, 17:07
Location: Round Rock, TX

Re: Adding a Bluetooth GPS

Post by mcsummation »

How far off was it? (When it did work.) My little Garmin eTrex is good to about 8 feet even when walking around.
h-g-t
Posts: 552
Joined: 07 Jan 2011, 08:59
Location: Albania

Re: Adding a Bluetooth GPS

Post by h-g-t »

Oh, it was miles away, about 2m in latitude and 0.5m in longitude - you can't get it much closer using Google maps!

Being a complete eedjit, I was misinterpreting how to parse the raw data in the file.

Latitude 8.6748s cf 8.6136s difference 0.0612s

Longitude 53.6700s cf 53.6852s difference 0.0152s

Close enough for government work, as they say, and that is with an out-dated unit.

I would have to do a few more runs to see how consistent it is, but it is certainly close enough for my purposes (geotagging photographs).

The only annoyance is the need to reset the unit by removing the battery before it will talk to the NXT, even though the blue led indicates they are connected.

Update - I think the reason I was having difficulty connecting sometimes was because the external aerial was using up so much power that the voltage dropped and affected the BT signal.

By moving the pin on the maps at full resolution, I estimate 50 m covers 1.1586 seconds of arc, so 1 m on the ground is about 0.023172 seconds.
A sophistical rhetorician, inebriated with the exuberance of his own verbosity, and gifted with an egotistical imagination that can at all times command an interminable and inconsistent series of arguments to malign an opponent and to glorify himself.
h-g-t
Posts: 552
Joined: 07 Jan 2011, 08:59
Location: Albania

Re: Adding a Bluetooth GPS

Post by h-g-t »

Just when I thought I had it all sorted ....

I estimated the coordinates from http://itouchmap.com/latlong.html then added them to the spreadsheet where I am storing the readings from the GPS.

There was an error of about 3m in both directions, but I know the satellite and map views never coincide so that does not bother me.What is strange though, is that the last four GPS readings have been identical, even though the last set was taken 5 m away from the other locations.

I deleted the txt files from both NXT and PC between tries to ensure that I was not just reading the same file over and over but to no avail. The readings on the screen stayed the same as well.

Think I will put it all away until I get another GPS and try again.

Difference (seconds) Difference (metres)

-0.2448 0.7272 -10.56447437 31.38270326
0.0684 0.0696 2.951838426 3.003625065
0.0684 0.0696 2.951838426 3.003625065
0.0684 0.0696 2.951838426 3.003625065
0.0684 0.0696 2.951838426 3.003625065 taken in another room
A sophistical rhetorician, inebriated with the exuberance of his own verbosity, and gifted with an egotistical imagination that can at all times command an interminable and inconsistent series of arguments to malign an opponent and to glorify himself.
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: Adding a Bluetooth GPS

Post by afanofosc »

I don't understand what you mean by "taken in another room". You cannot use a GPS indoors. It will not give you usable results.

GPS with an NXT is only for outdoor use and only for gross navigation (i.e., within 2 or 3 meters).

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
hassenplug
Posts: 346
Joined: 27 Sep 2010, 03:05
Contact:

Re: Adding a Bluetooth GPS

Post by hassenplug »

A couple comments from my GPS experience. First, I seem to recall the GPS units I had would not lock on to satellites, unless they were connected via bluetooth to my NXT. Even if they sat outside for a while, they would only lock on (lights indicated a satellite fix) when the NXT was connected. They all seemed to work, but some were more accurate than others.

Second, it sounds like the accuracy issue may be because of the length of decimal value you're using. If you can move within a few miles, and always get the same reading, it could be rounding off the last couple digits.

OK, I took a quick look at the code. One potential problem is the handling of the decimal value. The code lists this:
$--GGA,hhmmss.ss,llll.ll,a,yyyyy.yy,a,x,xx,x.x,x.x,M,x.x,M,x.x,xxxx*hh

your sample shows this:
$GPGGA,000110.0,5611.13936,N,00309.90546,W,0,00,,00092,M,,,,*2E

The code stores the values llll.ll and yyyyy.yy into two integers (each). You should review how the decimal portion of those are handled. If the value .90546 is trimmed to .90, that would cause a significant resolution issue.

Hope that helps
Steve
---> Link to lots of MINDSTORMS stuff under my picture --->
h-g-t
Posts: 552
Joined: 07 Jan 2011, 08:59
Location: Albania

Re: Adding a Bluetooth GPS

Post by h-g-t »

Thanks Steve, but pbenco's program stores it to 5 decimal places (5611.14458,N,00309.89450,W) so that is not the problem.

I am trying it with the unit sitting in front of my computer so it is not getting a proper lock, which also causes incorrect dates, times, etc as well.

I stuck the unit in the window pointing up at 45 degrees earlier today and got a lock, so the time & date were correct for the first time.

Funny thing is that the coordinates kept moving up and down quite a bit (last 3 digits) in a cyclic pattern, although it was stationary.

Still more than close enough for what I want, although this particular unit might not be accurate enough for a competition robot.

My one and only NXC program (photographic) writes a log file. I intend to connect to the GPS to get the date, time and location for that file, so it does not have to be really accurate.

Once I bought the GPS, it occurred to me that I could also make a rather bulky photographic geocoder by having the NXT record locations to file when I press a button. By appending to a file, I would not need either the NXT or GPS on all the time, which would save the batteries.

All thanks to pbenco for making his program available. One thing to watch is that what is seen on the screen is not always what is stored in the file.
A sophistical rhetorician, inebriated with the exuberance of his own verbosity, and gifted with an egotistical imagination that can at all times command an interminable and inconsistent series of arguments to malign an opponent and to glorify himself.
h-g-t
Posts: 552
Joined: 07 Jan 2011, 08:59
Location: Albania

Re: Adding a Bluetooth GPS

Post by h-g-t »

Just to say that I finally bought one of these -

http://www.ebay.co.uk/itm/VODAFONE-KEYR ... 5d32ae6d3a

I originally went for older, slower units because I thought that they might be more compatible with the NXT but this one connected first time and it works with pbenco's program.
A sophistical rhetorician, inebriated with the exuberance of his own verbosity, and gifted with an egotistical imagination that can at all times command an interminable and inconsistent series of arguments to malign an opponent and to glorify himself.
hassenplug
Posts: 346
Joined: 27 Sep 2010, 03:05
Contact:

Re: Adding a Bluetooth GPS

Post by hassenplug »

I think I've lost track of what problems you're trying to solve. What's going on, again?

Steve
---> Link to lots of MINDSTORMS stuff under my picture --->
Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests