SimBrief Planning System Update (#991)
* SimBrief Planning System Update Replaces outdated old pr. Same improvements apply to both controller and simbrief_form.blade. * Style Fix for SimBrief.Controller * strict equals fix and some comments changed equals to strict equals and put in some comments about the loadarray and manualrmk generation. * Formatting/separate out secstohhmm * Formatting * Removed duplicates We have the $wakecat, $equipment and $transponder in the controller, removed them from the blade. Fixed a harmless typo in the IVAO Prefile DEPTIME line Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com> Co-authored-by: Nabeel Shahzad <nabeel@nabeel.sh>
This commit is contained in:
co-authored by
Nabeel S
Nabeel Shahzad
parent
3a99fe9e0e
commit
617cea5df7
@@ -15,9 +15,9 @@
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a class="btn btn-primary pull-right btn-lg"
|
||||
style="margin-top: -10px;margin-bottom: 5px"
|
||||
href="{{ url(route('frontend.simbrief.remove', [$simbrief->id])) }}">Generate New OFP</a>
|
||||
<a class="btn btn-primary pull-right btn-lg"
|
||||
style="margin-top: -10px;margin-bottom: 5px"
|
||||
href="{{ url(route('frontend.simbrief.remove', [$simbrief->id])) }}">Generate New OFP</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -134,24 +134,30 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div><p class="small text-uppercase pb-sm-0 mb-sm-1">Departure METAR</p>
|
||||
<p class="border border-dark rounded p-1 small text-monospace">{{ $simbrief->xml->weather->orig_metar }}</p>
|
||||
<p
|
||||
class="border border-dark rounded p-1 small text-monospace">{{ $simbrief->xml->weather->orig_metar }}</p>
|
||||
</div>
|
||||
<div><p class="small text-uppercase pb-sm-0 mb-sm-1">Departure TAF</p>
|
||||
<p class="border border-dark rounded p-1 small text-monospace">{{ $simbrief->xml->weather->orig_taf }}</p>
|
||||
<p
|
||||
class="border border-dark rounded p-1 small text-monospace">{{ $simbrief->xml->weather->orig_taf }}</p>
|
||||
</div>
|
||||
<hr/>
|
||||
<div><p class="small text-uppercase pb-sm-0 mb-sm-1">Destination METAR</p>
|
||||
<p class="border border-dark rounded p-1 small text-monospace">{{ $simbrief->xml->weather->dest_metar }}</p>
|
||||
<p
|
||||
class="border border-dark rounded p-1 small text-monospace">{{ $simbrief->xml->weather->dest_metar }}</p>
|
||||
</div>
|
||||
<div><p class="small text-uppercase pb-sm-0 mb-sm-1">Destination TAF</p>
|
||||
<p class="border border-dark rounded p-1 small text-monospace">{{ $simbrief->xml->weather->dest_taf }}</p>
|
||||
<p
|
||||
class="border border-dark rounded p-1 small text-monospace">{{ $simbrief->xml->weather->dest_taf }}</p>
|
||||
</div>
|
||||
<hr/>
|
||||
<div><p class="small text-uppercase pb-sm-0 mb-sm-1">Alternate METAR</p>
|
||||
<p class="border border-dark rounded p-1 small text-monospace">{{ $simbrief->xml->weather->altn_metar }}</p>
|
||||
<hr/>
|
||||
<div><p class="small text-uppercase pb-sm-0 mb-sm-1">Alternate METAR</p>
|
||||
<p
|
||||
class="border border-dark rounded p-1 small text-monospace">{{ $simbrief->xml->weather->altn_metar }}</p>
|
||||
</div>
|
||||
<div><p class="small text-uppercase pb-sm-0 mb-sm-1">Alternate TAF</p>
|
||||
<p class="border border-dark rounded p-1 small text-monospace">{{ $simbrief->xml->weather->altn_taf }}</p>
|
||||
<p
|
||||
class="border border-dark rounded p-1 small text-monospace">{{ $simbrief->xml->weather->altn_taf }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -181,66 +187,55 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-container">
|
||||
<h6><i class="fas fa-info-circle"></i> Prefile ATC Flight Plan</h6>
|
||||
<div class="form-container-body">
|
||||
<div class="row">
|
||||
<div class="col-4" align="center">
|
||||
@php
|
||||
$str = $simbrief->xml->aircraft->equip ;
|
||||
$wc = stripos($str,"-");
|
||||
$tr = stripos($str,"/");
|
||||
$wakecat = substr($str,0,$wc);
|
||||
$equipment = substr($str,$wc+1,$tr-2);
|
||||
$transponder = substr($str,$tr+1);
|
||||
function secstohhmm($seconds) {
|
||||
$seconds = round($seconds);
|
||||
$hhmm = sprintf('%02d%02d', ($seconds/ 3600),($seconds/ 60 % 60));
|
||||
echo $hhmm ;
|
||||
}
|
||||
@endphp
|
||||
<form action="https://fpl.ivao.aero/api/fp/load" method="POST" target="_blank">
|
||||
<input type="hidden" name="CALLSIGN" value="{{ $simbrief->xml->atc->callsign }}" />
|
||||
<input type="hidden" name="RULES" value="I" />
|
||||
<input type="hidden" name="FLIGHTTYPE" value="N" />
|
||||
<input type="hidden" name="NUMBER" value="1" />
|
||||
<input type="hidden" name="ACTYPE" value="{{ $simbrief->xml->aircraft->icaocode }}" />
|
||||
<input type="hidden" name="WAKECAT" value="{{ $wakecat }}" />
|
||||
<input type="hidden" name="EQUIPMENT" value="{{ $equipment }}" />
|
||||
<input type="hidden" name="TRANSPONDER" value="{{ $transponder }}" />
|
||||
<input type="hidden" name="DEPICAO" value="{{ $simbrief->xml->origin->icao_code}}" />
|
||||
<input type="hidden" name="DEPTIME" value="{{ date('Hi', $simbrief->xml->times->est_out->__toString())."" }}" />
|
||||
<input type="hidden" name="SPEEDTYPE" value="{{ $simbrief->xml->atc->initial_spd_unit }}" />
|
||||
<input type="hidden" name="SPEED" value="{{ $simbrief->xml->atc->initial_spd }}" />
|
||||
<input type="hidden" name="LEVELTYPE" value="{{ $simbrief->xml->atc->initial_alt_unit }}" />
|
||||
<input type="hidden" name="LEVEL" value="{{ $simbrief->xml->atc->initial_alt }}" />
|
||||
<input type="hidden" name="ROUTE" value="{{ $simbrief->xml->general->route_ifps }}" />
|
||||
<input type="hidden" name="DESTICAO" value="{{ $simbrief->xml->destination->icao_code }}" />
|
||||
<input type="hidden" name="EET" value="@php secstohhmm($simbrief->xml->times->est_time_enroute) @endphp" />
|
||||
<input type="hidden" name="ALTICAO" value="{{ $simbrief->xml->alternate->icao_code}}" />
|
||||
<input type="hidden" name="ALTICAO2" value="{{ $simbrief->xml->alternate2->icao_code}}" />
|
||||
<input type="hidden" name="OTHER" value="{{ $simbrief->xml->atc->section18 }}" />
|
||||
<input type="hidden" name="ENDURANCE" value="@php secstohhmm($simbrief->xml->times->endurance) @endphp" />
|
||||
<input type="hidden" name="POB" value="{{ $simbrief->xml->weights->pax_count }}" />
|
||||
<input id="ivao_prefile" type="submit" class="btn btn-primary" value="File ATC on IVAO" />
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-4" align="center">
|
||||
<form action="https://my.vatsim.net/pilots/flightplan" method="GET" target="_blank">
|
||||
<input type="hidden" name="raw" value="{{ $simbrief->xml->atc->flightplan_text }}">
|
||||
<input type="hidden" name="fuel_time" value="@php secstohhmm($simbrief->xml->times->endurance) @endphp">
|
||||
<input type="hidden" name="speed" value="{{ $simbrief->xml->atc->initial_spd }}">
|
||||
<input type="hidden" name="altitude" value="{{ $simbrief->xml->atc->initial_alt }}">
|
||||
<input id="vatsim_prefile" type="submit" class="btn btn-primary" value="File ATC on VATSIM"/>
|
||||
</form>
|
||||
<form action="https://fpl.ivao.aero/api/fp/load" method="POST" target="_blank">
|
||||
<input type="hidden" name="CALLSIGN" value="{{ $simbrief->xml->atc->callsign }}"/>
|
||||
<input type="hidden" name="RULES" value="I"/>
|
||||
<input type="hidden" name="FLIGHTTYPE" value="N"/>
|
||||
<input type="hidden" name="NUMBER" value="1"/>
|
||||
<input type="hidden" name="ACTYPE" value="{{ $simbrief->xml->aircraft->icaocode }}"/>
|
||||
<input type="hidden" name="WAKECAT" value="{{ $wakecat }}"/>
|
||||
<input type="hidden" name="EQUIPMENT" value="{{ $equipment }}"/>
|
||||
<input type="hidden" name="TRANSPONDER" value="{{ $transponder }}"/>
|
||||
<input type="hidden" name="DEPICAO" value="{{ $simbrief->xml->origin->icao_code}}"/>
|
||||
<input type="hidden" name="DEPTIME" value="{{ date('Hi', $simbrief->xml->times->est_out->__toString()) }}"/>
|
||||
<input type="hidden" name="SPEEDTYPE" value="{{ $simbrief->xml->atc->initial_spd_unit }}"/>
|
||||
<input type="hidden" name="SPEED" value="{{ $simbrief->xml->atc->initial_spd }}"/>
|
||||
<input type="hidden" name="LEVELTYPE" value="{{ $simbrief->xml->atc->initial_alt_unit }}"/>
|
||||
<input type="hidden" name="LEVEL" value="{{ $simbrief->xml->atc->initial_alt }}"/>
|
||||
<input type="hidden" name="ROUTE" value="{{ $simbrief->xml->general->route_ifps }}"/>
|
||||
<input type="hidden" name="DESTICAO" value="{{ $simbrief->xml->destination->icao_code }}"/>
|
||||
<input type="hidden" name="EET" value="@secstohhmm($simbrief->xml->times->est_time_enroute)"/>
|
||||
<input type="hidden" name="ALTICAO" value="{{ $simbrief->xml->alternate->icao_code}}"/>
|
||||
<input type="hidden" name="ALTICAO2" value="{{ $simbrief->xml->alternate2->icao_code}}"/>
|
||||
<input type="hidden" name="OTHER" value="{{ $simbrief->xml->atc->section18 }}"/>
|
||||
<input type="hidden" name="ENDURANCE" value="@secstohhmm($simbrief->xml->times->endurance)"/>
|
||||
<input type="hidden" name="POB" value="{{ $simbrief->xml->weights->pax_count }}"/>
|
||||
<input id="ivao_prefile" type="submit" class="btn btn-primary" value="File ATC on IVAO"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-4" align="center">
|
||||
<form action="https://my.vatsim.net/pilots/flightplan" method="GET" target="_blank">
|
||||
<input type="hidden" name="raw" value="{{ $simbrief->xml->atc->flightplan_text }}">
|
||||
<input type="hidden" name="fuel_time" value="@secstohhmm($simbrief->xml->times->endurance)">
|
||||
<input type="hidden" name="speed" value="{{ $simbrief->xml->atc->initial_spd }}">
|
||||
<input type="hidden" name="altitude" value="{{ $simbrief->xml->atc->initial_alt }}">
|
||||
<input id="vatsim_prefile" type="submit" class="btn btn-primary" value="File ATC on VATSIM"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-4" align="center">
|
||||
<a
|
||||
href="http://skyvector.com/?chart=304&fpl={{ $simbrief->xml->origin->icao_code}} {{ $simbrief->xml->general->route }} {{ $simbrief->xml->destination->icao_code}}"
|
||||
target="_blank" class="btn btn-info">View Route At SkyVector</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4" align="center">
|
||||
<a href="http://skyvector.com/?chart=304&fpl={{ $simbrief->xml->origin->icao_code}} {{ $simbrief->xml->general->route }} {{ $simbrief->xml->destination->icao_code}}" target="_blank" class="btn btn-info">View Route At SkyVector</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-container">
|
||||
<h6><i class="fas fa-info-circle"></i>
|
||||
OFP
|
||||
|
||||
Reference in New Issue
Block a user