1

我有一组格式为 DDM(十进制度数)的坐标,我需要将其转换为十进制度。从这里找到的函数中,我可以转换 DMS,但我找不到可以将 DDM 更改为 DEC 的函数或公式。

例如坐标可以是:

64 度 0 分 N,22 度 33 分 W

这里的转换工具我知道结果是:64,-22,55

所以问题是如何转换 DDM 格式?

编辑:

数据来自如下所示的表:

[Latitude_degrees]: 64
[Latitude_minutes]: 0
[Latitude_hemisphere]: N
[Longitude_degrees]: 22
[Longitude_minutes]: 33
[Longitude_hemisphere]: W
4

1 回答 1

2

简单的数学

作为伪代码:

Latitude = Latitude_degrees + Latitude_minutes / 60 
if Latitude_hemisphere = 'S' then 
    Latitude = -Latitude

和经度的等价物

于 2014-11-12T13:23:13.697 回答