Region#

class Region(Track)#

Represents a region

track#

List of all waypoints that comprise a region

Type

list[Waypoint]

name#

An optional name for the region

Type

Optional[str]

description#

An optional description for the region

Type

Optional[str]

set(region)#

Set the region track

Parameters

region (list[Waypoint]) – The region to set

reset()#

Reset the region track

add_waypoint(waypoint)#

Add a waypoint to the end of the region

Parameters

waypoint (Waypoint) – The waypoint to add

remove_waypoint(waypoint)#

Remove a waypoint from the region and return it

Parameters

waypoint (Waypoint) – The waypoint to remove

Returns

The removed waypoint

Return type

Waypoint

get_edges()#

Get the edges between each waypoint

Returns

A list of the edges connecting the waypoints in the region

Return type

List[Tuple[Waypoint, Waypoint]]

track_distance_m()#

Get the distance of the track in metres

Returns

The overall distance of the track in metres

Return type

float

distance_to_end_m(waypoint)#

Get the distance to the end of the track in metres

Parameters

waypoint (Waypoint) – The waypoint to compare

Returns

The distance to the end of the track in metres

Return type

float