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

# Module resections

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

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

Version: 23.03.19

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.
| TriAngle4Tuple 4-Tuple `(radA, radB, radC, rIn)` with the interior angles at triangle corners `A`, `B` and `C` in `radians` and the `InCircle` radius `rIn` aka `inradius` in `meter`, 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 `radians`with 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=None, **Clas_kwds) 3-Point resection using Cassini's method. |
collins5(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. |
tienstra7(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 one angle of a triangle. |
triAngle4(a, b, c) Compute the angles of a triangle. |
triSide(a, b, radC) Compute one side of a triangle. |
triSide2(b, c, radB) Compute one side and the 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=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=INT0` (`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: 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.collins5, pygeodesy.pierlot and pygeodesy.tienstra7.

### collins5 (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=INT0` (`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: 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` 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 pygeodesy.cassini, pygeodesy.pierlot and pygeodesy.tienstra7.

### 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=INT0` (`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, typically. 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.collins5 and pygeodesy.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 pygeodesy.wildberger3.

### tienstra7 (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=INT0` (`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, 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`. 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.collins5 and pygeodesy.pierlot.

### 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: `TriangleError` - Invalid or negative `a`, `b` or `c`. See Also: Functions pygeodesy.triAngle4 and pygeodesy.triSide.

### triAngle4 (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: TriAngle4Tuple`(radA, radB, radC, rIn)` with angles `radA`, `radB` and `radC` at triangle corners `A`, `B` and `C`, all in `radians` and the `InCircle` radius `rIn` aka `inradius`, same units as triangle sides `a`, `b` and `c`. Raises: `TriangleError` - Invalid or negative `a`, `b` or `c`. See Also: Function pygeodesy.triAngle.

### 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: `TriangleError` - Invalid `a`, `b` or `radC`. See Also: Functions pygeodesy.sqrt_a, pygeodesy.triAngle, pygeodesy.triSide2 and pygeodesy.triSide4.

### triSide2 (b, c, radB) |
Compute one side and the 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: `TriangleError` - Invalid `b` or `c` or either `b` or `radB` near zero. See Also: Functions pygeodesy.sqrt_a, pygeodesy.triSide and pygeodesy.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: `TriangleError` - Invalid or negative `radA`, `radB` or `c`. See Also: Triangulation, Surveying and functions pygeodesy.sqrt_a, pygeodesy.triSide and pygeodesy.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 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`. See Also: Wildberger, Norman J., Devine Proportions, page 252 and function pygeodesy.snellius3.