@extends('app') @section('title', 'SimBrief Flight Planning') @section('content') @if(empty(request()->get('aircraft_id')))

Aircraft Selection

@else @php $loadmin = $flight->load_factor - $flight->load_factor_variance; $loadmax = $flight->load_factor + $flight->load_factor_variance; if($loadmin < 1) { $loadmin = 1; } if($loadmax > 100) { $loadmax = 100; } @endphp @foreach($aircraft as $acdetails) @php $simbrieftype = $acdetails->icao ; $subflid = $acdetails->subfleet_id ; if($acdetails->icao === 'A20N') { $simbrieftype = 'A320'; } if($acdetails->icao === 'A21N') { $simbrieftype = 'A321'; } if($acdetails->icao === 'B77L') { $simbrieftype = 'B77F'; } if($acdetails->icao === 'B773') { $simbrieftype = 'B77W'; } if($acdetails->icao === 'E35L') { $simbrieftype = 'E135'; } @endphp @endforeach

Create Flight Briefing Package

 Aircraft Details

 @lang('pireps.flightinformations') for {{ $flight->airline->icao }} {{ $flight->flight_number }}



@foreach($subfleets as $subfleet) @if($subfleet->id == $subflid)
 Configuration And Load Information For {{ $subfleet->name }} ; {{ $acdetails->registration }}
{{-- Generate Load Figures --}}
{{-- Create and send some data to the $loadarray for MANUALRMK generation --}} @php $loadarray = [] ; @endphp @foreach($subfleet->fares as $fare) @if($fare->capacity > 0) @php $randomloadperfare = ceil(($fare->capacity * (rand($loadmin, $loadmax))) /100); $loadarray[] = ['SeatType' => $fare->code]; $loadarray[] = ['SeatLoad' => $randomloadperfare]; @endphp
@endif @endforeach @php $loadcollection = collect($loadarray) ; $totalgenload = $loadcollection->sum('SeatLoad') ; @endphp
@if($totalgenload > 0 && $totalgenload < 900)
@if(setting('units.weight') === 'kg') @php $estimatedpayload = number_format(round(($pax_weight * $totalgenload) / 2.2)) ; @endphp @else @php $estimatedpayload = number_format(round($pax_weight * $totalgenload)) ; @endphp @endif
@elseif($totalgenload > 900) @endif @endif @endforeach
{{-- Here we generate the MANUALRMK which is sent to SimBrief and displayed in the generated ofp as Dispatch Remarks. $loadarray is created and filled with data during random load generation, it holds each fare's code and the generated load then we are imploding that array to get the fare codes and load counts. Returned string will be like Load Distribution Y 132 C 12 F 4 --}} @if($totalgenload > 0) @php $loaddisttxt = "Load Distribution "; $loaddist = implode(' ', array_map( function ($v, $k) { if(is_array($v)){ return implode('&'.' '.':', $v); }else{ return $k.':'.$v; } }, $loadarray, array_keys($loadarray) )); @endphp @endif
 Planning Options
Cont Fuel:
Reserve Fuel:
SID/STAR Type:
Plan Stepclimbs:
ETOPS Planning:

 @lang('stisla.briefingoptions')
Units:
Detailed Navlog:
Runway Analysis:
Include NOTAMS:
FIR NOTAMS:
Flight Maps:

@endif @endsection @section('scripts') @endsection