diff options
| author | Daniel Schadt <kingdread@gmx.de> | 2025-10-28 21:19:19 +0100 |
|---|---|---|
| committer | Daniel Schadt <kingdread@gmx.de> | 2025-10-28 21:19:19 +0100 |
| commit | f39826b7a2b7becc54dbcee9c1b2743d2e050b39 (patch) | |
| tree | c66d5d2a94bf305e9130e5f191c9947a59012b24 | |
| parent | 4f598169e1d66dab8dde4613d28d18af72db2962 (diff) | |
| download | fietsboek-f39826b7a2b7becc54dbcee9c1b2743d2e050b39.tar.gz fietsboek-f39826b7a2b7becc54dbcee9c1b2743d2e050b39.tar.bz2 fietsboek-f39826b7a2b7becc54dbcee9c1b2743d2e050b39.zip | |
add docstrings to geo.py
| -rw-r--r-- | fietsboek/geo.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/fietsboek/geo.py b/fietsboek/geo.py index 8b016c0..7118690 100644 --- a/fietsboek/geo.py +++ b/fietsboek/geo.py @@ -1,9 +1,8 @@ +"""This module implements GPS related functionality.""" from dataclasses import dataclass from itertools import islice from math import sqrt, sin, cos, radians -import gpxpy - # WGS-84 equatorial radius, also called the semi-major axis. # https://en.wikipedia.org/wiki/Earth_radius @@ -17,6 +16,9 @@ MOVING_THRESHOLD = 1.1 @dataclass class MovementData: + """Movement statistics for a path.""" + # pylint: disable=too-many-instance-attributes + duration: float = 0.0 """Duration of the path, in seconds.""" @@ -44,6 +46,7 @@ class MovementData: @dataclass(slots=True) class Point: + """A GPS point, represented as longitude/latitude/elevation.""" longitude: float latitude: float elevation: float @@ -114,6 +117,9 @@ class Point: class Path: + """A GPS path, that is a series of GPS points.""" + # pylint: disable=too-few-public-methods + def __init__(self, points: list[Point]): self.points = points |
