Announcement

Collapse
No announcement yet.

Working on a small GPS program

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Working on a small GPS program

    I started this a few days ago when I got my mouse GPS, so its alittle incomplete, but it works. I live in australia so at the moment thats the only location it really works in (With small modifications it could work else where). I am just using some maps joined together from whereis.com.au

    The map is a .gif and I made it load using an ini file to setup 2 points of references.

    If there is some interest I could probably upload the source code. I built it using 2 basic classes, so the code could easily be put into another project as a basic guide. Its currently written in vb, but I was thinking of porting it to c++ some time.

    Here are some screenshots.

    In the car park at uni:


    Driving along the highway:


    Crossing the ever famous Nepean river:


    Cruising again:


    The "short cut" to uni... dont ask:


    It only has basic functionality, updates the map position according to the gps position, you can zoom in and out etc.

    The velocity speeds are very wrong, I was only playing around with some of that code. So I still got to fix that.

    Comments / suggestions?

  • #2
    That's really awesome.
    My Install Thread
    digitaljetta.com

    MKIV VW Jetta
    How do I get sound to my car?

    Comment


    • #3
      Originally posted by Hellcat
      I started this a few days ago when I got my mouse GPS, so its alittle incomplete, but it works. I live in australia so at the moment thats the only location it really works in (With small modifications it could work else where). I am just using some maps joined together from whereis.com.au

      The map is a .gif and I made it load using an ini file to setup 2 points of references.

      If there is some interest I could probably upload the source code. I built it using 2 basic classes, so the code could easily be put into another project as a basic guide. Its currently written in vb, but I was thinking of porting it to c++ some time.

      Here are some screenshots.

      ...Comments / suggestions?

      wow, it's been a long time since my last post!

      i reckon you'll gonna make a lot of aussies happy here (if not some)...

      there has been some discussions about gps apps from the distant past in this forum, let me give you those links:

      http://www.mp3car.com/vbulletin/show...hlight=GPS+QLD

      and maybe:
      http://www.mp3car.com/vbulletin/show...hlight=GPS+QLD

      ..GPSS (the one i used) does exactly what you are trying to achive, plus some more. the problem with it is that "extra features", i mean in a carputer setup with a small screen, you will only need the very basic information such as the moving map, speed, long/lat, and some few, the rest of your attention should be on the road. plus GPSS talk too much, and interface is the worst i've ever seen (sorry i have to be honest) text info are too small.

      could i have the source code first before you port it to c++? if this can be integrated in mediacar, it's gonna be a killer app!

      very, very, very, good work mate.


      danon
      [....99.9%]
      [HW] 566eMHz/128mb/6gb, FlyVideo3k, RandMgps, M1-ATX, 7" Lilliput, VGA2AVadptrFor2ndVideo, 4CH/100rms, 10"Sub, 40AhDeepCycleTank
      [....99.8%]
      [SW] XP/MMC/FP:D3,FlyTV/AxifeFM,CarMM?
      [Working on] puttingBackEvrythg.

      Comment


      • #4
        nice work.. im an aussi too.

        can u put in a destination for it to guide u to?
        View My Blog


        Click for 2GB FREE on-line storage!

        Comment


        • #5
          Thanks for the feedback.

          I will probably finish the vb version before I port it to c++ so then I can ensure that its as close as I can get to optimised. So no worries, I will make it abit more user friendly (different ports etc for GPS, atm its hard coded) and release a version for people to play with.

          Originally posted by djmickyg
          can u put in a destination for it to guide u to?
          I want to make this a feature, adding nearest hospital, police station, path optimisation etc but this involves alot of boring stuff such as mapping out names to points on the map. So I am really just delaying it, fun stuff now.

          Comment


          • #6
            Okay, I havnt done much (or anything) since my last post. But I have uploaded the source code / exe for you guys to check out. Because you may live in another area other than australia bits will need modifying, I dont have time to do that right now. (or effort )

            First up here is the download:
            http://www.cit.uws.edu.au/~npurdy/cbGPS.zip

            To setup the GPS options open the ini file called "gpsConfig.ini" in your base directory. In there it will have the commport, and your unit of measurement. Even if you are using a usb mouse gps it will be mapped to a virtual comm port.

            The map is also only of my area, so to test it you will need a basic map of your area. To set it up go into the maps directory, and open the ini file. I will describe modifying it soon.

            To open a map you point your class call:
            classhere.createMap(picRendMap, App.Path & "\map\ini file")

            The picRendMap is the name of the picture box you wish to render the map into. This is all contained within the project, I just wanted to show how you can open different maps on the fly.

            In the map ini file there are several values. The first is the name of the map file. I recommend using .gif because they are small for the quality, but each to their own.

            Now to be able to tell your position on the map, we need to setup two reference points, and the pixels that they corrospond to on the image file. I recommend driving to 2 locations that are a long distance apart and both on your map, and writing down the GPS co-ordinates. Using something such as an intersection will make it easier to find the point on the map. The further apart your distances the greater your accuracy. But some poeple cant do that, so failing that you could probably find co-ordinates using google and match them to a map.

            Once you have your 2 points, find the locations on the image of the map. Using a paint program such as paint shop pro (you can download an evalution copy) move your mouse to the point 1 on the map. Copy down the X and Y values. The x value becomes your "pixil1Long" value, and the y value becomes your "pixil1Lat" value.

            Do the same with the 2nd reference point.

            You will also need to setup the map width and height in the ini file. This will be fixed soon so it will calculate it without you soon.

            Now test run it, if something is wrong then either
            a) It doesnt have support for other countries yet, implementing is easy, its just I havnt had time yet.

            b) There is an unknown bug (pretty unlikely, but possible!)

            c) You messed up something in the map ini file or gpsConfig.ini

            Good luck with it, hopefully soon I will get some more time with it and add some real features.

            Comments / suggestions?

            Comment


            • #7
              can it be ported easily to linux?
              Signature: [==||========] 20% complete

              Comment


              • #8
                Nice App Dude,

                I understand the principle on how to convert lat/long to pixels on a map, however dont know how to do it if that makes sense.

                Could you possibly explain this?

                i would have a look at your source but dont have VB.

                cheers
                nash

                Comment


                • #9
                  @Hellcat: keep going on it... there are a lot of us who want a decent gps solution for OZ without the huge price tag
                  Never let the truth get in the way of a good story

                  Comment


                  • #10
                    i think i might have a friend that goes to your uni. he has a similar short cut by the looks of it.....
                    AMD XP 2000+ 512Mb Ram MB:A-7VM400AM-RZ
                    Zenarc 700TSV Netgear USB WiFi GPS Opus 150
                    Running Win XP, FP, MM

                    Comment


                    • #11
                      You know, since you are writing it yourself, it would be easy to add in the dead-reckoning stuff being discussed in another thread. At it's simplest level you basically 'pretend' that the GPS signal is still there when it has actually dropped out.

                      You could implement it quite easily by just taking the last known direction/velocity, and 'continuing' along that line, until GPS signal is re-acquired.

                      Or if you want to go all out, you could add support for a compass input, and a vehicle speed input (it makes sense when you read the other thread)...

                      Comment


                      • #12
                        @Hellcat and others interested aussies
                        It seems you have made some progress on that app. Sorry i haven't replied to your PM but i've been in Canada the last month and haven't had the time.

                        You are in a similar position that I was a few months ago before I got to the point where I realised I need a source for the map data. Now I had obtained an older copy of the UBD map cd but for some strange reason (missus in a tantrum) that cd was KIA. It would appear that WhereIS and UBD have collaborated and released a map CD/DVD for propriortary In-Car navigation systems.

                        The key would be to utilise this existing data on these CD's, which also include turn by turn databases as well. I would be glad to assist you in developing this further but to move forward these maps ideally would need to be obtained.

                        Thoughts...
                        Caputer Mk. II
                        '02 VX Holden Commodore Series II Executive
                        MII12000, 512MB RAM, 60GB HDD (5400rpm), 16X DVD, TS200V
                        Morex 60W DC-DC, Custom S/SDC
                        OS/Software: Developing...

                        Comment


                        • #13
                          Originally posted by Hellcat
                          I want to make this a feature, adding nearest hospital, police station, path optimisation etc but this involves alot of boring stuff such as mapping out names to points on the map. So I am really just delaying it, fun stuff now.
                          This is actually the hardest part of what you are trying to do. I was considering doing a similar thing a while ago with MapBlast.com here in the U.S., but the problem is that you need a database of POIs that tells you the coordinates for a particular place of interest. With just the maps you download, its easy to plot where you are, but it is not at all useful for finding a destination point or planning a route. Also, since all you have to work with is a bitmap, it is a difficult task to identify path segments and impossible to identify things like one-way roads, or "no-left turn" signs. Also, it would require some tricky image processing code to associate labels with roads and differentiate a point that is "on" a road from a point that is "off" a road.

                          Having said all that, it would still be great to see you tackle these problems and produce something that works... especially for us Linux guys that are without decent GPS software.
                          1994 RX-7, EPIA P4-ITX w/ Celeron 2.4 Ghz, Arise PSU, Xenarc 700TSV (new model)

                          Comment


                          • #14
                            Originally posted by NoPistonPC
                            This is actually the hardest part of what you are trying to do.
                            Here, here ... To date there has been no reliable source for us Aussies, everything is available either for Europe or North America. There is one possible solution for this POI database and i'm currently in the negotiation process of obtaining specifications for the format it's stored in. If everything goes to plan it won't be long before a open source GPS solution for the Aussies on both Windows and Linux.

                            Fingers crossed
                            Caputer Mk. II
                            '02 VX Holden Commodore Series II Executive
                            MII12000, 512MB RAM, 60GB HDD (5400rpm), 16X DVD, TS200V
                            Morex 60W DC-DC, Custom S/SDC
                            OS/Software: Developing...

                            Comment


                            • #15
                              Is it at all possible to use the map data from Destinator or Navigator? Since both of these have the vector map data needed to do routing, as well as POI etc.

                              Not sure if its possible to extract the data from the map files though - might be difficult, but probably easier (and quicker) than trying to enter the data manually?

                              Comment

                              Working...
                              X