• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Masters of VBA - please help - USB GPS via Userform

Hello Hui,
Hope all is well with you.
The Spreadsheet you built for me has been very useful and working very well until recently. I started to encounter two problems with received data:

1. if you recall, the code is directly interpolated from "GPGGA" sentences from GPS. But, there are times I will receive two "GPGGA" sentences from one set received data. This resulted two sets of Latitude and Longitude go into excel sheet (M & N columns). But I only need one coordinates at each click.

2. There are also times, there is no" GPGGA" sentences received, but received "GPRMC" sentence. Essentially, they are two very similar GPS data, GPRMC is one character less than GPGGA, but also contains Lat and Long data. Please see an example below:
$GPRMC,020204.7,A,4321.82837,N,07939.83645,W,000.10,275.6,290516,010.6,W,A*32

Would it be possible to capture coordinates from GPRMC when no GPGGA info received?

The other note is that, sometimes, two GPRMC sentences can be received at the same time as well. But again, only one set of coordinate is desired at each click. (I have attached an example in "log" sheet"


I feel bad keeping coming back asking you questions and generous help. It is greatly appreciated for your time and kindness. I trust many many people will benefit from this tool once it is established by your knowledge.

thank you.
 

Attachments

  • Excel Comms 32+64bit.xlsm
    60.7 KB · Views: 8
In item 1 above, What is each click?

Item 2,
So it is ok to get 2 or more GPRMC signals and you want all of them extracted?
But if you get 2 or more GPGGA you only want the first one?

Are both those statements for Item 2 correct?
 
Hello Hui,
Thank you for replying. I plan to build a button to run "open com", at each click of the button, one set of data will be captured form USB GPS and send to "log" sheet, and then interpolate (by your code) a pair of Northing and Easting then sent to column M and N.

For #2, again I wish only one set of "GPRMC" extracted, doesn't matter which one, same applies to "GPGGA" sentences.

Statements in item 2 may not always the same.

There is always GPGGA or GPRMC (or both GPGGA an GPRMC ) data received a each click/run.

The goal is really, at each click/run, one pair of Northing an Easting sent to column M and N.

I very much appreciate your time.
 
Last edited:
Does one click bring in the entire range A1:A31?
Do you need one set of coords out of each cell?
 
Hi Hui,
No. Each click only brinsg one set of data in each cell. I clicked 31 times to show you what kind of data I am receiving. I also want to note that each click cell A1 will be replaced with new data. You helped me to code that already in my working sheet. The attached is an example.

At each click, cell A1 is refreshed with new data, and then a new set coords is extracted and sent to column M and N next blank cells.

Thank you Hui, please let me if I clearly explained to you.
 
Last edited:
Pls see how this is?
I have shown the output for the 31 samples below the old Red Data
 

Attachments

  • Excel Comms 32+64bit.xlsm
    61.8 KB · Views: 30
Hi Hui,
Just want to say a big thank you to you. The code has been testing for 2 weeks now. It is working flawlessly. Thank you so much for your time and I am certain a lot people will benefit from your knowledge when they search this kind tool. You are awesome!
 
  • Like
Reactions: Hui
Back
Top