Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data not stored correctly in python 3.9 #5

Open
amnonnes opened this issue Feb 2, 2022 · 2 comments
Open

Data not stored correctly in python 3.9 #5

amnonnes opened this issue Feb 2, 2022 · 2 comments

Comments

@amnonnes
Copy link

amnonnes commented Feb 2, 2022

There seems to be a problem in python 3.9 (tested on mac)

palmyra = LatLon(Latitude(degree = 5, minute = 52, second = 59.88),
Longitude(degree = -162, minute = -4.998))
print(palmyra.to_string('d% %m% %S% %H'))

Output:
('5 52 59.880000000000706 N', '162 4 59.88000000003012 W')

@search5
Copy link
Owner

search5 commented Feb 23, 2022

@amnonnes Confirmation late. When testing on Mac, it would be helpful to fix the bug if you tell us the test result and the result that should be displayed when it works normally.

@amnonnes
Copy link
Author

Hi,

The test on mac is what I posted, here it is again:
% python3.9
Python 3.9.7 (default, Oct 13 2021, 06:45:31)
[Clang 13.0.0 (clang-1300.0.29.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

from latlon import Latitude,Longitude,LatLon,string2latlon
palmyra = LatLon(5.8833, -162.0833)
palmyra = LatLon(Latitude(degree = 5, minute = 52, second = 59.88),Longitude(degree = -162, minute = -4.998))
print(palmyra.to_string('d% %m% %S% %H'))
('5 52 59.880000000000706 N', '162 4 59.88000000003012 W')

What is expected is exactly the same from the README:

palmyra = LatLon(Latitude(5.8833), Longitude(-162.0833)) # Location of Palmyra Atoll in decimal degrees
palmyra = LatLon(5.8833, -162.0833) # Same thing but simpler!
palmyra = LatLon(Latitude(degree = 5, minute = 52, second = 59.88),
Longitude(degree = -162, minute = -4.998)) # or more complicated!
print palmyra.to_string('d% %m% %S% %H') # Print coordinates to degree minute second
('5 52 59.88 N', '162 4 59.88 W')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants