Daniel Minnaar
Daniel Minnaar

Reputation: 6295

GPS Co-ordinates conversion

I'm trying to find out the formula to convert the following GPS location format to a decimal degree format used by Google Maps. I've searched around but I can't figure it out.

My current format is ddmm.mmmm, and my value is 2603.3299 S, 02758.0530 E.

1.) What is my current GPS location is decimal degrees? 2.) What is the formula to convert this into decimal degrees?

Thanks a ton! The formula I've seen online puts me somewhere in Egypt, but I'm actually in South Africa. Obviously something is wrong :(

Also, please don't assassinate me at this address. I still have lots to do with my life :(

Upvotes: 2

Views: 2138

Answers (2)

John Dvorak
John Dvorak

Reputation: 27277

The problem is with your data.

2603.3299 S, 02758.0530 E

is missing a delimiter and actually means

26 degrees 03.3299 minutes S, 027 degrees 58.0530 minutes E

Assuming you live in a brick house in a city and not in the middle of a field. In which case, it means

26.033299 S, 027.580530 E

Note that 2603.3299 S, 02758.0530 E doesn't seem to be a standard notation.

Split the last two digits before the decimal point as a minute figure and divide by 60. In javascript:

var split/(^\d+)(\d\d\.\d+$)/.match(x);
return split[1]+split[2]/60;

Upvotes: 1

Howard
Howard

Reputation: 39177

You may shift the decimal point by two places and convert minutes to decimal degrees:

2603.3299 -> 26 + (3.3299 / 60) = 26.0554983

and

2758.0530 -> 27 + (58.0530 / 60) = 27.96755

Upvotes: 6

Related Questions