I have a gps module that gives me latitude in longitude in a weird format.
DDDMM.MMMM
As written on user manual, Degrees*100 + Minutes.
As far as I know, It is degrees minutes seconds, and seconds is between 0-59, above than this will increment the minute. But this is giving minutes in decimal places. Does this means 1/1000th of a minute?
eg. 07717.3644 E
077 --> degrees
17 --> minutes
3644 --> ?
E --> Direction
Also how will I convert it to decimal, I am using the formula
decimal = degrees + minutes/60 + seconds/3600.
1 minute = 60 seconds, so .3644 minutes = .3644 * 60 = 21.86 seconds.
The value is not a number but a string of degrees and minutes concatenated. You need to be careful because it is likely that latitude values only have two degree digits (i.e. DDMM.MMMM), so if you use string handling to separate the values, you's have to account for that . However both long and lat can be handled numerically as follows:
You might also pass the hemisphere character E/W or N/S to this function and use it to determine an appropriate +/- sign if required.
To convert this to the decimal format, we start by keeping the DD portion and simply divide the MM.MMM by 60 to firm the MMM portion of the decimal format.
In your case
See this Link Would help you
Follow the algorithm to convert the same.
Simple implementation in Python:
Replace latitude and logitude.