%# Flying metrics. "Flight time" = Hobbs where recorded, else tach. %>
<% periods = stats.periods %>
<% [ [ "Past 30 days", periods[0] ], [ "This year", periods[2] ], [ "Past 12 months", periods[1] ], [ "Since #{fmt_date(stats.first_date)}", periods[4] ] ].each do |title, p| %>
<%= title %>
<%= hours(p.flight) %> hrs
<%= pluralize(p.flights, "flight") %> · <%= hours(p.tach) %> tach · <%= number_with_delimiter(p.fuel) %> gal
<% end %>
<%= column_chart stats.flight_hours_by_month, height: "220px", colors: [ "#0369a1" ], ytitle: "hrs", library: { plugins: { legend: { display: false } } } %>
- Flights logged
- <%= number_with_delimiter(stats.count) %>
- Flight time
- <%= hours(stats.total_flight) %> hrs
- Tach time
- <%= hours(stats.total_tach) %> hrs
- Average flight
- <%= hours(stats.average_flight) %> hrs
- Longest flight
- <%= hours(stats.longest_flight) %> hrs
- Fuel
- <%= number_with_delimiter(stats.total_fuel) %> gal
- Fuel burn
- <%= stats.gph || "—" %> gal/hr
- Airports visited
- <%= stats.airports_visited %>
<% if stats.top_airports.any? %>
Most visited:
<%= stats.top_airports.map { |code, n| "#{code} (#{n})" }.join(" · ") %>
<% end %>
<% if stats.by_year.size > 1 %>