gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Announcements And Comments > GBA GPS mapping receiver

#34790 - Mikhail - Wed Jan 26, 2005 7:20 am

Mapping GPS receiver.

2 easy steps:

1. connect any GPS sensor/receiver to GBA link port with 2 wires
2. Upload up to 20 maps (calibrated scanned images, satelite images of any size) to the GBA with the provided ROM maker/ image calibration program

Main features:

a) Up to 20 maps of any size
b) Automatic (searches appropriate map) or manual switch between maps
c) Always holds current position on the map at the screen center by fast (but in dependence on the speed) and precise scrolling of the map
d) Browse mode allows to view maps (pretty similar to GPS picture viewer)
e) GPS fix can be shown/hidden (Time, Number of satellites, Latitude, Longitude and Altitude)
f) Adjustable parameters of serial port
g) Shows NMEA messages for debug
h) zoom out to 2x, 4x, 8x
i) Gamma correction of the images

http://www.msh-tools.com/GBA/gbagps.html

Regards,
Mikhail

#34805 - isildur - Wed Jan 26, 2005 3:22 pm

Wow this looks fantastic!

#34825 - ScottLininger - Wed Jan 26, 2005 7:40 pm

Mikhail,

What is the smallest/least expensive receiver that one could use with this?

And how accurate is the GPS receiver you've been using? Could one identify where in a building you are?

-Scott

#34828 - Mikhail - Wed Jan 26, 2005 8:46 pm

ScottLininger wrote:


What is the smallest/least expensive receiver that one could use with this?

And how accurate is the GPS receiver you've been using? Could one identify where in a building you are?



One of the smallest receivers is Trimble Lassen SQ (stamp-size). 110mW at 3.3 V (can be powered from GBA). Adjustable baud rate. Just read from the site, never seen. ~$40.
Looks good, but antenna is needed (another $20): http://www.toppcompanies.com/tds/tds-component-models.htm

On the other hand one can buy the chipest Magellan Explorist for ~$100. It will aslo have some storage space for waypoints and built-in vector map (actually not good, will show only major roads).
www.magellangps.com

The chipest Garmin GPS-18 sensor (with antenna) costs ~70$ but operates at 4800 bps only (not ready yet in my system).

There are a lot of annoncements from the companies on one chip GPS receivers with the cost less than 10$ (Thales navigation). But I dont know where these modules can be purchased.

Accuarcy of modern receivers is about ~10m without WAAS and ~3m with WAAS ( waas is available not in all areas). Altitude accuracy is about 15m.

You can not identify yourself in the building, clear sky is needed to get sattelite signals.

Mikhail

#35072 - ymalik - Sun Jan 30, 2005 2:26 am

Hey! We're making the same thing for our senior design project. We're going to have a seperate 16 MB flash ROM as well to store the maps.

#35074 - ymalik - Sun Jan 30, 2005 2:36 am

