Shop OBEX P1 Docs P2 Docs Learn Events
Scrolling map background for GPS applications — Parallax Forums

Scrolling map background for GPS applications

cessnapilotcessnapilot Posts: 182
edited 2009-02-24 12:02 in Propeller 1
An object·(GPS Scrolling Map) has just appeared in OBEX that can display any 128x128 pixel portion of a much larger picture stored on the SD card of a uOLED-128-GMD1 module in 64K color format. With this object you can display any 128x128 pixel section of a previously scanned large map (for example a 650x800 pixel map) on the uOLED module with high graphic quality. If you synchronize this with the coordinate output of the GPS, you can create a scrolling digital map background for your embedded GPS application.

Questions and suggestions are welcome and can be addressed in this thread. In the preparation of v2.0 of the software I am focusing on the following tasks and questions:

-Calibration of a scanned digital map. I mean rotating, scaling, shifting and cutting portion of the bmp, jpg or any other graphic format scanned map images.

-Displaying vehicle symbol on the actual map frame image while collecting next frame in the background.

-Data header format for a single large digital map on the SD card.

-How to organize a collection of large scanned/calibrated digital maps to make easy for the Propeller to find out which one to use? (Maybe to include a limited zoom in/out feature, too.)

-What other vector graphic objects should we create / store and manage in the SPIN application to overlay on the scanned bitmap frame and how to harmonize that vector graphic data with the scanned image? Should we use ECEF coordinates, for example?

-Maybe there are some open source digital map formats from some GPS vendors with large, free map files that we can use to download and display with the Propeller/uOLED combination. I do not know any of such format

-How to use Google Earth to get scaled data? (Or, can we remove the overlayed text, for example?)

-Do we have·the right to scan our purchased map and display it on our Prop driven uOLED module? In other words: If we scale, transform and then decode the scanned map data into 64K uOLED color format, do we add value to our property or we just steel the data?

-The 'removable' overlay of some useful GPS info, heading and speed for example, seems straightforward with cutting and then displaying again that portions of the actual map frame. But, should we use text or sound to convey important information?

-Ideas to improve the simple 'PictDownload.exe' WindowsXP application, that will be sent via e-mail, upon request. With this program you can download a picture of almost any graphic format and of any size to the SD card of the uOLED-128-GMD1 module.

-Do the objects work with the uOLED-128-G1 modules? If not, what software or hardware features should we modify to use those modules, as well?

So, any opinion, suggestions or reference to well proven methods and algorithms are greatly appreciated.

I hope·that you will not find any bugs in the published objects. But these (sometime·camouflage themselves as features) certainly exist everywhere in the digital space. So let me know immediately if you happened to find one.

Thanks.

