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

# Module resections

3-Point resection functions cassini, collins, pierlot and tienstra, survey functions snellius3 and wildberger3 and triangle functions triAngle, triAngle4, triSide, triSide2 and triSide4.

Note: Function pierlot transcoded with permission from triangulationPierlot and Pierlot.

Version: 21.10.28

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.
| 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.
| TriAngle4Tuple 4-Tuple `(radA, radB, radC, rIn)` with the interior angles at triangle corner `A`, `B` and `C` and the `InCircle` radius `rIn` aka `inradius`.
| TriSide2Tuple 2-Tuple `(a, radA)` with triangle side `a` (`meter` conventionally) and the opposite triangle angle `radA` (`radians`).
| TriSide4Tuple 4-Tuple `(a, b, radC, d)` with the length of triangle sides `a` and `b`, the interior angle `radC` at triangle corner `radC` (`radians`) and triangle height `d`, perpendicular to triangle side `c`.

Functions
cassini(pointA, pointB, pointC, alpha, beta, useZ=False, Clas=None, **Clas_kwds) 3-Point resection using Cassini's method. |
collins(pointA, pointB, pointC, alpha, beta, useZ=False, Clas=None, **Clas_kwds) 3-Point resection using Collins' method. |
pierlot(point1, point2, point3, alpha12, alpha23, useZ=False, Clas=None, **Clas_kwds) 3-Point resection using Pierlot's method `ToTal`. |
snellius3(a, b, degC, alpha, beta) Snellius' surveying using Snellius Pothenot. |
tienstra(pointA, pointB, pointC, alpha, beta=None, gamma=None, useZ=False, Clas=None, **Clas_kwds) 3-Point resection using Tienstra's formula. |
triAngle(a, b, c) Compute an interior angle of a triangle. |
triAngle4(a, b, c) Compute the angles of a triangle side. |
triSide(a, b, radC) Compute the length of a triangle side. |
triSide2(b, c, radB) Compute the length of a triangle side and the angle. |
triSide4(radA, radB, c) Compute the length of two triangle sides and the triangle height. |
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=None, **Clas_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=0` (`bool`). `Clas` - Optional class to return the survey and auxiliary point or `None` for `pointA`'s (sub-)class. `Clas_kwds` - Optional additional keyword argument for the survey and auxiliary point instance. Returns: The survey point, an instance of `Clas` or if `Clas is None` of `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 pygeodesy.collins, pygeodesy.pierlot and pygeodesy.tienstra.

### collins (pointA, pointB, pointC, alpha, beta, useZ=False, Clas=None, **Clas_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=0` (`bool`). `Clas` - Optional class to return the survey point or `None` for `pointA`'s (sub-)class. `Clas_kwds` - Optional additional keyword argument for the survey point instance. Returns: Collins5Tuple`(pointP, pointH, a, b, c)` with survey `pointP`, auxiliary `pointH`, each an instance of `Clas` or if `Clas is None` of `pointA`'s (sub-)class and triangle sides `a`, `b` and `c`. 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 pygeodesy.cassini, pygeodesy.pierlot and pygeodesy.tienstra.

### pierlot (point1, point2, point3, alpha12, alpha23, useZ=False, Clas=None, **Clas_kwds) |
3-Point resection using Pierlot's method `ToTal`. 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` (`degrees`). `alpha23` - Angle subtended from `point2` to `point3` (`degrees`). `useZ` - If `True`, interpolate the Z component, otherwise use `z=0` (`bool`). `Clas` - Optional class to return the survey point or `None` for `point1`'s (sub-)class. `Clas_kwds` - Optional additional keyword arguments for the survey point instance. Returns: The survey (or robot) point, an instance of `Clas` or if `Clas is None` of `point1`'s (sub-)class. Raises: `ResectionError` - Near-coincident, -colinear or -concyclic points or invalid `alpha12` or `alpha23`. `TypeError` - Invalid `point1`, `point2` or `point3`. Note: Points `point1`, `point2` and `point3` are ordered counter-clockwise. See Also: V. Pierlot, M. Van Droogenbroeck, "A New Three Object Triangulation Algorithm for Mobile Robot Positioning", Vincent Pierlot, Marc Van Droogenbroeck, "18 Triangulation Algorithms for 2D Positioning (also known as the Resection Problem)" and functions pygeodesy.cassini, pygeodesy.collins and pygeodesy.tienstra.

### snellius3 (a, b, degC, alpha, beta) |
Snellius' surveying using Snellius Pothenot. Arguments: `a` - Length of triangle side `BC`, opposite of triangle corner `A` (`scalar`, non-negative `meter` conventionally). `b` - Length of triangle side `AC`, opposite of triangle corner `B` (`scalar`, non-negative `meter` conventionally). `degC` - Angle at triangle corner `C`, opposite triangle side `c` (`degrees`, non-negative). `alpha` - Angle subtended by triangle side `b` (`degrees`, non-negative). `beta` - Angle subtended by triangle side `a` (`degrees`, non-negative). Returns: Snellius3Tuple`(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 `degC` or negative `alpha` or `beta`. See Also: Function pygeodesy.wildberger3.

### tienstra (pointA, pointB, pointC, alpha, beta=None, gamma=None, useZ=False, Clas=None, **Clas_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=0` (`bool`). `Clas` - Optional class to return the survey point or `None` for `pointA`'s (sub-)class. `Clas_kwds` - Optional additional keyword arguments for the survey point instance. Returns: Tienstra7Tuple`(pointP, A, B, C, a, b, c)` with survey `pointP`, an instance of `Clas` or if `Clas is None` of `pointA`'s (sub-)class and triangle angle `A` at `pointA`, `B` at `pointB` and `C` at `pointC` in `degrees` and triangle sides `a`, `b` and `c`. 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`. Note: Points `pointA`, `pointB` and `pointC` are ordered clockwise. See Also: 3-Point Resection Solver, V. Pierlot, M. Van Droogenbroeck, "A New Three Object Triangulation...", 18 Triangulation Algorithms... and functions pygeodesy.cassini, pygeodesy.collins and pygeodesy.pierlot.

### triAngle (a, b, c) |
Compute an interior 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 at triangle corner `C`, opposite triangle side `c` (`radians`). Raises: `TriangleError` - Invalid `a`, `b` or `c`. See Also: Function pygeodesy.triSide.

### triAngle4 (a, b, c) |
Compute the angles of a triangle side. Arguments: `a` - Length of triangle side `BC`, opposite of triangle corner `A` (`scalar`, non-negative `meter` conventionally). `b` - Length of triangle side `AC`, opposite of triangle corner `B` (`scalar`, non-negative `meter` conventionally). `c` - Length of triangle side `AB`, opposite of triangle corner `C` (`scalar`, non-negative `meter` conventionally). Returns: TriAngle4Tuple`(radA, radB, radC, rIn)` with the triangle angles at corner `A`, `B` and `C` (each in radians) and the `InCircle` radius `rIn` aka `inradius` (same units and triangle sides `a`, `b` and `c`). Raises: `TriangleError` - Invalid `a`, `b` or `b`.

### triSide (a, b, radC) |
Compute the length of a triangle side. 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 angle `rC` (same units as `a` and `b`). Raises: `TriangleError` - Invalid `a` or `b`.

### triSide2 (b, c, radB) |
Compute the length of a triangle side and the angle. 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` (radians) and the length of the opposite triangle side `a` (same units as `b` and `c`). Raises: `TriangleError` - Invalid `b` or `c` or either `b` or `radB` near zero and not both.

### triSide4 (radA, radB, c) |
Compute the length of two triangle sides and the triangle height. Arguments: `radA` - Angle at triangle corner `A`, opposite triangle side `a` (`scalar`, non-negative). `radB` - Angle at triangle corner `B`, opposite triangle side `b` (`scalar`, non-negative). `c` - Length of triangle side between 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 same units as `c`) and the interior angle at triangle corner `C` (`radians`), opposite of triangle side `c`. Raises: `TriangleError` - Invalid `a` or `b`. See Also: Function pygeodesy.triSide and Triangulation, Surveying.

### wildberger3 (a, b, c, alpha, beta, R3=<built-in function min>) |
Snellius' surveying using Rational Trigonometry. Arguments: `a` - Length of triangle side `BC`, opposite of triangle corner `A` (`scalar`, non-negative `meter` conventionally). `b` - Length of triangle side `AC`, opposite of triangle corner `B` (`scalar`, non-negative `meter` conventionally). `c` - Length of triangle side `AB`, 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 function `min` or `max`, invoked with 2 arguments. Returns: Snellius3Tuple`(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`. See Also: Wildberger, Norman J., Devine Proportions, page 252 and function pygeodesy.snellius3.