+ {{--
+ This map uses rivets.js to fill in the updates from the livemap
+ So the single brackets are used by rivets to fill in the values
+ And then the rv-* attributes are data-binds that will automatically
+ update whenever the base model behind it updates:
+
+ http://rivetsjs.com/docs/guide
+
+ Look in resources/js/maps/live_map.js to see where the actual binding
+ and update() call is made
+ --}}
-
-
-
-
+
+ {{--
+ This is the bottom bar that appears when you click on a flight in the map.
+ You can show any data you want - use a JS debugger to see the value of "pirep",
+ or look up the API documentation for the /api/pirep/{id}/acars call
+
+ It's basically any of the fields from the database and pirep.position.X is any
+ column from the ACARS table - holds the latest position.
+
+ Again, this is updated automatically via the rivets.js bindings, so be mindful
+ when you're editing the { } - single brackets == rivets, double brackets == laravel
+
+ A couple of places (like the distance) use both to output the correct bindings.
+ --}}
+
+
+
+
+ { pirep.dpt_airport.name } ({ pirep.dpt_airport.icao }) to
+ { pirep.arr_airport.name } ({ pirep.arr_airport.icao })
+
-
-
+
+
+ Ground Speed: { pirep.position.gs }
+ Altitude: { pirep.position.altitude }
+ Heading: { pirep.position.heading }
+
-
-
+
+
+ Status: { pirep.status_text }
+ Flight Time: { pirep.flight_time | time_hm }
+ Distance: { pirep.position.distance.{{setting('units.distance')}} }
+ /
+ { pirep.planned_distance.{{setting('units.distance')}} }
+
-
@@ -31,26 +65,47 @@
-{{--
+{{--
+This table is also handled/rendered by rivets from the livemap
+Handles the updates by automatically updating the data in the row.
+
+Same note applies from above about the data from the PIREP API being available
+and being mindful of the rivets bindings
+--}}
+
- @if(!filled($pireps))
-
There are no flights
- @endif
-
- @foreach($pireps as $pirep)
-
- | {{ $pirep->airline->code }}{{ $pirep->ident }} |
- {{ $pirep->dpt_airport_id }} |
- {{ $pirep->arr_airport_id }} |
- {{ $pirep->aircraft->name }} |
-
- {{ PirepStatus::label($pirep->status) }}
- |
+ There are no flights
+
+
+
- @endforeach
+
+
+
+ | { pirep.airline.code }{ pirep.ident} |
+ {{-- Show the full airport name on hover --}}
+ { pirep.dpt_airport.icao } |
+ { pirep.arr_airport.icao } |
+ { pirep.aircraft.name } |
+ { pirep.position.altitude } |
+ { pirep.position.gs } |
+ { pirep.position.distance.{{setting('units.distance')}} } /
+ { pirep.planned_distance.{{setting('units.distance')}} }
+ |
+ { pirep.status_text } |
+
+
---}}
+
@section('scripts')