Package pygeodesy :: Module resections
[frames] | no frames]

Module resections

3-Point resection functions cassini, collins5, pierlot, pierlotx and tienstra7, survey functions snellius3 and wildberger3 and triangle functions triAngle, triAngle5, triSide, triSide2 and triSide4.


Note: Functions pierlot and pierlotx are transcoded to Python with permission from triangulationPierlot and Pierlot.

Version: 24.09.23

Classes
  Collins5Tuple
5-Tuple (pointP, pointH, a, b, c) with survey pointP, auxiliary pointH, each an instance of pointA's (sub-)class and triangle sides a, b and c in meter, conventionally.
  ResectionError
Error raised for issues in pygeodesy.resections.
  Survey3Tuple
3-Tuple (PA, PB, PC) with distance from survey point P to each of the triangle corners A, B and C in meter, conventionally.
  Tienstra7Tuple
7-Tuple (pointP, A, B, C, a, b, c) with survey pointP, interior triangle angles A, B and C in degrees and triangle sides a, b and c in meter, conventionally.
  TriAngle5Tuple
5-Tuple (radA, radB, radC, rIn, area) with the interior angles at triangle corners A, B and C in radians, the InCircle radius rIn aka inradius in meter and the triangle area in meter squared, conventionally.
  TriSide2Tuple
2-Tuple (a, radA) with triangle side a in meter, conventionally and angle radA at the opposite triangle corner in radians.
  TriSide4Tuple
4-Tuple (a, b, radC, d) with interior angle radC at triangle corner C in radianswith the length of triangle sides a and b and with triangle height d perpendicular to triangle side c, in the same units as triangle sides a and b.
Functions
 
cassini(pointA, pointB, pointC, alpha, beta, useZ=False, **Clas_and_kwds)
3-Point resection using Cassini's method.
 
collins5(pointA, pointB, pointC, alpha, beta, useZ=False, **Clas_and_kwds)
3-Point resection using Collins' method.
 
pierlot(point1, point2, point3, alpha12, alpha23, useZ=False, eps=2.220446049250313e-16, **Clas_and_kwds)
3-Point resection using Pierlot's method ToTal with approximate limits for the (pseudo-)singularities.
 
pierlotx(point1, point2, point3, alpha1, alpha2, alpha3, useZ=False, **Clas_and_kwds)
3-Point resection using Pierlot's method ToTal with exact limits for the (pseudo-)singularities.
 
snellius3(a, b, degC, alpha, beta)
Snellius' surveying using Snellius Pothenot.
 
tienstra7(pointA, pointB, pointC, alpha, beta=None, gamma=None, useZ=False, **Clas_and_kwds)
3-Point resection using Tienstra's formula.
 
triAngle(a, b, c)
Compute one angle of a triangle.
 
triAngle5(a, b, c)
Compute the angles of a triangle.
 
triArea(a, b, c)
Compute the area of a triangle using Heron's stable formula.
 
triSide(a, b, radC)
Compute one side of a triangle.
 
triSide2(b, c, radB)
Compute a side and its opposite angle of a triangle.
 
triSide4(radA, radB, c)
Compute two sides and the height of a triangle.
 
wildberger3(a, b, c, alpha, beta, R3=<built-in function min>)
Snellius' surveying using Rational Trigonometry.
Variables
  __all__ = _ALL_LAZY.resections
Function Details

cassini (pointA, pointB, pointC, alpha, beta, useZ=False, **Clas_and_kwds)

 

3-Point resection using Cassini's method.

Arguments:
  • pointA - First point (Cartesian, Vector3d, Vector3Tuple, Vector4Tuple or Vector2Tuple if useZ=False).
  • pointB - Second point (Cartesian, Vector3d, Vector3Tuple, Vector4Tuple or Vector2Tuple if useZ=False).
  • pointC - Center point (Cartesian, Vector3d, Vector3Tuple, Vector4Tuple or Vector2Tuple if useZ=False).
  • alpha - Angle subtended by triangle side pointA to pointC (degrees, non-negative).
  • beta - Angle subtended by triangle side pointB to pointC (degrees, non-negative).
  • useZ - If True, use and interpolate the Z component, otherwise force z=INT0 (bool).
  • Clas_and_kwds - Optional class Clas=pointA.classof to return the survey point with optionally other Clas keyword arguments to instantiate the survey point.
Returns:
The survey point, an instance of Clas or pointA's (sub-)class.
Raises:
  • ResectionError - Near-coincident, -colinear or -concyclic points or negative or invalid alpha or beta.
  • TypeError - Invalid pointA, pointB or pointM.

Note: Typically, pointC is between pointA and pointB.

See Also: Three Point Resection Problem and functions collins5, pierlot, pierlotx and tienstra7.

collins5 (pointA, pointB, pointC, alpha, beta, useZ=False, **Clas_and_kwds)

 

3-Point resection using Collins' method.

Arguments:
  • pointA - First point (Cartesian, Vector3d, Vector3Tuple, Vector4Tuple or Vector2Tuple if useZ=False).
  • pointB - Second point (Cartesian, Vector3d, Vector3Tuple, Vector4Tuple or Vector2Tuple if useZ=False).
  • pointC - Center point (Cartesian, Vector3d, Vector3Tuple, Vector4Tuple or Vector2Tuple if useZ=False).
  • alpha - Angle subtended by triangle side b from pointA to pointC (degrees, non-negative).
  • beta - Angle subtended by triangle side a from pointB to pointC (degrees, non-negative).
  • useZ - If True, use and interpolate the Z component, otherwise force z=INT0 (bool).
  • Clas_and_kwds - Optional class Clas=pointA.classof to return the survey point with optionally other Clas keyword arguments to instantiate the survey point.
Returns:
Collins5Tuple(pointP, pointH, a, b, c) with survey pointP, auxiliary pointH, each an instance of Clas or pointA's (sub-)class and triangle sides a, b and c in meter, conventionally.
Raises:
  • ResectionError - Near-coincident, -colinear or -concyclic points or negative or invalid alpha or beta.
  • TypeError - Invalid pointA, pointB or pointM.

Note: Typically, pointC is between pointA and pointB.

See Also: Collins' methode and functions cassini, pierlot, pierlotx and tienstra7.

pierlot (point1, point2, point3, alpha12, alpha23, useZ=False, eps=2.220446049250313e-16, **Clas_and_kwds)

 

3-Point resection using Pierlot's method ToTal with approximate limits for the (pseudo-)singularities.

Arguments:
  • point1 - First point (Cartesian, Vector3d, Vector3Tuple, Vector4Tuple or Vector2Tuple if useZ=False).
  • point2 - Second point (Cartesian, Vector3d, Vector3Tuple, Vector4Tuple or Vector2Tuple if useZ=False).
  • point3 - Third point (Cartesian, Vector3d, Vector3Tuple, Vector4Tuple or Vector2Tuple if useZ=False).
  • alpha12 - Angle subtended from point1 to point2 or alpha2 - alpha1 (degrees).
  • alpha23 - Angle subtended from point2 to point3 or alpha3 - alpha2(degrees).
  • useZ - If True, interpolate the survey point's Z component, otherwise use z=INT0 (bool).
  • eps - Tolerance for cot (pseudo-)singularities (float).
  • Clas_and_kwds - Optional class Clas=point1.classof to return the survey point with optionally other Clas keyword arguments to instantiate the survey point.
Returns:
The survey (or robot) point, an instance of Clas or point1's (sub-)class.
Raises:
  • ResectionError - Near-coincident, -colinear or -concyclic points or invalid alpha12 or alpha23 or non-positive eps.
  • TypeError - Invalid point1, point2 or point3.

pierlotx (point1, point2, point3, alpha1, alpha2, alpha3, useZ=False, **Clas_and_kwds)

 

3-Point resection using Pierlot's method ToTal with exact limits for the (pseudo-)singularities.

