Skip to content

Commit

Permalink
MainWindow: Flarm gauge: when traffic is farther than 4 km away, it d…
Browse files Browse the repository at this point in the history
…isappears
  • Loading branch information
ubx committed Jan 19, 2025
1 parent 8f85726 commit 860605f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions NEWS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Version 7.44 - not yet released
- apply dark mode to large flarm radar
- add options to avoid infoboxes to flarm radar widget
- changed location of setting for flarm radar position
- Flarm gauge: when traffic is farther than 4 km away, it disappears
- add new gesture ULDR to access quick menu
- add quick menu page buttons in case of touch screen
- add quit button to quick menu
Expand Down
1 change: 1 addition & 0 deletions doc/manual/de/ch07_airspace_and_flarm.tex
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ \subsection*{FLARM Radar}
Die dargestellte Entfernung beträgt maximal 2000m. Im Hintergrund sind zwei hellgraue Kreise zu erkennen,
von denen der erste 1000m Durchmesser angibt, der zweite zeigt 2000m Durchmesser.
Flugzeuge, die sich jenseits 2000m Entfernung befinden, werden auf dem Kreis liegend dargestellt.
Wenn sich Flugzeuge weiter als 4000m entfernt befindet, verschwindet das Mini-\fl-Radar.

\marginpar{\includegraphics[angle=0,width=\linewidth,keepaspectratio='true']{figures/flarmrose.png}}

Expand Down
3 changes: 2 additions & 1 deletion doc/manual/en/ch07_airspace_and_flarm.tex
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,8 @@ \subsection*{FLARM radar}
clearly shows that the display is oriented as such. The scale of the
display is linear up to maximum distance of 2000~m. On the
background there are two rings; the first is a 1000~m radius and the second
is 2000~m. Traffic further away than 2000~m is drawn at the 2000~m ring.
is 2000~m. Traffic farther away than 2000~m is drawn at the 2000~m ring.
When traffic is farther than 4000~m away, the small radar view disappears.
\sketch{figures/flarmrose.png}

All the FLARM displays shows FLARM traffic in colours according to
Expand Down
2 changes: 2 additions & 0 deletions doc/manual/fr/ch07_airspace_and_flarm.tex
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ \subsection*{Radar FLARM}
Pour palier à cette situation, quand un trafic FLARM est reçu, \xc{} affiche une petite fenêtre de type FLARM du point de vue de l'aéronef. Le trafic FLARM est représenté de la même façon, mais les trafics menaçants sont rendues plus visibles en étant entourées de un ou deux cercles rouges. Le coin d'affichage de cette vue radar FLARM peut être paramétré\config{flarmradar-place}.

Cette vue de radar FLARM est affichée en mode ``Route en haut'' et un petit planeur, au centre, rappelle ce mode d'affichage. L'échelle est linéaire jusqu'à 2000~mètres. En fond d'écran il y a 2~cercles~: le premier a un rayon de 1000~m et le second de 2000~m. Le trafic distant de plus de 2~km du centre est représenté sur le cercle des 2~km.
Lorsque le trafic est à plus de 4~km, la petite vue radar disparaît.

\sketch{figures/flarmrose.png}

Tous les affichages du trafic FLARM montrent le trafic avec les mêmes couleurs, symbolisant la menace potentielle ou le vol en équipe. Les couleurs sont~:
Expand Down
4 changes: 3 additions & 1 deletion src/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1164,8 +1164,10 @@ MainWindow::UpdateTrafficGaugeVisibility() noexcept
if (HasDialog())
return;

if (!flarm.traffic.InCloseRange())
if (!flarm.traffic.InCloseRange()) {
traffic_gauge.Hide();
return;
}

if (!traffic_gauge.IsDefined())
traffic_gauge.Set(new GaugeFLARM(CommonInterface::GetLiveBlackboard(),
Expand Down

0 comments on commit 860605f

Please sign in to comment.