fietsboek.geo module

This module implements GPS related functionality.

fietsboek.geo.EARTH_RADIUS = 6378137.0

Radius of the earth, in meters.

fietsboek.geo.MOVING_THRESHOLD = 1.1

Speed which is considered to be the moving threshold, in m/s.

class fietsboek.geo.MovementData(duration=0.0, moving_duration=0.0, stopped_duration=0.0, length=0.0, average_speed=0.0, maximum_speed=0.0, uphill=0.0, downhill=0.0)

Bases: object

Movement statistics for a path.

average_speed: float = 0.0

Average speed, in m/s.

downhill: float = 0.0

Downhill elevation, in meters.

duration: float = 0.0

Duration of the path, in seconds.

length: float = 0.0

Length of the path, in meters.

maximum_speed: float = 0.0

Maximum speed, in m/s.

moving_duration: float = 0.0

Duration spent moving, in seconds.

stopped_duration: float = 0.0

Duration spent stopped, in seconds.

uphill: float = 0.0

Uphill elevation, in meters.

class fietsboek.geo.Path(points)

Bases: object

A GPS path, that is a series of GPS points.

movement_data()

Returns the movement data.

Return type:

MovementData

class fietsboek.geo.Point(longitude, latitude, elevation, time_offset)

Bases: object

A GPS point, represented as longitude/latitude/elevation.

distance(other)

Returns the distance between this point and the given other point in meters.

Return type:

float

elevation: float
flat_distance(other)

Returns the distance between this point and the other point in meters.

This does not take elevation into account, and only looks at the 2d distance.

Return type:

float

latitude: float
longitude: float
time_offset: float