Skip to content

Incorrect result using wgs84.latlon() ? #1013

Closed Answered by brandon-rhodes
brunobarwise asked this question in Q&A
Discussion options

You must be logged in to vote

Whatever ints or floats I put in, printing skyfield.toposlib.GeographicPosition objects always shows them as being N and E... Is this normal ? Is there a bug in my code ?

Happily, that is completely normal. One can express, for example, the longitude 5°W also as the value –5°E, because the negative sign turns east into west. Internally, Skyfield uses negative to mean "west" and "south", instead of having a separate flag for east/west and north/south. So printing the raw values always will show north latitude and east longitude.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by brandon-rhodes
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants