コード例 #1
0
def calculate_time_points_reduction(t):
    from pilot.flightresult import FlightResult
    p = FlightResult()
    p.distance_flown = t.opt_dist
    p.SSS_time = t.max_ss_time
    p.ESS_time = t.stop_time
    return pilot_speed(t, p)
コード例 #2
0
ファイル: flightcheck.py プロジェクト: vicb/FAI-Airscore
def evaluate_ess(result: FlightResult, task: Task):
    if any(e.name == 'ESS' for e in result.waypoints_achieved):
        result.ESS_time, result.ESS_altitude = min(
            [(x.rawtime, x.altitude)
             for x in result.waypoints_achieved if x.name == 'ESS'],
            key=lambda t: t[0])
        result.speed = (task.SS_distance / 1000) / (result.ss_time / 3600)