How are you able to use raster images and map longitude and latitude coorinates to them? We are going to use ESRI shapefiles and the corresponding DBF file to display the data (and we're having a tough time, too). I'm surprised that you are able to use raster images.

#35077 - ymalik - Sun Jan 30, 2005 4:17 am

Looking from your program, I see that you figure out the longitude and latitude coordinates by hand. Isn't that kind of a pain to do every street?

#35079 - tepples - Sun Jan 30, 2005 4:22 am

ymalik wrote:
I see that you figure out the longitude and latitude coordinates by hand. Isn't that kind of a pain to do every street?

Not if the city government cooperates, providing GIS data in readable formats.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#35108 - Trey - Sun Jan 30, 2005 3:07 pm

ymalik wrote:
Looking from your program, I see that you figure out the longitude and latitude coordinates by hand. Isn't that kind of a pain to do every street?


if you know the projection of the data, you just need one lat/lon reference point.

#35123 - ymalik - Sun Jan 30, 2005 10:04 pm

You're working in tile mode 1 or 2, correct?

#35138 - Mikhail - Mon Jan 31, 2005 2:17 am

Thanks for feedback.

As it was already answered, for scanned map it is not necessary to enter coordinates of every object, just more than 2 reference points for the whole map (if projection is known).

To my opinion (I am experienced user of Magellan mapping GPSR) vector graphic and scanned images should be used in conjunction. Vector graphics is for huge amount of data and search, raster images are for clear positioning. Also, in raster format sattelite (or aero) images can be used.

Correct, GBA GPS works in tile mode this is done exclusively for extremely fast scrolling (using DMA and internal scroll registers). Zoomed maps are shown in tile mode, but without DMA, you can see the difference: scrolling is slower. Actually, I put a delay while scrolling from point to point (delay is calculated using time to get fix and corresponding displacement). Real performance of scrolling is much higher.

Perfect GPS receiver should combine both raster and vector maps (as was intended by www.redskymobile.com, unfortuantly this project was not finished (I think because of $250 unit price)).

To ymalik: good luck with your great project. If you will do ESRI format support, you can aslo add raster images, this is much easier.

Mikhail.

#35142 - ymalik - Mon Jan 31, 2005 3:46 am

Thanks for the comments, Mikhail.

We were originally going to use vector images for the maps, but when I saw your GPS device, I thought about using raster images instead, mainly because we can work in tile mode. I am guessing that drawing a vector image and then redrawing it when scrolling, even when using a mode 4 double buffer, would be slow. Our data is also going to be stored in FAT32 formatted seperate flash ROM, so swapping back and forth may be innefficient. However, vector images, especially ESRI shapefiles, provide more coverage.

But how can you use raster and vector images together? Would it still be possible to work in tile mode when using vector images?

You can visit our project page at:
http://gba.arsjerm.net

Thanks,
Yasir

#35145 - tepples - Mon Jan 31, 2005 6:10 am

Yes, it is possible to make a virtual bitmap out of tile VRAM, making a unique tile for every space on the map, but that's a rather advanced topic. For one thing, pixel addressing in a tile-mode bitmap isn't linear, and for another, all pixel writes in your line-drawing loop (whether fixed-point or Bresenham) have to be read-modify-write.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#36366 - Mikhail - Fri Feb 18, 2005 4:23 am

I have added two not built-in in GBA communication speeds: 1200 and 4800 by custom reading algorithm in the general mode of the GBA link port.
Now almost all available sensors/boards/receivers can be used with GBA GPS.
Also, I changed scrolling algorithm (to make it smoother) and add 'settings" menu to the ROM maker program, see www.msh-tools.com/GBA/gbagps.html for details.
Mikhail

#36384 - ymalik - Fri Feb 18, 2005 2:17 pm

Nice to hear from you again, Mikhail.

I was able to display a shapefile, which was stored in a array, on the GBA, but it was taking about 2 seconds to draw the file. This was just unacceptable. Using a bitmap image was also not acceptable because we wouldn't get the coverage we wanted. Our architect is a PHP guru and he told us about a PHP extension that allows creation of bitmap images using vector lines. Here is the link http://us4.php.net/gd . So we are going to be coverting the shapefiles into a sequence of bitmap images and work in tile mode. We are also going to be able to use the DBF files as meta data in this instance. I guess this is what you meant by using both raster and vector images.

#36408 - Mikhail - Sat Feb 19, 2005 4:17 am

Hi,
Similar aproach is used by Magellan and Garmin GPS receivers.
In Magellan format all vector data are in compressed files (set of points for lines, polygones, points). Names are in Raima database format. At runtime it creates bitmap file from the objects with the size of about twice of the size of the screen, then this bitmap is scrolling to match current position. When it reaches the border, receiver redraw next area (creates new bitmap) and so on. Redraw is not very fast, it takes about 1 second. I think this is the only way to show vector data with acceptable speed. As far as I know Garmin uses similar algorithm, but format of databases is different.
I dont think this is a good idea to keep vector data in the original *.shp format and names in the DBF format. More convinient is to preprocess them to more simple format before loading to the memory.
Mikhail.

#36425 - ymalik - Sat Feb 19, 2005 2:56 pm

Yes, we are taking a shapefile and drawing it using the PHP extension I mentioned, saving the image as a bitmap, and then using another tool to break it up into tiles and indices in order to work in tile mode. The scrolling will be done Zelda-style: once you get to the end of a map, a new map is loaded. That way we will have fast scrolling. Our own preprocessed version of the DBF file will be used as meta data.

#36435 - tepples - Sat Feb 19, 2005 10:10 pm

ymalik wrote:
The scrolling will be done Zelda-style: once you get to the end of a map, a new map is loaded. That way we will have fast scrolling.

And if a street name is split across screens, or a street is at the very edge of the screen, that could make it very frustrating.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#36436 - ymalik - Sat Feb 19, 2005 11:13 pm

Well, we are going to a PHP program to generate the image (which will be broken up into 512x512 bitmaps) along with the text, so there is no reason to think we can't take care of that. Just make sure that the initial and position and length of the string are within the bounds of the image.

#36523 - gb_feedback - Wed Feb 23, 2005 3:43 pm

Mikhail: Nice looking application. I just bought a Lassen SQ to try it out with. Would I be right in assuming that the 'Inverse' RS232 Setting, inverts the data so that you can use the raw logic level coming from the GPS Module without having to invert it to get RS232? Nice if it does as it saves me a transistor.
_________________
http://www.bookreader.co.uk/

#36525 - Mikhail - Wed Feb 23, 2005 5:02 pm

Right. With inverse output, program automaticaly reads inverse signal. This is an equivalent of putting a transistor.
I did test with transistor also. You always can try different port settings to find out which one is correct.
I did all test with my Meridian GPS (with/without transistor), but I am pretty sure it will work with other sensors.
How much did you pay for Lassen SQ? Here is a quatation I got from Trimble:

The price for the Lassen iQ is as follows:
Qty 1-99 $46
100 $35

The price for the Lassen SQ is as follows:
Qty 1-99 $45
100 $34

I'am considering to buy something with SIRF chipset, as I learned, this chipset is the most sensitive. But the price is ~$100. Does anybody know inexpencieve small sensors based on Sirf?

Mikhail.

#36526 - gb_feedback - Wed Feb 23, 2005 6:02 pm

Thanks for the reply. That makes it easier.

Quote:
How much did you pay for Lassen SQ?

I paid ?25 in the UK. The antenna (embedded with suitable connector for Lassen SQ) was ?15. Then I had to pay ?15 postage which was a bit sad. And also VAT at 17.5%. But it will be interesting to try something new.

First I have to build the equivalent of their development system, to be able to switch the output mode to NMEA 0183, but at least I didn't have to buy the dev system, as the required software is downloadable from the Trimble web site.
_________________
http://www.bookreader.co.uk/

#37745 - gb_feedback - Tue Mar 15, 2005 7:02 pm

I've adjusted my Lassen SQ and wired it up to the Gameboy DS.

Getting very close now. A few comments though. Firstly I was confused by 'Inverse'. In other words I set it to Yes and it should have been 'No'. It all depends on your frame of reference. Still, no matter, that is sorted out now.

Second I am finding that I can't set the longitude on reference point 1. It keeps resetting itself to 0 for some reason. I get round that by using reference points 2 and 3.

Finally the application crashes on exit on my XP system. Message is Exception EOSError at 0000C016, System Error 1400, Invalid Window handle. I believe it also crashed on a Win 98 2nd Ed too. The crash doesn't affect it working though. It's producing a nice map, and when my SP is charged again I'm going to give it another try with correct reference point. As I haven't wired in the backup battery yet, I have to leave it for about 20 minutes before i get a fix.

If you need my .gmap file to fix the ref point 1 bug, let me know.

EDIT: Got a fix now - I'm only a 100m or so away from where I am! Cool.
_________________
http://www.bookreader.co.uk/

#37762 - Mikhail - Wed Mar 16, 2005 12:02 am

I've never experienced these problems (Windows XP).
Are you sure that you are using the latest version of the program? (First version had problem of reseting the data for reference points). Mikhail

#37782 - gb_feedback - Wed Mar 16, 2005 1:32 pm

Mikhail,

I'm going to email you with more detail when I get home. But I have just tried the app on Win 98 2nd Ed here and get essentially the same problem (crash on exit). Both these 2 copies of the app were downloaded separately at 2 separate locations to 2 separate computers (the other with XP). Both are the version with 1200 baud allowed, so I guess that must be the latest version? The problem occurs whether I exit using the menu or using the cross in the right top corner. It only causes the error after I've made a .GBA program (ie it doesn't if I just call in a map then exit), but doesn't give the error message until actual program exit. Could it have to do with some associated distributable file; I wonder what the development environment was.

EDIT: On win 98 2nd Ed error says:
Application Error
Exception EOSError in Module GBAGPS.EXE at 0000C016.
A call to the OS function failed.

EDIT: Oh I see this is a Delphi error message...

EDIT: There are dozens of references on the internet to EOSError 1400

http://www.delphifr.com/forum.v2.aspx?ID=158301 is one.

As far as I can make out (don't read French too well) is may have something to do with showmessage()
_________________
http://www.bookreader.co.uk/

#37961 - Mikhail - Sat Mar 19, 2005 5:02 am

Thanks for the file.
I fixed the bug on ressetiong the coordinate and changed the way of termination of the thread. I could not made the program crashed under WinXP, Win2000 and Win98. Mikhail.

#37971 - gb_feedback - Sat Mar 19, 2005 12:39 pm

I have tried it once so far (on XP). Both bugs seem to have been fixed. Well done, Mikhail.
_________________
http://www.bookreader.co.uk/

#38042 - ymalik - Mon Mar 21, 2005 12:49 am

Can you please describe how you are doing the scrolling?

#39176 - Mikhail - Tue Apr 05, 2005 5:06 pm

Sorry, I did not answer, I did not notice your message. In case you still have some questions please contact me via email (from my website).

Based on comments, I have implemented new features to GBA GPS:
now it shows speed and heading (extracted from $GPRMC message). Also I added autosaving of the last position and settings.