-
Notifications
You must be signed in to change notification settings - Fork 25
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
Conversation
There was a problem hiding this 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
rpcm/rpc_model.py
Outdated
# 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 |
There was a problem hiding this comment.
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
rpcm/rpc_model.py
Outdated
# 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] |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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!
Python package
utm
is not very accurate (see Turbo87/utm#36), so it is preferable to replace it with the standardpyproj
.Note:
pyproj
has a larger overhead thanutm
, so my PR makes a call toincidence_angles()
a bit slower (it goes from 20ms to 80ms in my tests). Unfortunately, I don't think we can easily benefit frompyproj
's scalar ability in this case to speed things up.