You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importpymap3dprint(pymap3d.__version__) # 2.8.0# Observer point on the WGS84 ellipsoidlat0, lon0, h0=47.368614, 8.537506, 400# 3D Cartesian point coordinates relative to the observer's LTPe, n, u=1000, 1000, 200pm.enu2geodetic(e, n, u, lat0, lon0, h0, ell=None, deg=True)
Out [1]: 47.377606963984135, 8.550746545445332, 600.156728355468
The problem is that the current documentation fits with pymap3d 2.8.0, whereas pymap3d version 3.1.0 is available on pypi: https://pypi.org/project/pymap3d/ and the signature of this exact same function function has changed:
So it's no longer aligned with the current documentation.
And when trying to use the newest version in a vanilla way, it fails:
importpymap3dprint(pymap3d.__version__) # 3.1.0frompymap3dimportEllipsoid# Copied from the help above:pm.enu2geodetic(e, n, u, lat0, lon0, h0, ell=Ellipsoid(model='wgs84', name='WGS-84 (1984)', semimajor_axis=6378137.0, semiminor_axis=6356752.31424518, flattening=0.0033528106647473664, thirdflattening=0.0016792203863836474, eccentricity=0.0818191908426201), deg=True)
Traceback (mostrecentcalllast):
File"<stdin>", line1, in<module>TypeError: Ellipsoid.__init__() gotanunexpectedkeywordargument'flattening'
Same error with thirdflattening and eccentricity.
The only way that is working is:
pm.enu2geodetic(e, n, u, lat0, lon0, h0, ell=Ellipsoid(model='wgs84', name='WGS-84 (1984)', semimajor_axis=6378137.0, semiminor_axis=6356752.31424518), deg=True)
Out [1]: (np.float64(47.377606963984135), np.float64(8.55074654544533), np.float64(600.156728355468))
But this is particularly funny because when you print a defined ellipsoid it actually shows those values that were raising unexpected keyword argument 🤪:
What happened?
Hi,
pymap3d 2.8.0 allows to convert data from a local tangent plane (LTP-ENU) to a geodetic frame using the
enu2geodetic
function:e.g.:
The problem is that the current documentation fits with pymap3d 2.8.0, whereas pymap3d version 3.1.0 is available on pypi: https://pypi.org/project/pymap3d/ and the signature of this exact same function function has changed:
So it's no longer aligned with the current documentation.
And when trying to use the newest version in a vanilla way, it fails:
Same error with
thirdflattening
andeccentricity
.The only way that is working is:
But this is particularly funny because when you print a defined ellipsoid it actually shows those values that were raising unexpected keyword argument 🤪:
Also, when having
ell=None
as in the code using pymap3d version 2.8.0 before, it fails in pymap3d 3.1.0:Therefore, this is currently a breaking change.
I installed
pymap3d
3.1.0 from pypi on Ubuntu 22.04 / Python 3.11.2Thanks a lot 🙏!
The text was updated successfully, but these errors were encountered: