Below is what I found about it but I did not get the expecetd values from the information.

[quote]Conversion from DMS to Decimal Degree

Given a DMS (Degrees, Minutes, Seconds) coordinate such as W079°58?56?, convert it to a number of decimal degrees using the following method:

```
Calculate the total number of seconds:
58?56? = (58*60 + 56) = 3536 seconds.
The fractional part is the total number of seconds divided by 3600:
3536 / 3600 = ~0.982222
Add fractional degrees to whole degrees to produce the final result:
79 + 0.982222 = 79.982222
Since it is a West longitude coordinate, negate the result.
The final result is -79.982222.
```

Conversion from MinDec to Decimal Degree

Given a MinDec (Degrees, Minutes, Decimal Minutes) coordinate such as 79°58.93172W, convert it to a number of decimal degrees using the following method:

```
The integer number of degrees is the same (79)
The decimal degrees is the decimal minutes divided by 60 (58.93172/60 = ~0.982195)
Add the two together (79 + 0.982195= 79.982195)
For coordinates ind the western (or southern) hemisphere, negate the result.
The final result is -79.982195
```

Conversion from Decimal Degree to DMS

Given a decimal longitudinal coordinate such as -79.982195 it will be necessary to know whether it is a latitudinal or longitudinal coordinate in order to fully convert it. The method is as follows:

```
Subtract the whole number portion of the coordinate, leaving the fractional part. The whole number is the number of degrees. In the example of -79.982195: -79 degrees.
Multiply the remaining fractional part by 60. This will produce a number of minutes in the whole number portion. In the example: 0.982195 x 60 = 58.9317 => 58 minutes.
Multiply the fractional part of the number of minutes by 60, producing a number of seconds. 0.9317 x 60 = 55.903 => 55.903 seconds. It is possible to keep the entire number, truncate to the decimal 55 or round to the decimal 56.
Depending on whether the source number was a latitudinal or longitudinal coordinate, and the sign of the number, add the N/S/E/W specifier. The following table shows the possibilities:
```

Type Dir. Sign Test

Lat. N + > 0

Lat. S - < 0

Long. E + > 0

Long. W - < 0

A latitude of 0°0?0? (at The Equator) is neither North nor South. Similarly, a longitude of 0°0?0? (at the Prime Meridian) is neither East nor West. These are referred to as zero latitude and zero longitude, respectively. A longitude of 180°0?0? (the 180th meridian) is neither East nor West. This is the basis for the International Date Line when referring to the Earth.

```
The final result for the above example is: W 79°58?56?.
```

Programmatical conversion (not sure what language this is)

The most common programmatical use of these processes is to display a coordinate to an end user in the more common DMS form instead of decimal form. Below is a piece of pseudocode to convert from decimal degrees to degrees, minutes, and seconds:

function deg_to_dms ( degfloat )

Input must be non-negative:

if degfloat < 0

error

end if

Compute degrees, minutes and seconds:

deg ? integerpart ( degfloat )

minfloat ? 60 * ( degfloat - deg )

min ? integerpart ( minfloat )

secfloat ? 60 * ( minfloat - min )

Round seconds to desired accuracy:

secfloat ? round( secfloat, digits )

After rounding, the seconds might become 60. These two

if-tests are not necessary if no rounding is done.

if secfloat = 60

min ? min + 1

secfloat ? 0

end if

if min = 60

deg ? deg + 1

min ? 0

end if

Return output:

return ( deg, min, secfloat )

end function

[/quote]