syntax = "proto3";

import "fr24/proto/_common.proto";

message FlightProgress {
    uint32 traversed_distance = 1; // Distance traversed, meters
    uint32 remaining_distance = 2; // Distance remaining, meters
    int32 elapsed_time = 3; // Elapsed time since departure, seconds
    int32 remaining_time = 4; // Remaining time until arrival, seconds
    uint32 eta = 5; // Estimated time of arrival, Unix timestamp in seconds
    uint32 great_circle_distance = 6; // Great circle distance, meters
    uint32 mean_flight_time = 7; // Mean flight time, seconds
    _common.FlightStage flight_stage = 8;
    _common.DelayStatus delay_status = 9;
    uint32 progress_pct = 10; // Progress percentage of the flight (0-100)
}

message FlightDetailsRequest {
    fixed32 flight_id = 1; // FR24 Flight ID (e.g. `962788562` = `0x3962fcd2`)
    _common.RestrictionVisibility restriction_mode = 2;
    // Whether to include `flight_plan` and `flight_trail_list` in the response
    bool verbose = 3;
}

message FlightDetailsResponse {
    _common.AircraftInfo aircraft_info = 1;
    _common.ScheduleInfo schedule_info = 2;
    _common.FlightProgress flight_progress = 3;
    _common.ExtendedFlightInfo flight_info = 4;
    _common.FlightPlan flight_plan = 5;
    repeated _common.TrailPoint flight_trail_list = 6;
    _common.PositionBuffer position_buffer = 7;
}