Created
November 23, 2022 11:52
-
-
Save todashuta/7f307fbfb454c66d185de5175b72f4a3 to your computer and use it in GitHub Desktop.
度分秒の緯度経度を十進法度単位に変換
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # degrees, minutes, seconds to decimal degrees | |
| def dms2dd(d, m, s): | |
| return d + (m / 60) + (s / 3600) | |
| print([dms2dd(36, 6, 13.58925), dms2dd(140, 5, 16.27815)]) # [36.103774791666666, 140.08785504166667] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment