From f39826b7a2b7becc54dbcee9c1b2743d2e050b39 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Tue, 28 Oct 2025 21:19:19 +0100 Subject: add docstrings to geo.py --- fietsboek/geo.py | 10 ++++++++-- 1 file 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 -- cgit v1.2.3