Creating .ini file from excel using vba for gps co-ordinates

aniketjha21

New Member
Joined
May 13, 2016
Messages
5
Hi Guys,

i need help in creating an ini file for GPS co-ordinates ($GPRMC format).
Currently in excel i have latitude and longitude below is the attachement:

552003d1513251759-creating-ini-file-from-excel-using-vba-for-gps-co-ordinates-lat-lon.jpg
---- excel file

but need to create an .ini file in the format below:


[GPS Coords]
Coord1=$GPRMC,123519,A,1259.25378,N,7744.20074,E,022.4,084.4,230394,003.1,W*5D
Coord2=$GPRMC,123519,A,1259.2551,N,7744.13588,E,022.4,084.4,230394,003.1,W*63
Coord3=$GPRMC,123519,A,1259.26152,N,7744.13408,E,022.4,084.4,230394,003.1,W*5B
Coord4=$GPRMC,123519,A,1259.2593,N,7744.22726,E,022.4,084.4,230394,003.1,W*69

And in the calculate the checksum which is 5D, 63,5B,69 in examples above.


Pls help me creating vba script for above.

Thanks
Aniket
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Cross-posted here: https://www.excelforum.com/excel-pr...rom-excel-using-vba-for-gps-co-ordinates.html

While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules). This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 
Upvote 0
Maybe getting blocked by your security?
 
Upvote 0
Got it sorted, it was weird but sorted. An add-on for ad block for YouTube somehow affected this site.
 
Upvote 0
What part of the data is included in the output file, nothing seems to match your sample, also do those checksum amounts just cycle through every line or how are they generated?

But as best I can figure is the highlighted sections what is coming from the 2 columns?

Coord1=$GPRMC,123519,A,1259.25378,N,7744.20074,E,022.4,084.4,230394,003.1,W*5D
 
Upvote 0
What part of the data is included in the output file, nothing seems to match your sample, also do those checksum amounts just cycle through every line or how are they generated?

But as best I can figure is the highlighted sections what is coming from the 2 columns?

Coord1=$GPRMC,123519,A,1259.25378,N,7744.20074,E,022.4,084.4,230394,003.1,W*5D




Sorry for the incovenience , as you pointed out correctly in bold.
I have the excel which has latitude and longitude (attached), and after getting that information from excel populate it in format as Coord1=$GPRMC,123519,A,1259.25378,N,7744.20074,E,022.4,084.4,230394,003.1,W*5D in ini file.

Since i have the list of almost 300 co-ordinates, i have to form an ini file which contains GPRMC data (shown above the sample).

Also, need to calculate the checksum to form a complete message as latitude/longitude differs, below are the details:
[FONT=&quot]RMC - NMEA has its own version of essential gps pvt (position, velocity, time) data. It is called RMC, The Recommended Minimum, which will look similar to:[/FONT]
$GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A

Where:
RMC Recommended Minimum sentence C
123519 Fix taken at 12:35:19 UTC
A Status A=active or V=Void.
4807.038,N Latitude 48 deg 07.038' N
01131.000,E Longitude 11 deg 31.000' E
022.4 Speed over the ground in knots
084.4 Track angle in degrees True
230394 Date - 23rd of March 1994
003.1,W Magnetic Variation
*6A The checksum data, always begins with *

last string is checksum which needs to be calculate, and thus populate in message to form a complete message.
Here is the link for calculating checksum : https://stackoverflow.com/questions/32076761/nmea-checksum-calculation-calculation

Thanks
 
Upvote 0
I am not able to find a way to attach my excel, i can see only image option.

Pls let mw know on how to attach the same.

Regards
Aniket
 
Upvote 0

Forum statistics

Threads
1,215,045
Messages
6,122,830
Members
449,096
Latest member
Erald

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