Skip to content

Commit

Permalink
Fixed bug when an igc track upload is forced if altitude is beyond SM…
Browse files Browse the repository at this point in the history
…ALLINT range
  • Loading branch information
biuti committed Sep 21, 2022
1 parent 00e2a3a commit 0c6542f
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions airscore/core/pilot/track.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0c6542f

Please sign in to comment.