@extends('app') @section('title', 'SimBrief Flight Planning') @section('content')

Create Simbrief Briefing

 Aircraft Details

 @lang('pireps.flightinformations') For {{ $flight->airline->icao }}{{ $flight->flight_number }} ({{ \App\Models\Enums\FlightType::label($flight->flight_type) }})


@if($flight->dpt_time) @endif

 Configuration And Load Information For {{ $aircraft->registration }} ({{ $aircraft->subfleet->name }})
@php $loadarray = [] ; @endphp {{-- Generate Load Figures For Pax Fares --}} @foreach($aircraft->subfleet->fares->where('type', 0) as $fare) @php $randompaxperfare = floor(($fare->pivot->capacity * rand($loadmin, $loadmax)) /100); $loadarray[] = ['LoadType' => $fare->code]; $loadarray[] = ['LoadFigure' => $randompaxperfare]; @endphp
@endforeach {{-- Calculate weights for Pax Loads Before moving to Cargo Fares --}} @php $paxcollection = collect($loadarray); $tpaxfig = $paxcollection->sum('LoadFigure'); if(setting('units.weight') === 'kg') { $tpaxload = round(($pax_weight * $tpaxfig) / 2.205); $tbagload = round(($bag_weight * $tpaxfig) / 2.205); } else { $tpaxload = round($pax_weight * $tpaxfig); $tbagload = round($bag_weight * $tpaxfig); } @endphp {{-- Generate Load Figures For Cargo Fares --}} @foreach($aircraft->subfleet->fares->where('type', 1) as $fare) @php $randomcargoperfare = ceil((($fare->pivot->capacity - $tbagload) * rand($loadmin, $loadmax)) /100); $loadarray[] = ['LoadType' => $fare->code]; $loadarray[] = ['CargoFigure' => $randomcargoperfare]; @endphp
@endforeach @php $loadcollection = collect($loadarray); $tcargoload = $loadcollection->sum('CargoFigure'); $tpayload = $tpaxload + $tbagload + $tcargoload; @endphp
@if(isset($tpayload) && $tpayload > 0) {{-- Display The Weights Generated --}}
@if($tpaxload)
@endif @if($tpaxload && $tcargoload)
@endif
@endif
{{-- Prepare Form Fields For SimBrief --}} @if($tpaxfig) @elseif(!$tpaxfig && $tcargoload) @endif @if($tcargoload) @endif {{-- Generate the MANUALRMK which is sent to SimBrief and displayed as Dispatch Remark. $loadarray is created and filled with data during random load generation, it holds each fare's code and the generated load. Returned string will be "FixedText eachFareCode eachFareLoad" Example Remark ; Load Distribution Y 132 J 12 F 4 C 2800 --}} @if(isset($tpayload) && $tpayload > 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 @if(setting('simbrief.callsign', false)) @endif {{-- For more info about form fields and their details check SimBrief Forum / API Support --}}
 Planning Options
Cont Fuel:
Reserve Fuel:
SID/STAR Type:
Plan Stepclimbs:
ETOPS Planning:

 Briefing Options
Units:
Detailed Navlog:
Runway Analysis:
Include NOTAMS:
FIR NOTAMS:
Flight Maps:

@endsection @section('scripts') @endsection