Comments

  • BaggersBaggers Posts: 3,019
    edited 2009-02-22 11:27
    cessnapilot, GPS vendors like to keep their maps and data structures closed, so that others can't profit from their hard work and money, as buying the rights to use the maps is expensive, I know, because in around 2003 I reverse engineered the add on pack for M$ Flight Sim 2002 VFR add on pack for the UK, which had textures covering the whole of England and Wales at 5meters per pixel, I did this, because I too had flown a cessna as my wife bought me a flying lesson for my birthday [noparse]:D[/noparse] and I thought what a GREAT addition it would be to a plane to have the aerial photography so that when you're flying in cloud or fog, or even without that, you could have a good idea of landmarks around, so I worked out the file name format to location [noparse]:D[/noparse] and also worked out how the files image was compressed. and had it render on Pocket PC with GPS in 3D, I even grabbed some (low-res) height map data from NASA's sites. to add height to the mountains etc. looked great on Pocket PC, I also managed to squeeze the data down further to fit onto a 4GB card [noparse]:D[/noparse] I then approached GetMapping ( who owned the textures, asking if they were interested in my app for others. but they we're just interested in selling their data, not in buying my app, ( which would sell their data ) and yes, this was pre-google maps [noparse]:D[/noparse]
    I also did one for mapping long haul flights, had the whole world map, but at low res obviously to cover the world, lol but still large though LOTS and LOTS of big images [noparse]:D[/noparse]
    anyway, I was thinking about revisiting this for propII when it comes out [noparse]:)[/noparse] as that will have enough ram for 4 joining images in memory at once.
    I don't have an oled display, maybe I should get one and see what I can come up with with a Prop 1 + gps + sd + oled [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • cessnapilotcessnapilot Posts: 182
    edited 2009-02-22 20:10
    Baggers,

    I·do not really expect open source digital maps laying around, I am not so naive, but it is no harm in asking. The pocket PC application you made must be a very good one. I·put up·a much simpler PC program to display position on a scanned map reading real time GPS data. That ran on a notebook. You know, it is easy to make (and that is OK!) fancy PC applications using those millions of engineering hours experience and software background that accumulated in the Linux/Windows realm. For me, the·challenge was to make an embedded application that does not hang (always) on a PC to·do useful and practical things. With the arrival of the Propeller chip, and the SPIN + PASM, you can solve many tasks so economically, that were hardly imaginable before that without a PC or without much more expensive hardware.

    OLED·displays are easy to use, they have an almost 180 deg viewing angle, they do not need backlighting and they have nice 64K colors. You can even see their picture in sunshine. The uOLED-128-GMD1 can adapt a 2G SD card. On that card all areal sector maps or road maps of Europe can be stored conveniently with high graphic quality. Of ourse not in· 5m/pixel but you can have crystal clear and sharp map images at 16-32 pixel/km, and you can display them as you like. You can 'add' vector graphic objects to the map images to make·special applications. The·Propeller can check your relative position to those objects and areas and can inform, guide or warn you.

    So, do not wait for Prop II with that, you can make it with Prop I. And when Prop II arrives it will be·quicker to boost up a working solution.·····
  • RaymanRayman Posts: 14,877
    edited 2009-02-22 21:47
    I think just showing a section of a bitmap format map file from an SD card and overlaying one's GPS position is very doable... I'm working on a Propeller controlled 2.4" TFT module that should make that very easy...
  • BaggersBaggers Posts: 3,019
    edited 2009-02-22 23:23
    Yes Thanks cessna [noparse]:D[/noparse]
    and Rayman, looking forward to that board [noparse]:D[/noparse] lol

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • rjo_rjo_ Posts: 1,825
    edited 2009-02-23 00:00
    if you google... free open source maps... you get all kinds of stuff.
    So, I'm not so sure that this stuff isn't available now... but even if it isn't, I would expect it to be available in the future... look again in about 30 days[noparse]:)[/noparse]
  • ianwianw Posts: 32
    edited 2009-02-23 05:29
    Hi, just wanted to say I think this object is very neat, and will be helpful for me. I hope to use it on one of the larger 2.8" displays w/ touch - but I am still waiting on my display to arrive. From what I've heard, proper shutdown is the biggest gotcha when working with these displays. I'd like to use it as part of the remote controller for a small hovering UAV platform I will hopefully have running one day. Besides displaying basic data and statistics from the UAV on the OLED, it would be very cool to have a GPS overlay. I found your Kalman objects very easy to understand and well commented too - I hope to try a particle filter once I have everything running. I am just getting started with the Prop and microcontrollers, so your examples along with several others in the obex have been great for learning.

    With regard to open map data, these are some widely known public datasets:
    * Landsat 7 satellite imagery
    * Prototype Global Shorelines (PGS)
    * TIGER data of the United States

    Open street map aggregates many of these sources and is a royalty free alternative licensed under Creative Commons and regularly updated by many as part of a open community, several examples of people using this dataset can be seen via browser in openlayers. Depending on where you are located, some of the data for OSM is very good. It would probably be easy to use the "REST" like interface provided by the various map servers hosting data and receive tiles back in any number of image formats suitable for the OLED application (image file types, and mapped to different geodetic/projection standards - e.g. WGS84).

    Some example tiles hosted at wikipedia:
    http://upload.wikimedia.org/wikipedia/commons/f/f2/Cambridge-Openstreetmap-08-06-13.svg
    http://upload.wikimedia.org/wikipedia/commons/f/f7/Soho_-_map_1.png


    And if you're feeling naughtier you can simply use the tile cache from Google earth, etc. - Paparazzi (open source UAV) and other UAV groundstations are using this approach. If you're not doing anything commercial (the bin I fall into), then there shouldn't be any problems.

    Of course, with diy hovering UAV's and other imagery platforms tied to the lowering cost of INU's, it is likely not too far off that open aerial imagery datasets could surpass (resolution and refresh rate) of the offerings from Google and other big companies.

    Anyway, I look forward to your updates, and hopefully trying your code in my application. Thanks

    Post Edited (ianw) : 2/23/2009 5:50:09 AM GMT
  • cessnapilotcessnapilot Posts: 182
    edited 2009-02-24 12:02
    ianw:

    Thanks for the lot of source of map information. I will need some weeks to reach and try and absorb them.

    I make shutdown when my program under development hangs up in two ways. The software way is to compile and send to EEPROM a small 'shutdown.spin' application. Of course, this can help only when the proper communication between the uOLED and the Prop has been established already. If this is not the case then I ground the reset pin of the uOLED manually and remove power while the display is dimm. Not the recommended proper shutdown, but maybe it is better than just to remove the power. In a final application I shall use an electronic switch-on/off method and a (backup) battery package (6x1.2V accus) with a mechanical lock on the battery compartment with warnings.

    I am glad that you find my objects useful. They are deliberately planned and thoroughly tested to be correct, user friendly and easy to understand and maintain. I have got many e-mails to confirm myself in that. I am not a guru to make cryptic code, anyway. I am progressing toward a challenging Flight Simulator and professional 6DOF IMU/GPS/Magnetometer sensor fusion application. This present GPS stuff (thanks to shanghai_fool) devoted my attention from the almost ready (90%) Propeller Fligth Simulator. That simulator works with 2 Props and with 2 FPUs, and uses a correct 6DOF aerodynamic aircraft model (c172 of course, but SAD DAT can be changed to simulate an F-4 or whatever) with full WGS84 formalism. It comes with 3D vector screenery graphics on a TV, 3-10 frames/second in a situation adapting manner, keyboard control and correct SAD aerodynamics. I hope to publish it soon. That is physical simulation and real time 3D graphics. However, it can be useful for an UAV if you make a vehicle model based Kalman filter. These filters are among the bests. The 6DOF IMU/GPS sensor fusion code could be useful, too.

    Thanks again.
Sign In or Register to comment.