02-28-2013 09:17 AM
Hi all,
Wondering if you could give me some assistance please. I am fairly new to LabVIEW.
Basically I have been given two seperate VIs, one which acquires NMEA GPS data from my GPS receiver and outputs it in the form, Latitude: ddmm.mmmm and longitude: dddmm.mmmm. The other is a VI which allows input of latitude and longitude in the form required by google maps, which then displays the position on an embedded map.
An example of the nmea data received from my gps receiver is the following: lat: 5227.2143, long: -00155.6721. What I need to do for the latitude is keep the first two digits exactly the same (as the dd part of the output) and then divide the rest of the number by 60 to get it in the form mm.mmmm. So I would get a value of 52.(27.2143/60) which gives 52.45357. The longitude is calculated in a similar way, except that there is an extra digit which is not included in the division due to the fact that it has the format dddmm.mmmm instead of ddmm.mmmm. Therefore the longitude value is -1.92786.
Sorry if I did not explain this well but it is hard to explain. So basically I can calculate it all fine myself, but the problem I am having is finding a way in LabVIEW of taking the specific decimal places from the original numbers and then dividing them by 60 without affecting the characters which I need to leave unchanged, and then to put them back together as a single number with a decimal place in the right place. This can then be put into the google maps search box and the location shown correctly.
Thanks in advance for any advice,
Solved! Go to Solution.
02-28-2013 09:32 AM - edited 02-28-2013 09:32 AM
Something like this?
02-28-2013 09:49 AM
that looks fantastic, thanks very much for your quick response! I will try it out right now.
02-27-2014 07:34 AM
you are simply awesome. I was working on it for a week until I found this solution. 😄 thanks