Read realtime GPS coordinates from built in receiver

usef

Active Member
Joined
Jul 31, 2007
Messages
268
Hello,

i have a built in gps receiver into my laptop. what i am looking for is to simply click a button which will give me the x and y, with current speed if possible. and input to cell a1, b1, c1

im using excel 2007, and window xp pro.

tia
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Shouldn't be too difficult, the gps will probably communicate via a com post using an NMEA protocol - but to be sure, what info can you give us about the hardware setup, or give us a link to the hardware on the interweb.
 
Upvote 0
One answer, and it's probably not the slickest but should be fairly robust when complete. You'll need to follow instructions here

After starting to reply I created a file for you here where I have got to the stage at the end of the article, but haven't made any changes suggested by the comments, you can download that file.

Follow the article - the file won't just work - yet. Read through the comments.

You probably don't need the Write button at all.
I've added a line of code to show in a message box what's been read from the device (when the Read button is clicked).
I haven't/can't test it at all.
You're going to have to tweak it a bit:
Find the com port used as suggested in the first link you supplied under: How do I determine which COM port my GPS is installed on?

I hope Hyperterminal is on Xp Pro.

Then I've added the comment:

'adjust

in several places, search for that in the code and replace the 1 for the com port you determined your gps is attached to above.
Then there'll be a few more tweaks, such as extracting location data and speed from the data obtained, perhaps changing the communication settings (speed etc.).
Bear in mind the comments and alteration/correctionss to the code people suggest. Not all will apply to you. Later we'll be able to ditch some or all of the buttons the article added, but they'll be useful to check things are right during the building of your project. At the end I expect you'll have an excel file which should 'just work' on any similar machine when you open it.
I don't know how proficient you are with Excel and macros, so rather than laboriously type out instructions for Excel 2007, I'll let you get on with it and suggest you post back when you run into problems.

It's after midnight in the UK so I'm signing off now. zzzzs required.
 
Last edited:
Upvote 0
Thanks for your help, so far the file isnt working as expected yet.

but i am sure that the gps receiver uses comport 3

i have changed 1 to 3 and i get weird text such as when clicking read.
ک€`x` or وxxّ††xxxà†f† or x† or `x`, xxوx†

im sure its reading gps data but not displaying in correct format. i dont know how to do anymore tweeks.

did i miss anything??
 
Last edited:
Upvote 0
This looks good. A bit of trial and error first; in the part of the code for button 1_click (open), try changing the:
lngStatus = CommOpen(intPortID, "COM" & CStr(intPortID), "baud=9600 parity=N data=8 stop=1")
to:
lngStatus = CommOpen(intPortID, "COM" & CStr(intPortID), "baud=4800 parity=N data=8 stop=1")

then if you haven't already, click Close. Then click Open then Read.

Do you have TeamViewer (google it if you don't know what it is) and would you be prepared to use it with me?
If so are you on Live Messenger or Skype?
 
Upvote 0
You are amazing !!! Now I got lots of data, I really can't understand it all but I will try to reply again with sample as I ran out of battery and using my iPhone.

I'm sure we would be able to extract the long and lat and speed into three separate cells. And get rid of the extra code. It would also be great to combine all buttons to one because if I forget to close the port excel shuts down n a blink of an eye!

Your assistant is highly appreciated especially by offering remote support. Teamviewer is fine with me.

Please advise what's next
 
Upvote 0
results:

$GPGGA,192716.583,2425.0666,N,05435.0278,E,0,03,50.0,-1.9,M,-28.2,M,0.0,0000*4C
$GPGSA,A,1,22,14,18,,,,,,,,,,50.0,50.0,50.0*09
$GPRMC,192716.583,V,2425.0666,N,05435.0278,E,0.0,0.00,200911,,,N*44
$GPVTG,0.00,T,,M,0.0,N,0.0,K,N*32
$GPGGA,192717.583,2425.0

i added one line

Range("a1") = strData
 
Upvote 0
i tried send you a private msg, but over quta... my tv is ready for incomming connection
 
Upvote 0

Forum statistics

Threads
1,224,595
Messages
6,179,798
Members
452,943
Latest member
Newbie4296

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top