@extends('admin.layout') @section('content')

Validation IGC — {{ $pilot->name }} @if($pilot->callsign) {{ $pilot->callsign }} @endif

Jour {{ $day->day_number }} — {{ $day->date->format('d/m/Y') }}
← Retour aux scores
@if($errors->any())
{{ $errors->first() }}
@endif {{-- ── Upload form ── --}} @if(!isset($results))
Importer le fichier IGC
@csrf
Fichier au format IGC (enregistrement FLARM ou autre logger GPS).
{{-- ── FLARM summary (before IGC upload) ── --}}
Points validés par FLARM
@foreach($turnpoints as $i => $tp) @endforeach
# Point de virage Points Rayon FLARM Heure
{{ $i + 1 }} {{ $tp->name }} {{ $tp->points }} {{ number_format($tp->validationRadiusM()) }} m @if(isset($flarmIds[$tp->id])) ✓ Validé @else @endif @if(!empty($flarmTimes[$tp->id])) {{ \Carbon\Carbon::parse($flarmTimes[$tp->id])->format('H:i:s') }} @else @endif
@else {{-- ── Results + save form ── --}}
@csrf
Récapitulatif IGC {{ number_format($fixCount) }} pts GPS @if(!is_null($maxSpeedKmh)) {{ number_format($maxSpeedKmh, 0) }} km/h max @endif @if(!is_null($maxAltM)) {{ number_format($maxAltM) }} m alt. max @endif
@isset($altitudes)
Altitude du terrain
{{ $altitudes['ground'] !== null ? number_format($altitudes['ground']) . ' m' : '—' }}
Hauteur la plus basse hors décollage et atterrissage
{{ $altitudes['min_height'] !== null ? number_format($altitudes['min_height']) . ' m' : '—' }} @if($altitudes['min_at']) à {{ \Carbon\Carbon::parse($altitudes['min_at'])->format('H:i:s') }} @endif
@if($altitudes['vache_at'])
Vache présumée à {{ \Carbon\Carbon::parse($altitudes['vache_at'])->format('H:i:s') }} — passage sous {{ number_format($altitudes['threshold']) }} m. Les balises franchies ensuite ne sont pas comptées.
@else
Jamais descendu sous {{ number_format($altitudes['threshold']) }} m en vol.
@endif
@endisset
@foreach($results as $i => $r) @php $tp = $r['turnpoint']; $flarmOk = $r['flarm']; $igcOk = $r['igc']; $distM = $r['distance_m']; // Validée par l'IGC, sauf si franchie après la vache : // le vol était alors terminé. $afterVache = $r['after_vache'] ?? false; $shouldInclude = $igcOk && !$afterVache; $rowClass = match(true) { $igcOk && $flarmOk => '', $igcOk && !$flarmOk => 'table-success', !$igcOk && $flarmOk => 'table-warning', default => '', }; @endphp {{-- FLARM status --}} {{-- IGC status --}} {{-- Distance --}} {{-- Heure d'entrée dans la zone --}} {{-- Include checkbox --}} @endforeach
# Point de virage Points Rayon FLARM IGC Distance IGC Heure Inclure
{{ $i + 1 }} {{ $tp->name }} @if($afterVache) après vache @endif {{ $r['points'] }} @if($tp->points) balise {{ $tp->points }} @endif {{ number_format($tp->validationRadiusM()) }} m @if($flarmOk) @if(!empty($flarmTimes[$tp->id])) {{ \Carbon\Carbon::parse($flarmTimes[$tp->id])->format('H:i:s') }} @endif @else @endif @if($igcOk) @elseif($distM !== null) @else @endif @if($distM !== null) @if($igcOk) {{ number_format($distM) }} m @else {{ number_format($distM) }} m (rayon {{ number_format($tp->validationRadiusM()) }} m) @endif @else @endif @if($r['validated_at']) {{ \Carbon\Carbon::parse($r['validated_at'])->format('H:i:s') }} @elseif($r['igc']) @else @endif @if($igcOk)
@elseif($flarmOk) {{-- Validée en vol mais absente de la trace : décochée par défaut, l'organisateur reste libre de la maintenir. --}}
@else @if($distM !== null) hors zone @endif @endif
Balises retenues 0
@if(isset($altitudes) && $altitudes['vache_at'])
Coché d'après l'analyse du fichier.
@endif
Ajoutés après la division.
Total attribué
0
{{-- Legend --}}
Validé Non validé Ligne verte = nouveau point ajouté par IGC Ligne orange = validé FLARM mais pas IGC
{{-- New file upload (hidden by default) --}} @endif @endsection