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

Replace utm with pyproj #1

Merged
merged 3 commits into from
May 16, 2019
Merged

Replace utm with pyproj #1

merged 3 commits into from
May 16, 2019

Conversation

glostis
Copy link
Contributor

@glostis glostis commented May 15, 2019

Python package utm is not very accurate (see Turbo87/utm#36), so it is preferable to replace it with the standard pyproj.

Note: pyproj has a larger overhead than utm, so my PR makes a call to incidence_angles() a bit slower (it goes from 20ms to 80ms in my tests). Unfortunately, I don't think we can easily benefit from pyproj's scalar ability in this case to speed things up.

@glostis glostis requested a review from carlodef May 15, 2019 15:53
Copy link
Member

@carlodef carlodef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @glostis ! Minor comments below

# azimuth is the clockwise angle with respect to the North
# of the projection of the satellite direction on the horizontal plane
# This can be computed by taking the argument of a complex number
# in a coordinate system where easting is the x axis and northing the y axis
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm maybe not interpreting this correctly, but I'd say that this comment should read

# in a coordinate system where northing is the x axis and easting the y axis

# of the projection of the satellite direction on the horizontal plane
# This can be computed by taking the argument of a complex number
# in a coordinate system where easting is the x axis and northing the y axis
northing, easting = satellite_direction[:2]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this misleading as the vector satellite_direction contains (utm easting, utm northing, altitude). Maybe we can swap northing, easting here and swap them again in the next line?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed I got things mixed up... Should be good now!

@carlodef carlodef merged commit 285cdd3 into master May 16, 2019
@carlodef carlodef deleted the pyproj branch May 16, 2019 08:16
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

Successfully merging this pull request may close these issues.

2 participants