Race¶
-
class
igclib.core.race.Race(tracks=None, task=None, validate=True, path=None, progress='gui')[source]¶ You can create a Race instance in two different ways :
Passing a tracks and a task, which creates a new Race object and validates all pilot flights.
>>> r = Race(tracks='tracks/', task='task.xctsk')
Passing a path to a previously saved Race, loading the saved instance (much faster than re-validating flights).
>>> r = Race(path='race.pkl')
Keyword Arguments: -
get_pilot_features(pilot_id, start=None, stop=None)[source]¶ Extracts pilot features
Parameters: pilot_id (str) – The pilot identifier used as key in self.flights
Keyword Arguments: Raises: KeyError– if pilot_id is not a key of self.flights dictionnaryReturns: The pilot features from start to stop
Return type:
-
parse_flights(tracks)[source]¶ Populates flights attribute by parsing each igc file in tracks.
Parameters: tracks (str) – Path to a directory or a zip file containing the igc files