Results 1 to 23 of 23

Thread: Position on Map - GPS

  1. #1

    Thread Starter
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429

    Position on Map - GPS

    Hey guys,

    I have successfully interfaced to my GPS, and extracting Lat/Long etc.

    My next phase is to introduce a scanned .bmp Map into the app.

    I'm seeking anyones advice who may have done this or has any
    words of wisdom.

    I'm anticipating palcing the .bmp into a picture control. The size
    of which is determined by the scan size of the .bmp.
    This area (of the .bmp) will consist of (screen) co-ordinates like,
    (0,0) for top Left, (0, ?) for top Right, (?,0) for bottom Left, and
    (?,?) for bottom right.

    Then I can 'set (calibrate)' the position of say (0,0) to a known
    Lat/Long position (read from the Map), and do the same with at
    least 2 other co-ordinates.


    Cheers,
    Bruce.

  2. #2
    Hyperactive Member
    Join Date
    May 2002
    Location
    Wisconsin, USA
    Posts
    279
    I think that you would have to have point on the map that are actual coordinates and then do some math to figure where on the map the coordinates from the GPS are.
    That would probably work better.

  3. #3

    Thread Starter
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429
    Originally posted by crpietschmann
    I think that you would have to have point on the map that are actual coordinates and then do some math to figure where on the map the coordinates from the GPS are.
    That would probably work better.
    yep, thems what I'm thinking

  4. #4
    Frenzied Member ae_jester's Avatar
    Join Date
    Jun 2001
    Location
    Kitchener Ontario Canada Earth
    Posts
    1,545
    Is this for a wireless handheld device? Cuz I'm going to be creating something very similar over the coming months.

  5. #5

    Thread Starter
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429
    Originally posted by ae_jester
    Is this for a wireless handheld device? Cuz I'm going to be creating something very similar over the coming months.
    Possibly.

    I'm just putting something together for my laptop, then
    get into Windows CE (iPAQ) embedded Visual Basic.
    I'ts comming together well, the inteface to the Magellan was
    simple.... Once I placed the bloody thing in the right NMEA mode

    It outputs contiuous streams of NMEA Sentances. No need for
    handsaking


    There are Comercial apps out there for iPAQ etc an PC's. However, I dont need all the overhead etc that comes with those
    apps.

  6. #6
    Hyperactive Member
    Join Date
    Jan 2002
    Posts
    321
    sorry but i will not offer any help as i dunno what you guys are talking about. but bruce, your program sounds interesting.. any pointers for me on the project you're working on?? how do you interface with GPS? i haven't got the slightest clue

  7. #7

    Thread Starter
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429
    Originally posted by ongtw
    bruce, your program sounds interesting.. any pointers for me on the project you're working on?? how do you interface with GPS? i haven't got the slightest clue
    I am using the MSCOMM (that comes with VB6).

    Connect ur GPS via RS-232 Serial cable to ur PC, open the apropriate
    port (using MSCOMM), and wamo - ur done

    With the GPS I have, u can send / receive Waypoint, Track data
    etc. This is done with no NMEA mode (on the GPS) selected.
    However, I'm using the GPS in a NMEA Mode that provides a
    continuos stream of (serial) data. I'll split up that data stream
    into Lat/Long (and UTC) components, and display a cursor
    on a map at that location

  8. #8

    Thread Starter
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429
    Ok, making progress, however before I get to far with the math
    calcs, what (if any) settings should I use. ie

    a. Twips v pixels, (maybe pixels for future API use?)
    b. Scale Modes

    Anything like that.

    Cheers,
    Bruce.

  9. #9
    Member
    Join Date
    Aug 2001
    Location
    Washington DC
    Posts
    63
    I have all this code written already...I don't have it now, but will post later today. Or contact me view email [email protected]

    I have a program which plots data on a bmp. It uses an error correcting algorithm which I designed to correct for coordinate systems that aren't exactly square. (Like on satellite imagery)
    Works very well. I have used this program to plot data in real time while I was driving. I have also used this program to plot previously recorded data.

    I also have created an OCX control which connects to GPS units through comm port. Simply drop onto your form! The sentenceArrival event is raised when new data has arrived. You can read the sentence as it arrived, or access individual fields such as lat, long, speed, heading, etc.

    Still somewhat under construction, but it could save you lots of time. It is functional, but support for some NMEA and Garmin sentences is not yet implemented, such as satellites in view, and waypoint stuff.

    Sorry I can't post the code now...I'm at work.

  10. #10
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Pixels pixels pixels all the way
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  11. #11
    Member
    Join Date
    Aug 2001
    Location
    Washington DC
    Posts
    63

    GPS Mapping Util

    This software is functional, but by no means finished.
    It should give you all the stuff you need. I'm going to start a new version soon. (I didn't finish this one because I decided to change the architecture)

    Code is attached. Also, the executable should run with the attached image, data file, and configuration file. Unzip to a folder and run the executable, then select Plot Trip from Tools menu, select the .gps file and watch!

    Download here

  12. #12
    Member
    Join Date
    Aug 2001
    Location
    Washington DC
    Posts
    63

    GPS OCX Control

    Here's the OCX control that I created.
    As I said before, support for some NMEA and Garmin sentences has not yet been implemented.

    This thing is cool, cuz you can just add it to your project, and all the sentence parsing etc. is already done!!

    download here


    I've seen something similar to this going for $150 on the net!!!!

    Please give feedback!
    Enjoy

  13. #13

    Thread Starter
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429
    crpietschmann, Jamie and lerouxc1,
    Thanks for you comments.

    lerouxc1 I'll definitly have a good look at those examples/codes.
    Thanks for that

    I have just about finished, I'm implimenting Lat/Long conversion
    to get all values to one type (ie decimal nautical miles), to enable
    positioning data etc.

    Thanks again lerouxc1 - I'll post feedback


    Cheers,
    Bruce.

  14. #14
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Originally posted by Bruce Fox
    crpietschmann, Jamie and lerouxc1,
    Thanks for you comments.

    lerouxc1 I'll definitly have a good look at those examples/codes.
    Thanks for that

    I have just about finished, I'm implimenting Lat/Long conversion
    to get all values to one type (ie decimal nautical miles), to enable
    positioning data etc.

    Thanks again lerouxc1 - I'll post feedback


    Cheers,
    Bruce.
    ]

    This sounds pretty damn cool man!
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  15. #15
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: Position on Map - GPS

    I was doing this recently but I went for the whole handshaking protocol. The handshaking for a Garmin GPS device is a complete nightmare. Talk about overkill.

    Anyway I might just try the one-way text output like bruce did. First thing I'll do is create an onscreen realtime compass on my laptop, fullscreen!! I'll be doing it in VB.Net though.
    I don't live here any more.

  16. #16
    Hyperactive Member
    Join Date
    Apr 2001
    Location
    N42 29.340 W71 53.215
    Posts
    422

    Re: Position on Map - GPS

    I would think scale mode would make life much easier.
    Couldn't you set the scale to approximate lat/lon coords?

    Just might have to convert degrees,minutes,seconds into a real number,
    e.g. 50 30 00 = 50.5

    Sounds like fun, DaveBo (I have both Garmin & Magellan handhelds)
    "The wise man doesn't know all the answers, but he knows where to find them."
    VBForums is one place, but for the really important stuff ... here's a clue 1Tim3:15

  17. #17

    Thread Starter
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429

    Re: Position on Map - GPS

    Wow, this is old...

    Annyways, It has been extreamly successful. I scan a chart, calibrate it (3 points) and store the calibration data at the head of the scanned image jpg and save that as a custom file type. Later, when the chart is selected for loading I strip off the calibration data and then I am left with the jpg image data which gets loaded into a picturebox. As the mouse moves over the chart, the Lat/Long values are displayed in a statusbar.

    Parsing the NMEA was simple enough, then it was just a matter of converting that data.

    My GPS data then provides point track info to move a symbol (aircraft) over the charrt as required.




    Bruce.

  18. #18

    Thread Starter
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429

    Re: Position on Map - GPS

    Quote Originally Posted by wossname
    Anyway I might just try the one-way text output like bruce did.
    Yeh, for this type of application it makes sense. On the other hand, if your developing a desktop 'waypoint'/'route planner' you would need to go both ways.




    Bruce.

  19. #19
    New Member
    Join Date
    May 2006
    Posts
    3

    Question Re: Position on Map - GPS URGENT!!!!!

    !!Urgent...Urgent...Urgent...Urgent...Urgent...Urgent...

    Hi Guys,
    The software downloads posted by lerouxc1 above are not working (his email as well)...
    Can someone send them to me please. I need help in building my GPS tracking application...

    Many thanks....
    Kaddour


  20. #20

    Thread Starter
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429

    Re: Position on Map - GPS

    What parts do you need?

    I don't have his ocx anymore, but what I wrote at the time I have tucked away somewhere.

  21. #21
    New Member
    Join Date
    May 2006
    Posts
    3

    Re: Position on Map - GPS

    Thanks Bruce Fox for your reply.
    I need the mapping bit, please - thanks - Kad

  22. #22
    New Member
    Join Date
    Oct 2006
    Posts
    6

    Re: Position on Map - GPS

    Hello,"Bruce Fox" please upload the files of "lerouxc1" again
    i need them plz

  23. #23

    Thread Starter
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429

    Re: Position on Map - GPS

    Quote Originally Posted by h_1985
    Hello,"Bruce Fox" please upload the files of "lerouxc1" again
    i need them plz
    Like I said, I don't have them anymore.

    I had completly written my app from scratch and it worked quite well.
    It was a long time ago.....

    I had described how I did it at the time, and it functioned as expected.
    Once I loaded the scanned Map, I then calibrated it at three points.
    The calibration data was stored in the first 100 bytes of a file that also contained the bitmap Map (this is the Calibrated Map).
    When loaded, the first 100 bytes were read and held as calibration data, the remaining bytes were the bitmap which was extracted to a temp file prior to loading
    into the PictureBox.


    Bruce.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width