Arguments:
  • point1 - First point (Cartesian, Vector3d, Vector3Tuple, Vector4Tuple or Vector2Tuple if useZ=False).
  • point2 - Second point (Cartesian, Vector3d, Vector3Tuple, Vector4Tuple or Vector2Tuple if useZ=False).
  • point3 - Third point (Cartesian, Vector3d, Vector3Tuple, Vector4Tuple or Vector2Tuple if useZ=False).
  • alpha1 - Angle at point1 (degrees, counter-clockwise).
  • alpha2 - Angle at point2 (degrees, counter-clockwise).
  • alpha3 - Angle at point3 (degrees, counter-clockwise).
  • useZ - If True, interpolate the survey point's Z component, otherwise use z=INT0 (bool).
  • Clas_and_kwds - Optional class Clas=point1.classof to return the survey point with optionally other Clas keyword arguments to instantiate the survey point.
Returns:
The survey (or robot) point, an instance of Clas or point1's (sub-)class.
Raises:
  • ResectionError - Near-coincident, -colinear or -concyclic points or invalid alpha1, alpha2 or alpha3.
  • TypeError - Invalid point1, point2 or point3.

See Also: Pierlot's C function triangulationPierlot2 and function pierlot, cassini, collins5 and tienstra7.

snellius3 (a, b, degC, alpha, beta)

 

Snellius' surveying using Snellius Pothenot.

Arguments:
  • a - Length of the triangle side between corners B and C and opposite of triangle corner A (scalar, non-negative meter, conventionally).
  • b - Length of the triangle side between corners C and A and opposite of triangle corner B (scalar, non-negative meter, conventionally).
  • degC - Angle at triangle corner C, opposite triangle side c (non-negative degrees).
  • alpha - Angle subtended by triangle side b (non-negative degrees).
  • beta - Angle subtended by triangle side a (non-negative degrees).
Returns:
Survey3Tuple(PA, PB, PC) with distance from survey point P to each of the triangle corners A, B and C, same units as triangle sides a, b and c.
Raises:
  • TriangleError - Invalid a, b or degC or negative alpha or beta.

See Also: Function wildberger3.

tienstra7 (pointA, pointB, pointC, alpha, beta=None, gamma=None, useZ=False, **Clas_and_kwds)

 

3-Point resection using Tienstra's formula.

Arguments:
  • pointA - First point (Cartesian, Vector3d, Vector3Tuple, Vector4Tuple or Vector2Tuple if useZ=False).
  • pointB - Second point (Cartesian, Vector3d, Vector3Tuple, Vector4Tuple or Vector2Tuple if useZ=False).
  • pointC - Third point (Cartesian, Vector3d, Vector3Tuple, Vector4Tuple or Vector2Tuple if useZ=False).
  • alpha - Angle subtended by triangle side a from pointB to pointC (degrees, non-negative).
  • beta - Angle subtended by triangle side b from pointA to pointC (degrees, non-negative) or None if gamma is not None.
  • gamma - Angle subtended by triangle side c from pointA to pointB (degrees, non-negative) or None if beta is not None.
  • useZ - If True, use and interpolate the Z component, otherwise force z=INT0 (bool).
  • Clas_and_kwds - Optional class Clas=pointA.classof to return the survey point with optionally other Clas keyword arguments to instantiate the survey point.
Returns:
Tienstra7Tuple(pointP, A, B, C, a, b, c) with survey pointP, an instance of Clas or pointA's (sub-)class, with triangle angles A at pointA, B at pointB and C at pointC in degrees and with triangle sides a, b and c in meter, conventionally.
Raises:
  • ResectionError - Near-coincident, -colinear or -concyclic points or sum of alpha, beta and gamma not 360 or negative alpha, beta or gamma.
  • TypeError - Invalid pointA, pointB or pointC.

triAngle (a, b, c)

 

Compute one angle of a triangle.

Arguments:
  • a - Adjacent triangle side length (scalar, non-negative meter, conventionally).
  • b - Adjacent triangle side length (scalar, non-negative meter, conventionally).
  • c - Opposite triangle side length (scalar, non-negative meter, conventionally).
