From 0c6542faec761d31ee22eef39105a607ae6c2e45 Mon Sep 17 00:00:00 2001 From: Antonio Golfari Date: Wed, 21 Sep 2022 15:49:25 +0200 Subject: [PATCH] Fixed bug when an igc track upload is forced if altitude is beyond SMALLINT range --- airscore/core/pilot/track.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/airscore/core/pilot/track.py b/airscore/core/pilot/track.py index b0fff14e..21fba54e 100644 --- a/airscore/core/pilot/track.py +++ b/airscore/core/pilot/track.py @@ -134,10 +134,7 @@ def create_from_file(filename: Path, config: FlightParsingConfig = FlightParsing Returns: An instance of Flight built from the supplied IGC file. """ - # if not config_class: - # config = FlightParsingConfig() - # else: - # config = config_class + fixes = [] a_records = [] i_records = [] @@ -166,8 +163,7 @@ def create_from_file(filename: Path, config: FlightParsingConfig = FlightParsing else: # Do not parse any other types of IGC records pass - flight = Flight(fixes, a_records, h_records, i_records, config) - return flight + return Track(fixes, a_records, h_records, i_records, config) @staticmethod def process( @@ -221,7 +217,7 @@ def process( # Do not parse any other types of IGC records pass try: - return Flight(fixes, a_records, h_records, i_records, config) + return Track(fixes, a_records, h_records, i_records, config) except IndexError: return None # return flight