Created
January 19, 2020 14:51
-
-
Save Densyakun/f2471da3ffb89450885b4751ebbc9626 to your computer and use it in GitHub Desktop.
メルカトル図法における経線方向のスケールを取得します
This file contains 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
import math | |
semi_major_axis = 6378137 | |
semi_minor_axis = 6356752.314245 | |
def getScale(lat): | |
return semi_minor_axis / semi_major_axis / math.cos(math.radians(lat)) | |
if __name__ == '__main__': | |
while(True): | |
try: | |
print(getScale(float(input()))) | |
except: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment