Converting (N 48° 31' 28.79") to number values for VELatLong

Latitude:N 48° 31' 28.79"
Longitude:W 123° 9' 26.96"

If I have latitude and longitude such as the above coordinates, what do I pass into the VELatLong constructor for this?

[386 byte] By [ajma] at [2008-3-6]
# 1

Go here for a conversion utility.
http://www.fcc.gov/mb/audio/bickel/DDDMMSS-decimal.html

The math is pretty straightforward.
Divide the number of seconds by 60, 28.79 ÷ 60 = 0.5166.
Add the result to the number of minutes, 31 + .47983.
Divide the result by 60, 31.47983 ÷ 60 = 0.52466383.
Now add that to the number degrees, 48 + .52466383.
The result is 48.52466383°

Do the same with the longitude, and then you can pass them into the constructor.

Paul

Blaser at 2007-8-30 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...

Windows Live Developer Forums

Site Classified