Skip to content

Commit

Permalink
moving most of the changes to pysoar
Browse files Browse the repository at this point in the history
  • Loading branch information
GliderGeek committed Aug 29, 2024
1 parent 1d490f0 commit 3cfb6e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion opensoar/competition/competition_day.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def analyse_flights(self, classification_method: str, analysis_progress=None, sk
if skip_failed_analyses:
try:
competitor.analyse(self.task, classification_method)
except Exception:
except Exception as e:
failed_comp_ids.append(competitor.competition_id)
else:
competitor.analyse(self.task, classification_method)
Expand Down
13 changes: 3 additions & 10 deletions opensoar/competition/soaringspot.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,8 @@ def get_info_from_comment_lines(parsed_igc_file: dict, start_time_buffer: int=0)
timezone = int(line.split(':')[3])

if start_opening is not None:
pass
# not converting start opening to UTC
# start_opening = subtract_times(start_opening, datetime.timedelta(hours=timezone))
# converting start opening to UTC
start_opening = subtract_times(start_opening, datetime.timedelta(hours=timezone))

if len(lcu_lines) == 0 or len(lseeyou_lines) == 0:
# somehow some IGC files do not contain the LCU or LSEEYOU lines with task information
Expand Down Expand Up @@ -359,16 +358,10 @@ def generate_competition_day(self, target_directory: str, download_progress=None
print('{} is skipped because of invalid trace'.format(competition_id))
continue



# get info from file
task, contest_information, competitor_information = get_info_from_comment_lines(parsed_igc_file, start_time_buffer)
plane_model = competitor_information.get('plane_model', None)
pilot_name = competitor_information.get('pilot_name', None)

tz = task.timezone
for fix in trace:
fix['time'] = add_times(fix['time'], datetime.timedelta(hours=tz))
pilot_name = competitor_information.get('pilot_name', None)

competitor = Competitor(trace, competition_id, plane_model, ranking, pilot_name)

Expand Down

0 comments on commit 3cfb6e5

Please sign in to comment.