diff options
| -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 |
