pygeodesy 24.10.24__py2.py3-none-any.whl → 24.12.12__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {PyGeodesy-24.10.24.dist-info → PyGeodesy-24.12.12.dist-info}/METADATA +6 -6
- PyGeodesy-24.12.12.dist-info/RECORD +118 -0
- {PyGeodesy-24.10.24.dist-info → PyGeodesy-24.12.12.dist-info}/WHEEL +1 -1
- pygeodesy/__init__.py +5 -5
- pygeodesy/__main__.py +1 -1
- pygeodesy/albers.py +5 -5
- pygeodesy/auxilats/_CX_4.py +1 -1
- pygeodesy/auxilats/_CX_6.py +1 -1
- pygeodesy/auxilats/_CX_8.py +1 -1
- pygeodesy/auxilats/_CX_Rs.py +1 -1
- pygeodesy/auxilats/__init__.py +1 -1
- pygeodesy/auxilats/__main__.py +1 -1
- pygeodesy/auxilats/auxAngle.py +5 -5
- pygeodesy/auxilats/auxDLat.py +6 -6
- pygeodesy/auxilats/auxDST.py +2 -2
- pygeodesy/auxilats/auxLat.py +5 -5
- pygeodesy/auxilats/auxily.py +2 -2
- pygeodesy/azimuthal.py +55 -65
- pygeodesy/basics.py +35 -34
- pygeodesy/booleans.py +37 -37
- pygeodesy/cartesianBase.py +26 -65
- pygeodesy/clipy.py +1 -1
- pygeodesy/constants.py +7 -7
- pygeodesy/css.py +8 -9
- pygeodesy/datums.py +1 -1
- pygeodesy/deprecated/__init__.py +2 -2
- pygeodesy/deprecated/bases.py +1 -1
- pygeodesy/deprecated/classes.py +10 -10
- pygeodesy/deprecated/consterns.py +1 -1
- pygeodesy/deprecated/datum.py +1 -1
- pygeodesy/deprecated/functions.py +23 -13
- pygeodesy/deprecated/nvector.py +1 -1
- pygeodesy/deprecated/rhumbBase.py +1 -1
- pygeodesy/deprecated/rhumbaux.py +1 -1
- pygeodesy/deprecated/rhumbsolve.py +1 -1
- pygeodesy/deprecated/rhumbx.py +1 -1
- pygeodesy/dms.py +1 -1
- pygeodesy/ecef.py +63 -69
- pygeodesy/elevations.py +1 -1
- pygeodesy/ellipsoidalBase.py +106 -121
- pygeodesy/ellipsoidalBaseDI.py +115 -119
- pygeodesy/ellipsoidalExact.py +36 -38
- pygeodesy/ellipsoidalGeodSolve.py +1 -1
- pygeodesy/ellipsoidalKarney.py +1 -1
- pygeodesy/ellipsoidalNvector.py +1 -1
- pygeodesy/ellipsoidalVincenty.py +6 -5
- pygeodesy/ellipsoids.py +7 -8
- pygeodesy/elliptic.py +6 -6
- pygeodesy/epsg.py +1 -1
- pygeodesy/errors.py +25 -25
- pygeodesy/etm.py +84 -76
- pygeodesy/fmath.py +54 -51
- pygeodesy/formy.py +74 -106
- pygeodesy/frechet.py +1 -1
- pygeodesy/fstats.py +1 -1
- pygeodesy/fsums.py +82 -72
- pygeodesy/gars.py +1 -1
- pygeodesy/geodesici.py +4 -4
- pygeodesy/geodesicw.py +16 -15
- pygeodesy/geodesicx/_C4_24.py +2 -2
- pygeodesy/geodesicx/_C4_27.py +2 -2
- pygeodesy/geodesicx/_C4_30.py +2 -2
- pygeodesy/geodesicx/__init__.py +3 -3
- pygeodesy/geodesicx/__main__.py +1 -1
- pygeodesy/geodesicx/gx.py +6 -5
- pygeodesy/geodesicx/gxarea.py +2 -2
- pygeodesy/geodesicx/gxbases.py +2 -2
- pygeodesy/geodesicx/gxline.py +16 -12
- pygeodesy/geodsolve.py +8 -17
- pygeodesy/geohash.py +1 -1
- pygeodesy/geoids.py +6 -6
- pygeodesy/hausdorff.py +1 -1
- pygeodesy/heights.py +3 -3
- pygeodesy/internals.py +64 -80
- pygeodesy/interns.py +2 -3
- pygeodesy/iters.py +1 -1
- pygeodesy/karney.py +4 -4
- pygeodesy/ktm.py +20 -21
- pygeodesy/latlonBase.py +296 -346
- pygeodesy/lazily.py +15 -15
- pygeodesy/lcc.py +5 -5
- pygeodesy/ltp.py +55 -59
- pygeodesy/ltpTuples.py +208 -192
- pygeodesy/mgrs.py +9 -10
- pygeodesy/named.py +153 -3
- pygeodesy/namedTuples.py +58 -7
- pygeodesy/nvectorBase.py +122 -105
- pygeodesy/osgr.py +10 -13
- pygeodesy/points.py +1 -1
- pygeodesy/props.py +3 -3
- pygeodesy/resections.py +26 -26
- pygeodesy/rhumb/__init__.py +2 -2
- pygeodesy/rhumb/aux_.py +2 -2
- pygeodesy/rhumb/bases.py +2 -2
- pygeodesy/rhumb/ekx.py +4 -4
- pygeodesy/rhumb/solve.py +4 -4
- pygeodesy/simplify.py +291 -403
- pygeodesy/solveBase.py +1 -1
- pygeodesy/sphericalBase.py +1 -1
- pygeodesy/sphericalNvector.py +84 -127
- pygeodesy/sphericalTrigonometry.py +66 -71
- pygeodesy/streprs.py +10 -5
- pygeodesy/trf.py +1 -1
- pygeodesy/triaxials.py +23 -16
- pygeodesy/units.py +17 -17
- pygeodesy/unitsBase.py +1 -1
- pygeodesy/ups.py +4 -4
- pygeodesy/utily.py +202 -145
- pygeodesy/utm.py +10 -10
- pygeodesy/utmups.py +1 -1
- pygeodesy/utmupsBase.py +1 -1
- pygeodesy/vector2d.py +17 -17
- pygeodesy/vector3d.py +32 -23
- pygeodesy/vector3dBase.py +22 -19
- pygeodesy/webmercator.py +5 -5
- pygeodesy/wgrs.py +5 -5
- PyGeodesy-24.10.24.dist-info/RECORD +0 -118
- {PyGeodesy-24.10.24.dist-info → PyGeodesy-24.12.12.dist-info}/top_level.txt +0 -0
pygeodesy/lazily.py
CHANGED
|
@@ -45,7 +45,7 @@ except ImportError as x: # Python 2.6-
|
|
|
45
45
|
|
|
46
46
|
_a0 = () # PYCHOK empty tuple
|
|
47
47
|
_asSPACED_ = ' as '
|
|
48
|
-
_FOR_DOCS = _getPYGEODESY('
|
|
48
|
+
_FOR_DOCS = _getPYGEODESY('FOR_DOCS') # for epydoc ...
|
|
49
49
|
_init__all__ = _FOR_DOCS or _getPYGEODESY('_init__all__', _DUNDER_all_) == _DUNDER_all_ # PYCHOK exported
|
|
50
50
|
_lazily_ = 'lazily'
|
|
51
51
|
_PYTHON_X_DEV = getattr(_sys.flags, 'dev_mode', False) # PYCHOK Python 3.2+
|
|
@@ -174,8 +174,8 @@ _ALL_INIT = _a(_pygeodesy_abspath_, _version_)
|
|
|
174
174
|
# __all__ value for most modules, accessible as _ALL_LAZY.<module>
|
|
175
175
|
_ALL_LAZY = _NamedEnum_RO(_name='_ALL_LAZY',
|
|
176
176
|
albers=_a('AlbersEqualArea', 'AlbersEqualArea2', 'AlbersEqualArea4',
|
|
177
|
-
|
|
178
|
-
|
|
177
|
+
'AlbersEqualAreaCylindrical', 'AlbersEqualAreaNorth', 'AlbersEqualAreaSouth',
|
|
178
|
+
'AlbersError', 'Albers7Tuple'),
|
|
179
179
|
auxilats=_a(), # module only
|
|
180
180
|
azimuthal=_a('AzimuthalError', 'Azimuthal7Tuple',
|
|
181
181
|
'Equidistant', 'EquidistantExact', 'EquidistantGeodSolve', 'EquidistantKarney',
|
|
@@ -241,12 +241,12 @@ _ALL_LAZY = _NamedEnum_RO(_name='_ALL_LAZY',
|
|
|
241
241
|
fmath=_a('Fdot', 'Fhorner', 'Fhypot', 'Fpolynomial', 'Fpowers', 'Fcbrt', 'Froot', 'Fsqrt',
|
|
242
242
|
'bqrt', 'cbrt', 'cbrt2', 'euclid', 'euclid_',
|
|
243
243
|
'facos1', 'fasin1', 'fatan', 'fatan1', 'fatan2', 'favg',
|
|
244
|
-
'fdot', 'fdot3', 'fma', 'fmean', 'fmean_', 'fhorner', 'fidw', 'f2mul_',
|
|
245
|
-
'fpowers', 'fprod', 'frandoms', 'frange', 'freduce', 'fremainder',
|
|
244
|
+
'fdot', 'fdot_', 'fdot3', 'fma', 'fmean', 'fmean_', 'fhorner', 'fidw', 'f2mul_',
|
|
245
|
+
'fpolynomial', 'fpowers', 'fprod', 'frandoms', 'frange', 'freduce', 'fremainder',
|
|
246
246
|
'hypot', 'hypot_', 'hypot1', 'hypot2', 'hypot2_',
|
|
247
247
|
'norm2', 'norm_', 'sqrt0', 'sqrt3', 'sqrt_a', 'zcrt', 'zqrt'),
|
|
248
248
|
formy=_a('Radical2Tuple',
|
|
249
|
-
'antipode', 'antipode_', 'bearing', 'bearing_',
|
|
249
|
+
'angle2chord', 'antipode', 'antipode_', 'bearing', 'bearing_', 'chord2angle',
|
|
250
250
|
'compassAngle', 'cosineForsytheAndoyerLambert', 'cosineForsytheAndoyerLambert_',
|
|
251
251
|
'cosineAndoyerLambert', 'cosineAndoyerLambert_', 'cosineLaw', 'cosineLaw_',
|
|
252
252
|
'equirectangular', 'equirectangular4', 'euclidean', 'euclidean_',
|
|
@@ -255,8 +255,7 @@ _ALL_LAZY = _NamedEnum_RO(_name='_ALL_LAZY',
|
|
|
255
255
|
'flatLocal', 'flatLocal_', 'flatPolar', 'flatPolar_',
|
|
256
256
|
'hartzell', 'haversine', 'haversine_', 'heightOf', 'heightOrthometric', 'horizon', 'hubeny', 'hubeny_',
|
|
257
257
|
'intersection2', 'intersections2', 'isantipode', 'isantipode_', 'isnormal', 'isnormal_',
|
|
258
|
-
'
|
|
259
|
-
'opposing', 'opposing_', 'philam2n_xyz', 'radical2',
|
|
258
|
+
'normal', 'normal_', 'opposing', 'opposing_', 'radical2',
|
|
260
259
|
'thomas', 'thomas_', 'vincentys', 'vincentys_'),
|
|
261
260
|
frechet=_a('Frechet', 'FrechetDegrees', 'FrechetError', 'FrechetRadians',
|
|
262
261
|
'FrechetCosineAndoyerLambert', 'FrechetCosineForsytheAndoyerLambert',
|
|
@@ -297,7 +296,7 @@ _ALL_LAZY = _NamedEnum_RO(_name='_ALL_LAZY',
|
|
|
297
296
|
'isNumpy2', 'isPoints2', 'isTuple2', 'iterNumpy2', 'iterNumpy2over'),
|
|
298
297
|
karney=_a('Area3Tuple', 'Caps', 'Direct9Tuple', 'GDict', 'Inverse10Tuple', 'Rhumb8Tuple'),
|
|
299
298
|
ktm=_a('KTMError', 'KTransverseMercator'),
|
|
300
|
-
latlonBase=_a(),
|
|
299
|
+
latlonBase=_a('latlon2n_xyz', 'philam2n_xyz'),
|
|
301
300
|
lazily=_a('LazyAttributeError', 'LazyImportError', 'isLazy'),
|
|
302
301
|
lcc=_a('Conic', 'Conics', 'Lcc', 'LCCError', 'toLcc'),
|
|
303
302
|
ltp=_a('Attitude', 'AttitudeError', 'ChLV', 'ChLVa', 'ChLVe', 'Frustum',
|
|
@@ -322,7 +321,7 @@ _ALL_LAZY = _NamedEnum_RO(_name='_ALL_LAZY',
|
|
|
322
321
|
'Reverse4Tuple', 'Triangle7Tuple', 'Triangle8Tuple', 'Trilaterate5Tuple',
|
|
323
322
|
'UtmUps2Tuple', 'UtmUps5Tuple', 'UtmUps8Tuple', 'UtmUpsLatLon5Tuple',
|
|
324
323
|
'Vector2Tuple', 'Vector3Tuple', 'Vector4Tuple'),
|
|
325
|
-
nvectorBase=_a('NorthPole', 'SouthPole'),
|
|
324
|
+
nvectorBase=_a('NorthPole', 'SouthPole', 'n_xyz2latlon', 'n_xyz2philam'),
|
|
326
325
|
osgr=_a('Osgr', 'OSGRError', 'parseOSGR', 'toOsgr'),
|
|
327
326
|
points=_a('LatLon_', 'LatLon2psxy', 'Numpy2LatLon', 'Shape2Tuple', 'Tuple2LatLon',
|
|
328
327
|
'areaOf', 'boundsOf', 'centroidOf', 'fractional',
|
|
@@ -344,7 +343,7 @@ _ALL_LAZY = _NamedEnum_RO(_name='_ALL_LAZY',
|
|
|
344
343
|
sphericalBase=_a(), # module only
|
|
345
344
|
sphericalNvector=_a(), # module only
|
|
346
345
|
sphericalTrigonometry=_a(), # module only
|
|
347
|
-
simplify=_a('simplify1', 'simplifyRDP', '
|
|
346
|
+
simplify=_a('simplify1', 'simplifyRDP', 'simplifyRW', 'simplifyVW'),
|
|
348
347
|
solveBase=_a(), # module only
|
|
349
348
|
streprs=_a('anstr', 'attrs', 'enstr2', 'fstr', 'fstrzs', 'hstr', 'instr',
|
|
350
349
|
'lrstrip', 'pairs', 'reprs', 'strs', 'unstr'),
|
|
@@ -373,7 +372,7 @@ _ALL_LAZY = _NamedEnum_RO(_name='_ALL_LAZY',
|
|
|
373
372
|
'm2km', 'm2NM', 'm2radians', 'm2SM', 'm2toise', 'm2yard', 'NM2m',
|
|
374
373
|
'radians', 'radiansPI', 'radiansPI2', 'radiansPI_2', 'radians2m',
|
|
375
374
|
'sincos2', 'SinCos2', 'sincos2_', 'sincos2d', 'sincos2d_', 'sincostan3', 'SM2m',
|
|
376
|
-
'tand', 'tand_', 'tan_2', 'tanPI_2_2', 'toise2m', 'truncate',
|
|
375
|
+
'tan', 'tan_', 'tand', 'tand_', 'tan_2', 'tanPI_2_2', 'toise2m', 'truncate',
|
|
377
376
|
'unroll180', 'unrollPI',
|
|
378
377
|
'wrap90', 'wrap180', 'wrap360', 'wrapPI_2', 'wrapPI', 'wrapPI2', 'wrap_normal',
|
|
379
378
|
'yard2m'),
|
|
@@ -409,7 +408,8 @@ _ALL_DEPRECATED = _NamedEnum_RO(_name='_ALL_DEPRECATED',
|
|
|
409
408
|
'false2f', 'falsed2f', 'float0', 'fStr', 'fStrzs', 'Fsum2product',
|
|
410
409
|
'hypot3', 'inStr', 'isenclosedby', 'istuplist',
|
|
411
410
|
'joined', 'joined_', 'nearestOn3', 'nearestOn4',
|
|
412
|
-
'parseUTM', 'perimeterof', 'polygon',
|
|
411
|
+
'parseUTM', 'perimeterof', 'polygon',
|
|
412
|
+
'scalar', 'simplify2', 'simplifyRDPm', 'simplifyVWm',
|
|
413
413
|
'tienstra', 'toUtm', 'triAngle4',
|
|
414
414
|
'unsign0', 'unStr', 'utmZoneBand2'),
|
|
415
415
|
deprecated_nvector=_a('LatLonNvectorBase', 'Nvector', 'sumOf', 'NorthPole', 'SouthPole'),)
|
|
@@ -511,7 +511,7 @@ class _ALL_MODS(_internals._MODS_Base):
|
|
|
511
511
|
_internals._MODS = _ALL_MODS = _ALL_MODS() # PYCHOK singleton
|
|
512
512
|
|
|
513
513
|
__all__ = _ALL_LAZY.lazily
|
|
514
|
-
__version__ = '24.
|
|
514
|
+
__version__ = '24.11.28'
|
|
515
515
|
|
|
516
516
|
|
|
517
517
|
def _ALL_OTHER(*objs):
|
|
@@ -899,7 +899,7 @@ if _is_DUNDER_main(__name__): # PYCHOK no cover
|
|
|
899
899
|
|
|
900
900
|
# **) MIT License
|
|
901
901
|
#
|
|
902
|
-
# Copyright (C) 2018-
|
|
902
|
+
# Copyright (C) 2018-2025 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
903
903
|
#
|
|
904
904
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
905
905
|
# copy of this software and associated documentation files (the "Software"),
|
pygeodesy/lcc.py
CHANGED
|
@@ -48,7 +48,7 @@ from pygeodesy.utily import atan1, degrees90, degrees180, sincos2, tanPI_2_2
|
|
|
48
48
|
from math import atan, fabs, log, radians, sin, sqrt
|
|
49
49
|
|
|
50
50
|
__all__ = _ALL_LAZY.lcc
|
|
51
|
-
__version__ = '24.06
|
|
51
|
+
__version__ = '24.11.06'
|
|
52
52
|
|
|
53
53
|
_E0_ = 'E0'
|
|
54
54
|
_N0_ = 'N0'
|
|
@@ -620,9 +620,9 @@ def toLcc(latlon, conic=Conics.WRF_Lb, height=None, Lcc=Lcc,
|
|
|
620
620
|
@kwarg height: Optional height for the point, overriding the
|
|
621
621
|
default height (C{meter}).
|
|
622
622
|
@kwarg Lcc: Class to return the I{Lambert} location (L{Lcc}).
|
|
623
|
-
@kwarg name_Lcc_kwds: Optional C{B{name}=NN} (C{str}) and
|
|
624
|
-
additional B{C{Lcc}} keyword arguments, ignored if
|
|
625
|
-
|
|
623
|
+
@kwarg name_Lcc_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
|
|
624
|
+
additional B{C{Lcc}} keyword arguments, ignored if B{C{Lcc}
|
|
625
|
+
is None}.
|
|
626
626
|
|
|
627
627
|
@return: The I{Lambert} location (L{Lcc}) or if C{B{Lcc} is None},
|
|
628
628
|
an L{EasNor3Tuple}C{(easting, northing, height)}.
|
|
@@ -659,7 +659,7 @@ if __name__ == '__main__':
|
|
|
659
659
|
|
|
660
660
|
# **) MIT License
|
|
661
661
|
#
|
|
662
|
-
# Copyright (C) 2016-
|
|
662
|
+
# Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
663
663
|
#
|
|
664
664
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
665
665
|
# copy of this software and associated documentation files (the "Software"),
|
pygeodesy/ltp.py
CHANGED
|
@@ -23,8 +23,8 @@ from pygeodesy.ecef import _EcefBase, EcefKarney, Ecef9Tuple, _llhn4, \
|
|
|
23
23
|
_xyzn4, _WGS84
|
|
24
24
|
from pygeodesy.errors import _NotImplementedError, _ValueError, _xattr, \
|
|
25
25
|
_xkwds, _xkwds_get, _xkwds_pop2
|
|
26
|
-
from pygeodesy.fmath import fabs, fdot, Fhorner
|
|
27
|
-
from pygeodesy.fsums import _floor,
|
|
26
|
+
from pygeodesy.fmath import fabs, fdot, fdot_, Fhorner
|
|
27
|
+
from pygeodesy.fsums import _floor, fsumf_
|
|
28
28
|
from pygeodesy.interns import _0_, _COMMASPACE_, _DOT_, _ecef_, _height_, _M_, \
|
|
29
29
|
_invalid_, _lat0_, _lon0_, _name_, _too_
|
|
30
30
|
# from pygeodesy.lazily import _ALL_LAZY # from vector3d
|
|
@@ -44,7 +44,7 @@ from pygeodesy.vector3d import _ALL_LAZY, Vector3d
|
|
|
44
44
|
# from math import fabs, floor as _floor # from .fmath, .fsums
|
|
45
45
|
|
|
46
46
|
__all__ = _ALL_LAZY.ltp
|
|
47
|
-
__version__ = '24.
|
|
47
|
+
__version__ = '24.12.12'
|
|
48
48
|
|
|
49
49
|
_height0_ = _height_ + _0_
|
|
50
50
|
_narrow_ = 'narrow'
|
|
@@ -119,14 +119,13 @@ class Attitude(_NamedBase):
|
|
|
119
119
|
@see: Matrix M of case 10 in U{Appendix A
|
|
120
120
|
<https://ntrs.NASA.gov/api/citations/19770019231/downloads/19770019231.pdf>}.
|
|
121
121
|
'''
|
|
122
|
-
_f = fsum1f_
|
|
123
122
|
# to follow the definitions of rotation angles alpha, beta and gamma:
|
|
124
123
|
# negate yaw since yaw is counter-clockwise around the z-axis, swap
|
|
125
124
|
# tilt and roll since tilt is around the x- and roll around the y-axis
|
|
126
125
|
sa, ca, sb, cb, sg, cg = sincos2d_(-self.yaw, self.roll, self.tilt)
|
|
127
|
-
return ((ca * cb,
|
|
128
|
-
(sa * cb,
|
|
129
|
-
( -sb,
|
|
126
|
+
return ((ca * cb, fdot_(ca, sb * sg, -sa, cg), fdot_(ca, sb * cg, sa, sg)),
|
|
127
|
+
(sa * cb, fdot_(sa, sb * sg, ca, cg), fdot_(sa, sb * cg, -ca, sg)),
|
|
128
|
+
( -sb, cb * sg, cb * cg))
|
|
130
129
|
|
|
131
130
|
@property_doc_(' roll/bank in C{degrees180}, positive to the right and down.')
|
|
132
131
|
def roll(self):
|
|
@@ -150,16 +149,16 @@ class Attitude(_NamedBase):
|
|
|
150
149
|
@kwarg z: Z component of vector (C{scalar}), same units as B{C{x}}.
|
|
151
150
|
@kwarg Vector: Class to return transformed point (C{Cartesian}, L{Vector3d}
|
|
152
151
|
or C{Vector3Tuple}) or C{None}.
|
|
153
|
-
@kwarg name_Vector_kwds: Optional C{B{name}=NN} (C{str}) and
|
|
154
|
-
additional B{C{Vector}} keyword arguments, ignored if
|
|
155
|
-
|
|
152
|
+
@kwarg name_Vector_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
|
|
153
|
+
additional B{C{Vector}} keyword arguments, ignored if C{B{Vector}
|
|
154
|
+
is None}.
|
|
156
155
|
|
|
157
156
|
@return: A named B{C{Vector}} instance or if C{B{Vector} is None},
|
|
158
157
|
a named L{Vector3Tuple}C{(x, y, z)}.
|
|
159
158
|
|
|
160
159
|
@raise AttitudeError: Invalid B{C{x_xyz}}, B{C{y}} or B{C{z}}.
|
|
161
160
|
|
|
162
|
-
@raise TypeError: Invalid B{C{Vector}} or B{C{name_Vector_kwds}}.
|
|
161
|
+
@raise TypeError: Invalid B{C{Vector}} or B{C{name_Vector_kwds}} item.
|
|
163
162
|
|
|
164
163
|
@see: U{Yaw, pitch, and roll rotations<http://MSL.CS.UIUC.edu/planning/node102.html>}.
|
|
165
164
|
'''
|
|
@@ -308,11 +307,10 @@ class Frustum(_NamedBase):
|
|
|
308
307
|
|
|
309
308
|
def _xyz5(b, xy5, z, ltp):
|
|
310
309
|
# rotate (x, y)'s by bearing, clockwise
|
|
311
|
-
|
|
312
|
-
_f = fsum1f_
|
|
310
|
+
sc = sincos2d(b)
|
|
313
311
|
for x, y in xy5:
|
|
314
|
-
yield Xyz4Tuple(
|
|
315
|
-
|
|
312
|
+
yield Xyz4Tuple(fdot(sc, x, y),
|
|
313
|
+
fdot(sc, -x, y), z, ltp)
|
|
316
314
|
|
|
317
315
|
try:
|
|
318
316
|
a, t, y, r = alt_attitude.atyr
|
|
@@ -330,7 +328,7 @@ class Frustum(_NamedBase):
|
|
|
330
328
|
else:
|
|
331
329
|
z = _0_0
|
|
332
330
|
|
|
333
|
-
b = Degrees(yaw=y,
|
|
331
|
+
b = Degrees(yaw=y, wrap=wrap360) # bearing
|
|
334
332
|
e = -Degrees(tilt=t, wrap=wrap180) # elevation, pitch
|
|
335
333
|
if not EPS < e < _180_0:
|
|
336
334
|
raise _ValueError(tilt=t)
|
|
@@ -468,10 +466,10 @@ class LocalCartesian(_NamedBase):
|
|
|
468
466
|
'''(INTERNAL) Convert geocentric/geodetic to local, like I{forward}.
|
|
469
467
|
|
|
470
468
|
@arg ecef: Geocentric (and geodetic) (L{Ecef9Tuple}).
|
|
471
|
-
@arg Xyz: An L{XyzLocal}, L{Enu} or L{Ned} I{class} or C{None}.
|
|
472
|
-
@arg name_Xyz_kwds: Optional C{B{name}=NN} (C{str}) and
|
|
473
|
-
additional B{C{Xyz}} keyword arguments, ignored if
|
|
474
|
-
|
|
469
|
+
@arg Xyz: An L{XyzLocal}, L{Aer}, L{Enu} or L{Ned} I{class} or C{None}.
|
|
470
|
+
@arg name_Xyz_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
|
|
471
|
+
additional B{C{Xyz}} keyword arguments, ignored if C{B{Xyz}
|
|
472
|
+
is None}.
|
|
475
473
|
|
|
476
474
|
@return: An C{B{Xyz}(x, y, z, ltp, **B{name_Xyz_kwds}} instance or
|
|
477
475
|
if C{B{Xyz} is None}, a L{Local9Tuple}C{(x, y, z, lat, lon,
|
|
@@ -479,16 +477,15 @@ class LocalCartesian(_NamedBase):
|
|
|
479
477
|
(L{Ecef9Tuple}) converted to this C{datum} and C{M=None},
|
|
480
478
|
always.
|
|
481
479
|
|
|
482
|
-
@raise TypeError: Invalid B{C{Xyz}} or B{C{name_Xyz_kwds}}.
|
|
480
|
+
@raise TypeError: Invalid B{C{Xyz}} or B{C{name_Xyz_kwds}} item.
|
|
483
481
|
'''
|
|
484
482
|
_xinstanceof(Ecef9Tuple, ecef=ecef)
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
ecef = ecef.toDatum(ltp.datum)
|
|
483
|
+
if ecef.datum != self.datum:
|
|
484
|
+
ecef = ecef.toDatum(self.datum)
|
|
488
485
|
n, kwds = _name2__(name_Xyz_kwds, _or_nameof=ecef)
|
|
489
|
-
x, y, z = self.M.rotate(ecef.xyz, *
|
|
486
|
+
x, y, z = self.M.rotate(ecef.xyz, *self._t0_xyz)
|
|
490
487
|
r = Local9Tuple(x, y, z, ecef.lat, ecef.lon, ecef.height,
|
|
491
|
-
|
|
488
|
+
self, ecef, None, name=n)
|
|
492
489
|
if Xyz:
|
|
493
490
|
_xsubclassof(*_XyzLocals4, Xyz=Xyz) # Vector3d
|
|
494
491
|
r = r.toXyz(Xyz=Xyz, name=n, **kwds)
|
|
@@ -557,9 +554,9 @@ class LocalCartesian(_NamedBase):
|
|
|
557
554
|
@kwarg nine: If C{True}, return a 9-, otherwise a 3-tuple (C{bool}).
|
|
558
555
|
@kwarg M: Include the rotation matrix (C{bool}).
|
|
559
556
|
|
|
560
|
-
@return: A I{geocentric} 3-tuple C{(x, y, z)} or if C{B{nine}=True},
|
|
561
|
-
|
|
562
|
-
|
|
557
|
+
@return: A I{geocentric} 3-tuple C{(x, y, z)} or if C{B{nine}=True}, an
|
|
558
|
+
L{Ecef9Tuple}C{(x, y, z, lat, lon, height, C, M, datum)} with
|
|
559
|
+
rotation matrix C{M} (L{EcefMatrix}) if requested.
|
|
563
560
|
'''
|
|
564
561
|
_xinstanceof(*_XyzLocals5, local=local)
|
|
565
562
|
t = self.M.unrotate(local.xyz, *self._t0_xyz)
|
|
@@ -959,15 +956,15 @@ class ChLVa(_ChLV, LocalCartesian):
|
|
|
959
956
|
a, b, h_ = _ChLV._llh2abh_3(lat, lon, h)
|
|
960
957
|
a2, b2 = a**2, b**2
|
|
961
958
|
|
|
962
|
-
Y =
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
X =
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
959
|
+
Y = fdot_(211455.93, b,
|
|
960
|
+
-10938.51, b * a,
|
|
961
|
+
-0.36, b * a2,
|
|
962
|
+
-44.54, b * b2, start=72.37) # + 600_000
|
|
963
|
+
X = fdot_(308807.95, a,
|
|
964
|
+
3745.25, b2,
|
|
965
|
+
76.63, a2,
|
|
966
|
+
-194.56, b2 * a,
|
|
967
|
+
119.79, a2 * a, start=147.07) # + 200_000
|
|
971
968
|
return self._ChLV9Tuple(True, M, n, Y, X, h_, lat, lon, h)
|
|
972
969
|
|
|
973
970
|
def reverse(self, enh_, n=None, h_=0, M=None, **name): # PYCHOK signature
|
|
@@ -976,15 +973,15 @@ class ChLVa(_ChLV, LocalCartesian):
|
|
|
976
973
|
a, b, h = _ChLV._YXh_2abh3(Y, X, h_)
|
|
977
974
|
ab_d, a2, b2 = ChLV._ab_d, a**2, b**2
|
|
978
975
|
|
|
979
|
-
lat =
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
lon =
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
976
|
+
lat = fdot_(3.238272, b,
|
|
977
|
+
-0.270978, a2,
|
|
978
|
+
-0.002528, b2,
|
|
979
|
+
-0.0447, a2 * b,
|
|
980
|
+
-0.014, b2 * b, start=16.9023892) / ab_d
|
|
981
|
+
lon = fdot_(4.728982, a,
|
|
982
|
+
0.791484, a * b,
|
|
983
|
+
0.1306, a * b2,
|
|
984
|
+
-0.0436, a * a2, start=2.6779094) / ab_d
|
|
988
985
|
return self._ChLV9Tuple(False, M, n, Y, X, h_, lat, lon, h)
|
|
989
986
|
|
|
990
987
|
|
|
@@ -1025,8 +1022,7 @@ class ChLVe(_ChLV, LocalCartesian):
|
|
|
1025
1022
|
B0 = _H(a, z, 308770.746371, 75.028131, 120.435227, 0.009488, 0.070332, -0.00001)
|
|
1026
1023
|
B2 = _H(a, 3745.408911, -193.792705, 4.340858, -0.376174, 0.004053)
|
|
1027
1024
|
B4 = _H(a, -0.734684, 0.144466, -0.011842)
|
|
1028
|
-
|
|
1029
|
-
X = _H(b, B0, z, B2, z, B4, z, B6).fover(ab_M) # 1,000 Km!
|
|
1025
|
+
X = _H(b, B0, z, B2, z, B4, z, 0.000488).fover(ab_M) # 1,000 Km!
|
|
1030
1026
|
|
|
1031
1027
|
t = self._ChLV9Tuple(True, M, n, Y, X, h_, lat, lon, h)
|
|
1032
1028
|
if gamma:
|
|
@@ -1046,8 +1042,7 @@ class ChLVe(_ChLV, LocalCartesian):
|
|
|
1046
1042
|
A0 = _H(b, ChLV._sLat, 32386.4877666, -25.486822, -132.457771, 0.48747, 0.81305, -0.0069)
|
|
1047
1043
|
A2 = _H(b, -2713.537919, -450.442705, -75.53194, -14.63049, -2.7604)
|
|
1048
1044
|
A4 = _H(b, 24.42786, 13.20703, 4.7476)
|
|
1049
|
-
|
|
1050
|
-
lat = _H(a, A0, z, A2, z, A4, z, A6).fover(s_d)
|
|
1045
|
+
lat = _H(a, A0, z, A2, z, A4, z, -0.4249).fover(s_d)
|
|
1051
1046
|
|
|
1052
1047
|
A1 = _H(b, 47297.3056722, 7925.714783, 1328.129667, 255.02202, 48.17474, 9.0243)
|
|
1053
1048
|
A3 = _H(b, -442.709889, -255.02202, -96.34947, -30.0808)
|
|
@@ -1075,15 +1070,16 @@ def _fov_2(**fov):
|
|
|
1075
1070
|
|
|
1076
1071
|
|
|
1077
1072
|
def _toLocal(inst, ltp, Xyz, Xyz_kwds):
|
|
1078
|
-
'''(
|
|
1073
|
+
'''(INTERNAL) Helper for C{CartesianBase.toAer}, C{CartesianBase.toEnu},
|
|
1074
|
+
C{CartesianBase.toLocal}, C{CartesianBase.toNed} and C{latLonBase.toLocal}.
|
|
1079
1075
|
'''
|
|
1080
1076
|
return _xLtp(ltp, inst._Ltp)._ecef2local(inst._ecef9, Xyz, Xyz_kwds)
|
|
1081
1077
|
|
|
1082
1078
|
|
|
1083
1079
|
def _toLtp(inst, Ecef, ecef9, name):
|
|
1084
|
-
'''(
|
|
1080
|
+
'''(INTERNAL) Helper for C{CartesianBase.toLtp}, C{ecef.toLtp} and C{latLonBase.toLtp}.
|
|
1085
1081
|
'''
|
|
1086
|
-
return inst._Ltp if Ecef in (None, inst.Ecef)
|
|
1082
|
+
return inst._Ltp if (not name) and Ecef in (None, inst.Ecef) else \
|
|
1087
1083
|
Ltp(ecef9, ecef=Ecef(inst.datum), name=inst._name__(name))
|
|
1088
1084
|
|
|
1089
1085
|
|
|
@@ -1098,9 +1094,9 @@ def tyr3d(tilt=INT0, yaw=INT0, roll=INT0, Vector=Vector3d, **name_Vector_kwds):
|
|
|
1098
1094
|
(clockwise rotation along and around the y-axis).
|
|
1099
1095
|
@kwarg Vector: Class to return the direction vector (C{Cartesian},
|
|
1100
1096
|
L{Vector3d} or C{Vector3Tuple}) or C{None}.
|
|
1101
|
-
@kwarg name_Vector_kwds: Optional C{B{name}=NN} (C{str}) and
|
|
1102
|
-
additional B{C{Vector}} keyword arguments, ignored if
|
|
1103
|
-
|
|
1097
|
+
@kwarg name_Vector_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
|
|
1098
|
+
additional B{C{Vector}} keyword arguments, ignored if C{B{Vector}
|
|
1099
|
+
is None}.
|
|
1104
1100
|
|
|
1105
1101
|
@return: A named B{C{Vector}} instance or if C{B{Vector} is None},
|
|
1106
1102
|
a named L{Vector3Tuple}C{(x, y, z)}.
|
|
@@ -1125,7 +1121,7 @@ def tyr3d(tilt=INT0, yaw=INT0, roll=INT0, Vector=Vector3d, **name_Vector_kwds):
|
|
|
1125
1121
|
|
|
1126
1122
|
|
|
1127
1123
|
def _xLtp(ltp, *dflt):
|
|
1128
|
-
'''(INTERNAL) Validate B{C{ltp}}
|
|
1124
|
+
'''(INTERNAL) Validate B{C{ltp}} if not C{None} else B{C{dflt}}.
|
|
1129
1125
|
'''
|
|
1130
1126
|
if dflt and ltp is None:
|
|
1131
1127
|
ltp = dflt[0]
|
|
@@ -1134,7 +1130,7 @@ def _xLtp(ltp, *dflt):
|
|
|
1134
1130
|
|
|
1135
1131
|
# **) MIT License
|
|
1136
1132
|
#
|
|
1137
|
-
# Copyright (C) 2016-
|
|
1133
|
+
# Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
1138
1134
|
#
|
|
1139
1135
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
1140
1136
|
# copy of this software and associated documentation files (the "Software"),
|