pygeodesy 24.4.12__py2.py3-none-any.whl → 24.4.18__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.4.12.dist-info → PyGeodesy-24.4.18.dist-info}/METADATA +2 -2
- {PyGeodesy-24.4.12.dist-info → PyGeodesy-24.4.18.dist-info}/RECORD +20 -20
- pygeodesy/__init__.py +1 -1
- pygeodesy/albers.py +12 -19
- pygeodesy/auxilats/auxLat.py +3 -3
- pygeodesy/deprecated/__init__.py +1 -1
- pygeodesy/deprecated/classes.py +14 -1
- pygeodesy/ellipsoids.py +3 -3
- pygeodesy/elliptic.py +10 -11
- pygeodesy/errors.py +27 -28
- pygeodesy/fmath.py +64 -65
- pygeodesy/fsums.py +290 -215
- pygeodesy/lazily.py +3 -3
- pygeodesy/ltp.py +11 -11
- pygeodesy/osgr.py +24 -24
- pygeodesy/resections.py +16 -24
- pygeodesy/triaxials.py +4 -4
- pygeodesy/vector2d.py +9 -8
- {PyGeodesy-24.4.12.dist-info → PyGeodesy-24.4.18.dist-info}/WHEEL +0 -0
- {PyGeodesy-24.4.12.dist-info → PyGeodesy-24.4.18.dist-info}/top_level.txt +0 -0
pygeodesy/lazily.py
CHANGED
|
@@ -256,7 +256,7 @@ _ALL_LAZY = _NamedEnum_RO(_name='_ALL_LAZY',
|
|
|
256
256
|
'crosserrors', 'exception_chaining', 'isError', 'limiterrors', 'rangerrors'),
|
|
257
257
|
etm=_i('Etm', 'ETMError', 'ExactTransverseMercator',
|
|
258
258
|
'parseETM5', 'toEtm8'),
|
|
259
|
-
fmath=_i('Fdot', 'Fhorner', 'Fhypot', 'Fpolynomial', 'Fpowers', '
|
|
259
|
+
fmath=_i('Fdot', 'Fhorner', 'Fhypot', 'Fpolynomial', 'Fpowers', 'Fcbrt', 'Froot', 'Fsqrt',
|
|
260
260
|
'bqrt', 'cbrt', 'cbrt2', 'euclid', 'euclid_',
|
|
261
261
|
'facos1', 'fasin1', 'fatan', 'fatan1', 'fatan2', 'favg',
|
|
262
262
|
'fdot', 'fdot3', 'fmean', 'fmean_', 'fhorner', 'fidw', 'fpolynomial',
|
|
@@ -407,7 +407,7 @@ _ALL_DEPRECATED = _NamedEnum_RO(_name='_ALL_DEPRECATED',
|
|
|
407
407
|
deprecated=_i('bases', 'datum', 'nvector', # DEPRECATED modules and ...
|
|
408
408
|
'rhumbaux', 'rhumbBase', 'rhumbsolve', 'rhumbx'), # ... names
|
|
409
409
|
deprecated_bases=_i('LatLonHeightBase', 'points2'),
|
|
410
|
-
deprecated_classes=_i('ClipCS3Tuple', 'EasNorExact4Tuple', 'EcefCartesian',
|
|
410
|
+
deprecated_classes=_i('ClipCS3Tuple', 'EasNorExact4Tuple', 'EcefCartesian', 'Fn_rt',
|
|
411
411
|
'HeightIDW', 'HeightIDW2', 'HeightIDW3', 'Helmert7Tuple',
|
|
412
412
|
'LatLonExact4Tuple', 'NearestOn4Tuple', 'Ned3Tuple',
|
|
413
413
|
'RefFrameError', 'Rhumb7Tuple', 'RhumbOrder2Tuple',
|
|
@@ -504,7 +504,7 @@ class _ALL_MODS(object):
|
|
|
504
504
|
_ALL_MODS = _ALL_MODS() # PYCHOK singleton
|
|
505
505
|
|
|
506
506
|
__all__ = _ALL_LAZY.lazily
|
|
507
|
-
__version__ = '24.04.
|
|
507
|
+
__version__ = '24.04.17'
|
|
508
508
|
|
|
509
509
|
|
|
510
510
|
def _ALL_OTHER(*objs):
|
pygeodesy/ltp.py
CHANGED
|
@@ -22,7 +22,7 @@ from pygeodesy.ecef import _EcefBase, EcefKarney, _llhn4, _xyzn4
|
|
|
22
22
|
from pygeodesy.errors import _NotImplementedError, _TypesError, _ValueError, \
|
|
23
23
|
_xattr, _xkwds, _xkwds_get
|
|
24
24
|
from pygeodesy.fmath import fabs, fdot, Fhorner
|
|
25
|
-
from pygeodesy.fsums import _floor,
|
|
25
|
+
from pygeodesy.fsums import _floor, _Fsumf_, fsumf_, fsum1f_
|
|
26
26
|
from pygeodesy.interns import NN, _0_, _COMMASPACE_, _DOT_, _ecef_, _height_, \
|
|
27
27
|
_invalid_, _lat0_, _lon0_, _ltp_, _M_, _name_, _too_
|
|
28
28
|
# from pygeodesy.lazily import _ALL_LAZY # from vector3d
|
|
@@ -42,7 +42,7 @@ from pygeodesy.vector3d import _ALL_LAZY, Vector3d
|
|
|
42
42
|
# from math import fabs, floor as _floor # from .fmath, .fsums
|
|
43
43
|
|
|
44
44
|
__all__ = _ALL_LAZY.ltp
|
|
45
|
-
__version__ = '24.04.
|
|
45
|
+
__version__ = '24.04.14'
|
|
46
46
|
|
|
47
47
|
_height0_ = _height_ + _0_
|
|
48
48
|
_narrow_ = 'narrow'
|
|
@@ -964,15 +964,15 @@ class ChLVa(_ChLV, LocalCartesian):
|
|
|
964
964
|
a, b, h = _ChLV._YXh_2abh3(Y, X, h_)
|
|
965
965
|
ab_d, a2, b2 = ChLV._ab_d, a**2, b**2
|
|
966
966
|
|
|
967
|
-
lat =
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
lon =
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
967
|
+
lat = _Fsumf_(16.9023892, 3.238272 * b,
|
|
968
|
+
-0.270978 * a2,
|
|
969
|
+
-0.002528 * b2,
|
|
970
|
+
-0.0447 * a2 * b,
|
|
971
|
+
-0.014 * b2 * b).fover(ab_d)
|
|
972
|
+
lon = _Fsumf_( 2.6779094, 4.728982 * a,
|
|
973
|
+
0.791484 * a * b,
|
|
974
|
+
0.1306 * a * b2,
|
|
975
|
+
-0.0436 * a * a2).fover(ab_d)
|
|
976
976
|
return self._ChLV9Tuple(False, M, name, Y, X, h_, lat, lon, h)
|
|
977
977
|
|
|
978
978
|
|
pygeodesy/osgr.py
CHANGED
|
@@ -34,8 +34,8 @@ from pygeodesy.datums import Datums, _ellipsoidal_datum, _WGS84
|
|
|
34
34
|
from pygeodesy.ellipsoidalBase import LatLonEllipsoidalBase as _LLEB
|
|
35
35
|
from pygeodesy.errors import _parseX, _TypeError, _ValueError, \
|
|
36
36
|
_xkwds, _xkwds_get
|
|
37
|
-
from pygeodesy.fmath import Fdot, fpowers
|
|
38
|
-
|
|
37
|
+
from pygeodesy.fmath import Fdot, fpowers
|
|
38
|
+
from pygeodesy.fsums import _Fsumf_
|
|
39
39
|
from pygeodesy.interns import MISSING, NN, _A_, _COLON_, _COMMA_, \
|
|
40
40
|
_COMMASPACE_, _DOT_, _ellipsoidal_, \
|
|
41
41
|
_latlon_, _not_, _SPACE_
|
|
@@ -121,10 +121,10 @@ class _NG(object):
|
|
|
121
121
|
@Property_RO
|
|
122
122
|
def Mabcd(self): # meridional coefficients (a, b, c, d)
|
|
123
123
|
n, n2, n3 = fpowers(self.ellipsoid.n, 3)
|
|
124
|
-
M = (
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
124
|
+
M = (_Fsumf_(4, 4 * n, 5 * n2, 5 * n3) / 4,
|
|
125
|
+
_Fsumf_( 24 * n, 24 * n2, 21 * n3) / 8,
|
|
126
|
+
_Fsumf_( 15 * n2, 15 * n3) / 8,
|
|
127
|
+
(35 * n3 / 24))
|
|
128
128
|
return M
|
|
129
129
|
|
|
130
130
|
def Mabcd0(self, a): # meridional arc, scaled
|
|
@@ -327,10 +327,10 @@ class Osgr(_NamedBase):
|
|
|
327
327
|
e0 = self.easting - NG.eas0
|
|
328
328
|
n0 = m = self.northing - NG.nor0
|
|
329
329
|
|
|
330
|
-
_M =
|
|
331
|
-
a0 =
|
|
332
|
-
a =
|
|
333
|
-
_A =
|
|
330
|
+
_M = NG.Mabcd0
|
|
331
|
+
a0 = NG.a0
|
|
332
|
+
a = NG.phi0
|
|
333
|
+
_A = _Fsumf_(a).fsum_
|
|
334
334
|
for self._iteration in range(1, _TRIPS):
|
|
335
335
|
a = _A(m / a0)
|
|
336
336
|
m = n0 - _M(a) # meridional arc
|
|
@@ -354,14 +354,14 @@ class Osgr(_NamedBase):
|
|
|
354
354
|
d2 = d**2
|
|
355
355
|
|
|
356
356
|
a = (d2 * ta * (-1 + # Horner-like
|
|
357
|
-
d2 / 12 * (
|
|
358
|
-
d2 / 30 *
|
|
357
|
+
d2 / 12 * (_Fsumf_( 5, 3 * ta2, -9 * ta2 * n2, n2) -
|
|
358
|
+
d2 / 30 * _Fsumf_(61, 90 * ta2, 45 * ta4)))).fsum_(a)
|
|
359
359
|
|
|
360
|
-
b = (d / ca * (1 - # Horner-like
|
|
361
|
-
d2 / 6 * (
|
|
362
|
-
d2 / 20 * (
|
|
363
|
-
d2 / 42 *
|
|
364
|
-
|
|
360
|
+
b = (d / ca * ( 1 - # Horner-like
|
|
361
|
+
d2 / 6 * (_Fsumf_(v_r, 2 * ta2) -
|
|
362
|
+
d2 / 20 * (_Fsumf_( 5, 28 * ta2, 24 * ta4) +
|
|
363
|
+
d2 / 42 * _Fsumf_(61, 662 * ta2, 1320 * ta4,
|
|
364
|
+
720 * ta2 * ta4))))).fsum_(NG.lam0)
|
|
365
365
|
|
|
366
366
|
r = _LLEB(degrees90(a), degrees180(b), datum=self.datum, name=self.name)
|
|
367
367
|
r._iteration = self._iteration # only ellipsoidal LatLon
|
|
@@ -652,14 +652,14 @@ def toOsgr(latlon, lon=None, kTM=False, datum=_WGS84, Osgr=Osgr, name=NN, # MCC
|
|
|
652
652
|
ta2 = -(ta**2)
|
|
653
653
|
ta4 = ta2**2
|
|
654
654
|
|
|
655
|
-
e = (d * v * (1 + # Horner-like
|
|
656
|
-
d2 / 6 * (
|
|
657
|
-
d2 / 20 *
|
|
658
|
-
|
|
655
|
+
e = (d * v * ( 1 + # Horner-like
|
|
656
|
+
d2 / 6 * (_Fsumf_(v_r, ta2) +
|
|
657
|
+
d2 / 20 * _Fsumf_(5, 18 * ta2, ta4, 14 * n2,
|
|
658
|
+
58 * n2 * ta2)))).fsum_(NG.eas0)
|
|
659
659
|
|
|
660
|
-
n = (d * t * (1 + # Horner-like
|
|
661
|
-
d2 / 12 * (
|
|
662
|
-
d2 / 30 *
|
|
660
|
+
n = (d * t * ( 1 + # Horner-like
|
|
661
|
+
d2 / 12 * (_Fsumf_( 5, ta2, 9 * n2) +
|
|
662
|
+
d2 / 30 * _Fsumf_(61, ta4, 58 * ta2)))).fsum_(m0, NG.nor0)
|
|
663
663
|
|
|
664
664
|
p, kwds = _prec_kwds2(**prec_Osgr_kwds)
|
|
665
665
|
if p is not MISSING:
|
pygeodesy/resections.py
CHANGED
|
@@ -20,7 +20,7 @@ from pygeodesy.constants import EPS, EPS0, EPS02, INT0, PI, PI2, PI_2, PI_4, \
|
|
|
20
20
|
from pygeodesy.errors import _and, _or, TriangleError, _ValueError, _xcallable, \
|
|
21
21
|
_xkwds, _xkwds_pop2
|
|
22
22
|
from pygeodesy.fmath import favg, Fdot, fidw, fmean, hypot, hypot2_
|
|
23
|
-
from pygeodesy.fsums import
|
|
23
|
+
from pygeodesy.fsums import _Fsumf_, fsumf_, fsum1, fsum1f_
|
|
24
24
|
from pygeodesy.interns import _a_, _A_, _area_, _b_, _B_, _c_, _C_, _coincident_, \
|
|
25
25
|
_colinear_, _d_, _eps_, _invalid_, _negative_, _not_, \
|
|
26
26
|
_rIn_, _SPACE_
|
|
@@ -34,7 +34,7 @@ from pygeodesy.vector3d import _otherV3d, Vector3d
|
|
|
34
34
|
from math import cos, atan2, degrees, fabs, radians, sin, sqrt
|
|
35
35
|
|
|
36
36
|
__all__ = _ALL_LAZY.resections
|
|
37
|
-
__version__ = '24.04.
|
|
37
|
+
__version__ = '24.04.14'
|
|
38
38
|
|
|
39
39
|
_concyclic_ = 'concyclic'
|
|
40
40
|
_PA_ = 'PA'
|
|
@@ -57,14 +57,6 @@ class Collins5Tuple(_NamedTuple):
|
|
|
57
57
|
_Units_ = (_Pass, _Pass, Distance, Distance, Distance)
|
|
58
58
|
|
|
59
59
|
|
|
60
|
-
def _F1(*xs): # class
|
|
61
|
-
'''(INTERNAL) An L{Fsum}, 1-primed.
|
|
62
|
-
'''
|
|
63
|
-
F = Fsum(_1_0, *xs)
|
|
64
|
-
F += _N_1_0
|
|
65
|
-
return F
|
|
66
|
-
|
|
67
|
-
|
|
68
60
|
class ResectionError(_ValueError):
|
|
69
61
|
'''Error raised for issues in L{pygeodesy.resections}.
|
|
70
62
|
'''
|
|
@@ -376,8 +368,8 @@ def _pierlot3(B1, B2, B3, a12, a23, useZ, cot):
|
|
|
376
368
|
cot31 = cot(fsum1f_(c12 * s23, s12 * c23), # s31
|
|
377
369
|
fsum1f_(s12 * s23, -c12 * c23)) # c31
|
|
378
370
|
|
|
379
|
-
K =
|
|
380
|
-
|
|
371
|
+
K = _Fsumf_(x3_ * x1_, cot31 * (y3_ * x1_),
|
|
372
|
+
y3_ * y1_, -cot31 * (x3_ * y1_))
|
|
381
373
|
if K:
|
|
382
374
|
cot12 = cot(s12, c12)
|
|
383
375
|
cot23 = cot(s23, c23)
|
|
@@ -392,16 +384,16 @@ def _pierlot3(B1, B2, B3, a12, a23, useZ, cot):
|
|
|
392
384
|
# y31 = y3_ + y1_ - cot31 * (x3_ - x1_)
|
|
393
385
|
|
|
394
386
|
# x12 - x23 = x1_ + cot12 * y1_ - x3_ + cot23 * y3_
|
|
395
|
-
X12_23 =
|
|
387
|
+
X12_23 = _Fsumf_(x1_, cot12 * y1_, -x3_, cot23 * y3_)
|
|
396
388
|
# y12 - y23 = y1_ - cot12 * x1_ - y3_ - cot23 * x3_
|
|
397
|
-
Y12_23 =
|
|
389
|
+
Y12_23 = _Fsumf_(y1_, -cot12 * x1_, -y3_, -cot23 * x3_)
|
|
398
390
|
|
|
399
391
|
# x31 - x23 = x3_ + x1_ + cot31 * (y3_ - y1_) - x3_ + cot23 * y3_
|
|
400
392
|
# = x1_ + cot31 * y3_ - cot31 * y1_ + cot23 * y3_
|
|
401
|
-
X31_23 =
|
|
393
|
+
X31_23 = _Fsumf_(x1_, -cot31 * y1_, cot31 * y3_, cot23 * y3_)
|
|
402
394
|
# y31 - y23 = y3_ + y1_ - cot31 * (x3_ - x1_) - y3_ - cot23 * x3_
|
|
403
395
|
# = y1_ - cot31 * x3_ + cot31 * x1_ - cot23 * x3_
|
|
404
|
-
Y31_23 =
|
|
396
|
+
Y31_23 = _Fsumf_(y1_, cot31 * x1_, -cot31 * x3_, -cot23 * x3_)
|
|
405
397
|
|
|
406
398
|
# d = (x12 - x23) * (y23 - y31) + (x31 - x23) * (y12 - y23)
|
|
407
399
|
# = (x31 - x23) * (y12 - y23) - (x12 - x23) * (y31 - y23)
|
|
@@ -495,7 +487,7 @@ def _pierlotx3(a_z_Bs, useZ, cot, Cs):
|
|
|
495
487
|
x1_, y1_, _ = B1.minus(B3).xyz
|
|
496
488
|
x2_, y2_, _ = B2.minus(B3).xyz
|
|
497
489
|
|
|
498
|
-
K =
|
|
490
|
+
K = _Fsumf_(y1_ * x2_, -x1_ * y2_)
|
|
499
491
|
if K:
|
|
500
492
|
cot23 = cot(*sincos2d(a23))
|
|
501
493
|
|
|
@@ -506,15 +498,15 @@ def _pierlotx3(a_z_Bs, useZ, cot, Cs):
|
|
|
506
498
|
# y31 = y1_ - cot23 * x1_
|
|
507
499
|
|
|
508
500
|
# x31 - x23 = x1_ + cot23 * y1_ - x2_ - cot23 * y2_
|
|
509
|
-
X31_23 =
|
|
501
|
+
X31_23 = _Fsumf_(x1_, cot23 * y1_, -x2_, -cot23 * y2_)
|
|
510
502
|
# y31 - y23 = y1_ - cot23 * x1_ - y2_ + cot23 * x2_
|
|
511
|
-
Y31_23 =
|
|
503
|
+
Y31_23 = _Fsumf_(y1_, -cot23 * x1_, -y2_, cot23 * x2_)
|
|
512
504
|
|
|
513
505
|
# d = (x31 - x23) * (x2_ - x1_) + (y31 - y23) * (y2_ - y1_)
|
|
514
506
|
# x = (D * B3.x - K * Y31_23).fover(d)
|
|
515
507
|
# y = (D * B3.y + K * X31_23).fover(d)
|
|
516
|
-
x, y = _pierlotxy2(B3, K, Y31_23, X31_23, (X31_23 *
|
|
517
|
-
Y31_23 *
|
|
508
|
+
x, y = _pierlotxy2(B3, K, Y31_23, X31_23, (X31_23 * _Fsumf_(x2_, -x1_) +
|
|
509
|
+
Y31_23 * _Fsumf_(y2_, -y1_)))
|
|
518
510
|
else:
|
|
519
511
|
x, y, _ = B3.xyz
|
|
520
512
|
return x, y, _zidw(x, y, useZ, B1, B2, B3)
|
|
@@ -974,7 +966,7 @@ def wildberger3(a, b, c, alpha, beta, R3=min):
|
|
|
974
966
|
def _vpa(r3, q2, q3, s2, s3):
|
|
975
967
|
r1 = s2 * q3 / s3
|
|
976
968
|
r = r1 * r3 * _4_0
|
|
977
|
-
n = (r -
|
|
969
|
+
n = (r - _Fsumf_(r1, r3, -q2)**2).fover(s3)
|
|
978
970
|
if n < 0 or r < EPS0:
|
|
979
971
|
raise ValueError(_coincident_)
|
|
980
972
|
return sqrt((n / r) * q3) if n else _0_0
|
|
@@ -994,11 +986,11 @@ def wildberger3(a, b, c, alpha, beta, R3=min):
|
|
|
994
986
|
raise ValueError(_or(_coincident_, _colinear_))
|
|
995
987
|
|
|
996
988
|
q4 = hypot2_(*q) * _2_0 # a**4 + ...
|
|
997
|
-
Qs =
|
|
989
|
+
Qs = _Fsumf_(*q) # == hypot2_(a, b, c)
|
|
998
990
|
d0 = (Qs**2 - q4).fmul(s1 * s2).fover(s3)
|
|
999
991
|
if d0 < 0:
|
|
1000
992
|
raise ValueError(_negative_)
|
|
1001
|
-
s +=
|
|
993
|
+
s += _Fsumf_(*s), # == fsum1(s),
|
|
1002
994
|
C0 = Fdot(s, q1, q2, q3, -Qs * _0_5)
|
|
1003
995
|
r3 = C0.fover(-s3) # C0 /= -s3
|
|
1004
996
|
if d0 > EPS02: # > c0
|
pygeodesy/triaxials.py
CHANGED
|
@@ -40,7 +40,7 @@ from pygeodesy.datums import Datum, _spherical_datum, _WGS84, Ellipsoid, _EWGS8
|
|
|
40
40
|
# from pygeodesy.elliptic import Elliptic # _MODS
|
|
41
41
|
# from pygeodesy.errors import _ValueError # from .basics
|
|
42
42
|
from pygeodesy.fmath import Fdot, fdot, fmean_, hypot, hypot_, norm2, sqrt0
|
|
43
|
-
from pygeodesy.fsums import
|
|
43
|
+
from pygeodesy.fsums import _Fsumf_, fsumf_, fsum1f_
|
|
44
44
|
from pygeodesy.interns import NN, _a_, _b_, _beta_, _c_, _distant_, _finite_, \
|
|
45
45
|
_height_, _inside_, _near_, _negative_, _not_, \
|
|
46
46
|
_NOTEQUAL_, _null_, _opposite_, _outside_, _SPACE_, \
|
|
@@ -59,7 +59,7 @@ from pygeodesy.vector3d import _otherV3d, Vector3d, _ALL_LAZY, _MODS
|
|
|
59
59
|
from math import atan2, fabs, sqrt
|
|
60
60
|
|
|
61
61
|
__all__ = _ALL_LAZY.triaxials
|
|
62
|
-
__version__ = '24.
|
|
62
|
+
__version__ = '24.04.14'
|
|
63
63
|
|
|
64
64
|
_not_ordered_ = _not_('ordered')
|
|
65
65
|
_omega_ = 'omega'
|
|
@@ -805,8 +805,8 @@ class Triaxial(Triaxial_):
|
|
|
805
805
|
c2_a2 = -self._1e2ac # == -(c/a)**2
|
|
806
806
|
a2c2_a2 = self. e2ac # (a**2 - c**2) / a**2 == 1 - (c/a)**2
|
|
807
807
|
|
|
808
|
-
x2 =
|
|
809
|
-
z2 =
|
|
808
|
+
x2 = _Fsumf_(_1_0, -b2_a2 * sa**2, c2_a2 * ca**2).fover(a2c2_a2)
|
|
809
|
+
z2 = _Fsumf_(c2_a2, sb**2, b2_a2 * cb**2).fover(a2c2_a2)
|
|
810
810
|
|
|
811
811
|
x, y, z = self._abc3
|
|
812
812
|
x *= cb * sqrt0(x2, Error=TriaxialError)
|
pygeodesy/vector2d.py
CHANGED
|
@@ -12,7 +12,7 @@ from pygeodesy.constants import EPS, EPS0, EPS02, EPS4, INF, INT0, \
|
|
|
12
12
|
from pygeodesy.errors import _and, _AssertionError, IntersectionError, NumPyError, \
|
|
13
13
|
PointsError, TriangleError, _xError, _xkwds
|
|
14
14
|
from pygeodesy.fmath import fabs, fdot, hypot, hypot2_, sqrt
|
|
15
|
-
from pygeodesy.fsums import
|
|
15
|
+
from pygeodesy.fsums import _Fsumf_, fsumf_, fsum1f_
|
|
16
16
|
from pygeodesy.interns import NN, _a_, _and_, _b_, _c_, _center_, _coincident_, \
|
|
17
17
|
_colinear_, _COMMASPACE_, _concentric_, _few_, \
|
|
18
18
|
_intersection_, _invalid_, _near_, _no_, _of_, \
|
|
@@ -30,7 +30,7 @@ from contextlib import contextmanager
|
|
|
30
30
|
# from math import fabs, sqrt # from .fmath
|
|
31
31
|
|
|
32
32
|
__all__ = _ALL_LAZY.vector2d
|
|
33
|
-
__version__ = '
|
|
33
|
+
__version__ = '24.04.18'
|
|
34
34
|
|
|
35
35
|
_cA_ = 'cA'
|
|
36
36
|
_cB_ = 'cB'
|
|
@@ -354,10 +354,11 @@ def _meeus4(A, point2, point3, circum=False, useZ=True, clas=None, **clas_kwds):
|
|
|
354
354
|
a, c, A, C = c, a, C, A
|
|
355
355
|
|
|
356
356
|
if a > EPS02 and (circum or a < (b + c)): # circumradius
|
|
357
|
-
b =
|
|
358
|
-
c =
|
|
359
|
-
R =
|
|
360
|
-
|
|
357
|
+
b = sqrt(b / a)
|
|
358
|
+
c = sqrt(c / a)
|
|
359
|
+
R = _Fsumf_(_1_0, b, c) * _Fsumf_(_1_0, b, -c) * \
|
|
360
|
+
_Fsumf_(_1_0, -b, c) * _Fsumf_(_N_1_0, b, c)
|
|
361
|
+
r = R.fover(a)
|
|
361
362
|
if r < EPS02:
|
|
362
363
|
raise IntersectionError(_coincident_ if b < EPS0 or c < EPS0 else (
|
|
363
364
|
_colinear_ if _iscolinearWith(A, B, C) else _invalid_))
|
|
@@ -503,8 +504,8 @@ def _radii11ABC(point1, point2, point3, useZ=True):
|
|
|
503
504
|
b = C.minus(A).length
|
|
504
505
|
c = A.minus(B).length
|
|
505
506
|
|
|
506
|
-
S =
|
|
507
|
-
s =
|
|
507
|
+
S = _Fsumf_(a, b, c) * _0_5
|
|
508
|
+
s = float(S) # semi-perimeter
|
|
508
509
|
if s > EPS0:
|
|
509
510
|
rs = float(S - a), float(S - b), float(S - c)
|
|
510
511
|
r3, r2, r1 = sorted(rs) # r3 <= r2 <= r1
|
|
File without changes
|
|
File without changes
|