% content_for :title, "AirTrail sync" %>
Push the flights you log to your AirTrail flight map, with GPS tracks.
<%= @connection.last_error %>
<% end %>You've logged <%= pluralize(@flight_count, "flight") %>. <%= @connection.backfilled_at ? "Last full sync #{time_ago_in_words(@connection.backfilled_at)} ago." : "Run a full sync to send your existing flights." %>
A full sync first links flights that are already in AirTrail (e.g. from a file import), so nothing is duplicated, then sends the rest.
Flights using these codes can't sync yet. Enter the code AirTrail uses for the same airport (e.g. its ICAO or GPS code).
<% @unresolved.each do |code| %> <%= form_with url: map_airport_air_trail_connection_path, class: "flex items-center gap-2" do |f| %> <%= hidden_field_tag :code, code %> <%= code %>→ <%= text_field_tag :airtrail_code, nil, class: "input w-32", placeholder: "AirTrail code", required: true %> <%= f.submit "Map", class: "btn-secondary btn-sm" %> <% end %> <% end %>| <%= link_to fmt_date(f.date), aircraft_flight_log_path(f.aircraft, f), class: "link" %> | <%= f.route_summary %> | <%= s.last_error %> |
In AirTrail, open Settings → Security and create an API key with these scopes:
The key is stored encrypted. Flights go to the AirTrail account of the pilot who logged them, with you in the pilot seat, the tail number as registration, and the GPS track if one is attached.
Each aircraft's ICAO type (Edit aircraft) sets the aircraft type in AirTrail.