Returns:
Angle in radians at triangle corner C, opposite triangle side c.
Raises:

See Also: Functions triAngle5 and triSide.

triAngle5 (a, b, c)

 

Compute the angles of a triangle.

Arguments:
  • a - Length of the triangle side opposite of triangle corner A (scalar, non-negative meter, conventionally).
  • b - Length of the triangle side opposite of triangle corner B (scalar, non-negative meter, conventionally).
  • c - Length of the triangle side opposite of triangle corner C (scalar, non-negative meter, conventionally).
Returns:
TriAngle5Tuple(radA, radB, radC, rIn, area) with angles radA, radB and radC at triangle corners A, B and C, all in radians, the InCircle radius rIn aka inradius, same units as triangle sides a, b and c and the triangle area in those same units squared.
Raises:

See Also: Functions triAngle and triArea.

triArea (a, b, c)

 

Compute the area of a triangle using Heron's stable formula.

Arguments:
  • a - Length of the triangle side opposite of triangle corner A (scalar, non-negative meter, conventionally).
  • b - Length of the triangle side opposite of triangle corner B (scalar, non-negative meter, conventionally).
  • c - Length of the triangle side opposite of triangle corner C (scalar, non-negative meter, conventionally).
Returns:
The triangle area (float, conventionally meter or same units as a, b and c squared).
Raises:

triSide (a, b, radC)

 

Compute one side of a triangle.

Arguments:
  • a - Adjacent triangle side length (scalar, non-negative meter, conventionally).
  • b - Adjacent triangle side length (scalar, non-negative meter, conventionally).
  • radC - Angle included by sides a and b, opposite triangle side c (radians).
Returns:
Length of triangle side c, opposite triangle corner C and angle radC, same units as a and b.
Raises:

See Also: Functions sqrt_a, triAngle, triSide2 and triSide4.

triSide2 (b, c, radB)

 

Compute a side and its opposite angle of a triangle.

Arguments:
  • b - Adjacent triangle side length (scalar, non-negative meter, conventionally).
  • c - Adjacent triangle side length (scalar, non-negative meter, conventionally).
  • radB - Angle included by sides a and c, opposite triangle side b (radians).
Returns:
TriSide2Tuple(a, radA) with triangle angle radA in radians and length of the opposite triangle side a, same units as b and c.
Raises:

See Also: Functions sqrt_a, triSide and triSide4.

triSide4 (radA, radB, c)

 

Compute two sides and the height of a triangle.

Arguments:
  • radA - Angle at triangle corner A, opposite triangle side a (non-negative radians).
  • radB - Angle at triangle corner B, opposite triangle side b (non-negative radians).
  • c - Length of triangle side between triangle corners A and B, (scalar, non-negative meter, conventionally).
Returns:
TriSide4Tuple(a, b, radC, d) with triangle sides a and b and triangle height d perpendicular to triangle side c, all in the same units as c and interior angle radC in radians at triangle corner C, opposite triangle side c.
Raises:

See Also: Triangulation, Surveying and functions sqrt_a, triSide and triSide2.

wildberger3 (a, b, c, alpha, beta, R3=<built-in function min>)

 

Snellius' surveying using Rational Trigonometry.

Arguments:
  • a - Length of the triangle side between corners B and C and opposite of triangle corner A (scalar, non-negative meter, conventionally).
  • b - Length of the triangle side between corners C and A and opposite of triangle corner B (scalar, non-negative meter, conventionally).
  • c - Length of the triangle side between corners A and B and opposite of triangle corner C (scalar, non-negative meter, conventionally).
  • alpha - Angle subtended by triangle side b (degrees, non-negative).
  • beta - Angle subtended by triangle side a (degrees, non-negative).
  • R3 - Callable to determine R3 from (R3 - C)**2 = D, typically standard Python function min or max, invoked with 2 arguments.
Returns:
Survey3Tuple(PA, PB, PC) with distance from survey point P to each of the triangle corners A, B and C, same units as a, b and c.
Raises:
  • TriangleError - Invalid a, b or c or negative alpha or beta or R3 not callable.