From ffbaa6230f2f8cad3c3be3b253cc4f4836c3a288 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Sun, 2 Aug 2026 12:30:37 -0500 Subject: [PATCH] smaller screen optimization on prop path calculation --- lib/microwaveprop_web/live/path_live.ex | 190 ++++++++++++------------ 1 file changed, 99 insertions(+), 91 deletions(-) diff --git a/lib/microwaveprop_web/live/path_live.ex b/lib/microwaveprop_web/live/path_live.ex index d0d2025f..59e4770d 100644 --- a/lib/microwaveprop_web/live/path_live.ex +++ b/lib/microwaveprop_web/live/path_live.ex @@ -523,7 +523,8 @@ defmodule MicrowavepropWeb.PathLive do class="btn btn-sm btn-outline gap-1" title="Use device GPS" > - <.icon name="hero-map-pin" class="size-3.5" /> My Location + <.icon name="hero-map-pin" class="size-3.5" /> + @@ -678,11 +679,11 @@ defmodule MicrowavepropWeb.PathLive do
Distance -
{format_km_mi(@result.dist_km)}
+
{format_km_mi(@result.dist_km)}
Bearing -
{format_number(@result.bearing)}°
+
{format_number(@result.bearing)}°
<%= if @result.terrain do %>
@@ -697,7 +698,10 @@ defmodule MicrowavepropWeb.PathLive do <%= if @result.scoring do %>
Propagation -
+
{@result.scoring.score}/100
@@ -820,14 +824,16 @@ defmodule MicrowavepropWeb.PathLive do
Temperature -
{format_number(@result.conditions.temp_f)}°F
+
+ {format_number(@result.conditions.temp_f)}°F +
{format_number(@result.conditions.temp_c)}°C
Dewpoint -
+
{format_number(@result.conditions.dewpoint_f)}°F
@@ -836,37 +842,37 @@ defmodule MicrowavepropWeb.PathLive do
T/Td Gap -
+
{format_number(@result.conditions.temp_f - @result.conditions.dewpoint_f)}°F
Abs Humidity -
+
{format_number(@result.conditions.abs_humidity)} g/m³
Pressure -
+
{format_number(@result.conditions.pressure_mb || 0)} mb
PWAT -
+
{format_number(@result.conditions.pwat_mm || 0)} mm
BL Depth -
+
{format_number(@result.conditions.bl_depth_m || 0)} m
Refrac Gradient -
+
{format_number(@result.conditions.min_refractivity_gradient || 0)} N/km
@@ -1036,9 +1042,9 @@ defmodule MicrowavepropWeb.PathLive do defp ionosphere_readout(assigns) do ~H"""
-
+
Ionosphere · Sporadic-E Potential
-
+
{@readout.station_code} ยท {Calendar.strftime(@readout.valid_time, "%Y-%m-%d %H:%M UTC")}
@@ -1127,91 +1133,93 @@ defmodule MicrowavepropWeb.PathLive do {Phoenix.HTML.raw(@trend)}
- - <%= for s <- [0, 25, 50, 75, 100] do %> - <% y = 20 + (100 - s) / 100 * 185 %> - + + <%= for s <- [0, 25, 50, 75, 100] do %> + <% y = 20 + (100 - s) / 100 * 185 %> + + + {s} + + <% end %> + - - {s} - - <% end %> - - <%= for pt <- @points do %> + <%= for pt <- @points do %> + + <% end %> - <% end %> - - - - {@best_pt.score} - - <%= for {x, label} <- @x_labels do %> + - {label} + {@best_pt.score} - <% end %> - -
+ <%= for {x, label} <- @x_labels do %> + + {label} + + <% end %> + +
+
Best: