---
title: "Frassette"
subtitle: "2024-05-26 • Décollage 10:18:38 • 10m 54s • 6.19 km"
date: "2024-05-26"
categories: ["vol", "Frassette"]
description: "Vol de 10m 54s depuis Frassette (décollage 10:18:38). Gain d'altitude 0 m, vitesse max 40.4 km/h."
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, warning = FALSE, message = FALSE)
library(jsonlite)
library(DT)
# Chargement des données du vol
db <- fromJSON("../../data/processed/flights.json", simplifyVector = FALSE)
flight <- db$flights[sapply(db$flights, function(f) f$id == "2024-05-26-XSD-UB343B-01")][[1]]
```
## ✈️ Résumé du vol
Le **2024-05-26**, décollage à **10:18:38** depuis **Frassette**. **Nicolas** a volé **10m 54s** avec sa voile **Hook 5P**, pour atterrir à **Vionnaz**. Vol caractérisé par un gain d'altitude de **0 m** et une vitesse maximale de **40.4 km/h**.
```{r conditions, results='asis'}
# Affichage des conditions si renseignées
conditions <- ""
if (!is.null(conditions) && conditions != "" && !is.na(conditions) && conditions != "" && conditions != "NA") {
cat("### 🌤️ Conditions\n")
cat(conditions, "\n\n")
}
```
## 📊 Statistiques clés
```{r stats-summary}
# Tableau simple des stats principales
stats_data <- data.frame(
"🛫 Décollage" = paste(flight$takeoff_time, "(heure locale)"),
"🛬 Atterrissage" = paste(flight$landing_time, "(heure locale)"),
"⏱️ Durée" = paste(round(flight$duration_minutes), "min"),
"📈 Distance totale" = paste(flight$total_distance_km, "km"),
"📏 Distance directe" = paste(flight$straight_distance_km, "km"),
"🏔️ Alt. décollage" = paste(flight$takeoff_coords$elevation, "m"),
"🏔️ Alt. max" = paste(flight$max_elevation, "m"),
"🏔️ Alt. atterrissage" = paste(flight$landing_coords$elevation, "m"),
"📊 Gain altitude" = paste(flight$elevation_gain_total, "m"),
"🚀 Vitesse max" = paste(flight$max_speed_kmh, "km/h"),
"⬆️ Taux montée max" = paste(flight$max_climb_rate, "m/s"),
"⬇️ Taux chute max" = paste(flight$max_sink_rate, "m/s"),
"📐 Finesse" = ifelse(is.null(flight$glide_ratio) || is.na(flight$glide_ratio) || length(flight$glide_ratio) == 0, "N/A", paste(flight$glide_ratio, ":1")),
check.names = FALSE
)
# Nouvelles métriques IGC si disponibles (avec vérification sécurisée)
if (!is.null(flight$data_quality_percent) && !is.na(flight$data_quality_percent) && flight$data_quality_percent != "") {
stats_data[["📡 Qualité GPS"]] <- paste(flight$data_quality_percent, "%")
}
if (!is.null(flight$elevation_gps_available) &&
isTRUE(flight$elevation_gps_available) &&
!is.null(flight$max_elevation_gps) &&
!is.na(flight$max_elevation_gps) &&
flight$max_elevation_gps != "") {
stats_data[["🛰️ Alt. GPS max"]] <- paste(flight$max_elevation_gps, "m")
}
knitr::kable(
t(stats_data),
col.names = "Valeur",
align = "c"
)
```
## 📈 Profil d'altitude
::: {.flight-chart}

:::
## 🏃 Vitesse au sol
::: {.flight-chart}

:::
## ⬆️⬇️ Montées et chutes
::: {.flight-chart}

:::
## 🗺️ Trace de vol
### Vue d'ensemble
::: {.flight-chart}

:::
### Carte interactive
::: {.flight-map-container}
::: {.map-header}
**🗺️ Carte interactive du vol**
::: {.map-controls}
<button class="map-control-btn" onclick="toggleFullscreen('2024-05-26-XSD-UB343B-01')">🔍 Plein écran</button>
<button class="map-control-btn" onclick="window.open('../../data/exports/2024-05-26-XSD-UB343B-01/flight_map.html', '_blank')">🔗 Ouvrir</button>
:::
:::
::: {.flight-map-wrapper #flight-map-2024-05-26-XSD-UB343B-01}
```{r map, out.width="100%", out.height="400px", results='asis'}
# Inclusion de la carte en tant que iframe pour éviter les conflicts HTML
map_path <- file.path("../../data/exports", "2024-05-26-XSD-UB343B-01", "flight_map.html")
cat(sprintf('<iframe src="%s" width="100%%" height="400px" frameborder="0" style="border-radius: 6px;"></iframe>', map_path))
```
:::
:::
```{js}
function toggleFullscreen(flightId) {
const mapWrapper = document.getElementById('flight-map-' + flightId);
const isFullscreen = mapWrapper.classList.contains('fullscreen');
if (isFullscreen) {
// Sortir du plein écran
mapWrapper.classList.remove('fullscreen');
const overlay = document.querySelector('.fullscreen-overlay');
if (overlay) overlay.remove();
} else {
// Entrer en plein écran
mapWrapper.classList.add('fullscreen');
// Ajouter un bouton de fermeture
const overlay = document.createElement('div');
overlay.className = 'fullscreen-overlay';
overlay.innerHTML = '✕ Fermer';
overlay.onclick = () => toggleFullscreen(flightId);
document.body.appendChild(overlay);
}
}
// Échapper avec la touche ESC
document.addEventListener('keydown', function(e) {
if (e.key === 'Escape') {
const mapWrapper = document.querySelector('.flight-map-wrapper.fullscreen');
if (mapWrapper) {
const flightId = mapWrapper.id.replace('flight-map-', '');
toggleFullscreen(flightId);
}
}
});
```
## 🥾 Hike & Fly
```{r hike-info, results='asis'}
# Recherche d'un fichier hike & fly
hike_file <- file.path("../../doc", paste0("2024-05-26-XSD-UB343B-01", "_hike.md"))
if (file.exists(hike_file)) {
# Lecture et affichage des infos hike
hike_content <- readLines(hike_file, warn = FALSE)
cat(paste(hike_content, collapse = "\n"))
} else {
cat("🚗 *Accès direct en véhicule*\n\n")
cat("💡 Pour ajouter des infos hike & fly, créer le fichier : `doc/2024-05-26-XSD-UB343B-01_hike.md`")
}
```
## 📖 Mon récit de vol
```{r story, results='asis'}
# Recherche d'un fichier récit
story_file <- file.path("../../doc", paste0("2024-05-26-XSD-UB343B-01", ".md"))
if (file.exists(story_file)) {
# Lecture et affichage du récit
story_content <- readLines(story_file, warn = FALSE)
cat(paste(story_content, collapse = "\n"))
} else {
cat("*Pas de récit disponible pour ce vol.*\n\n")
cat("💡 Pour ajouter un récit, créer le fichier : `doc/2024-05-26-XSD-UB343B-01.md`")
}
```
## 📸 Photos du vol
```{r photos, results='asis'}
# Recherche du dossier photos
photos_dir <- file.path("../../img", "2024-05-26-XSD-UB343B-01")
if (dir.exists(photos_dir)) {
# Lister toutes les images
image_files <- list.files(
photos_dir,
pattern = "\\.(jpg|jpeg|png|gif)$",
ignore.case = TRUE,
full.names = FALSE
)
if (length(image_files) > 0) {
cat("### Galerie\n\n")
# Afficher chaque image
for (img in image_files) {
img_path <- file.path("../../img", "2024-05-26-XSD-UB343B-01", img)
img_name <- tools::file_path_sans_ext(img)
cat(sprintf("\n\n", img_name, img_path))
}
} else {
cat("*Dossier photos vide.*")
}
} else {
cat("*Pas de photos disponibles pour ce vol.*\n\n")
cat("💡 Pour ajouter des photos, créer le dossier : `img/2024-05-26-XSD-UB343B-01/`")
}
```
```{r igc-info, results='asis'}
# Affichage des infos techniques IGC si disponibles (avec vérifications)
if (!is.null(flight$data_quality_percent) && !is.na(flight$data_quality_percent) && flight$data_quality_percent != "") {
cat("## 📡 Informations techniques (IGC)\n\n")
cat("### Qualité des données GPS\n")
cat(sprintf("- **Validité GPS**: %s%% des points validés\n", flight$data_quality_percent))
if (!is.null(flight$elevation_gps_available) && isTRUE(flight$elevation_gps_available)) {
cat("- **Sources d'altitude**: GPS pour affichage, barométrique pour calculs de vario\n")
if (!is.null(flight$max_elevation_gps) && !is.na(flight$max_elevation_gps) && flight$max_elevation_gps != "") {
cat(sprintf("- **Altitude GPS max**: %s m\n", flight$max_elevation_gps))
}
} else {
cat("- **Source d'altitude**: Barométrique uniquement (affichage + calculs)\n")
}
cat("\n### Métadonnées automatiques\n")
cat("Ce vol a été traité depuis un fichier IGC avec extraction automatique des métadonnées (pilote, parapente, date).\n\n")
}
```
---
*Vol enregistré avec Ultrabip - Analysé automatiquement*
*Template optimisé avec [Claude](https://claude.ai)*