/** * LocationPanel Component * Displays DE and DX location info with grid squares and sun times */ import React from 'react'; import { calculateGridSquare, calculateBearing, calculateDistance, getMoonPhase, getMoonPhaseEmoji } from '../utils/geo.js'; export const LocationPanel = ({ config, dxLocation, deSunTimes, dxSunTimes, currentTime }) => { const deGrid = calculateGridSquare(config.location.lat, config.location.lon); const dxGrid = calculateGridSquare(dxLocation.lat, dxLocation.lon); const bearing = calculateBearing(config.location.lat, config.location.lon, dxLocation.lat, dxLocation.lon); const distance = calculateDistance(config.location.lat, config.location.lon, dxLocation.lat, dxLocation.lon); const moonPhase = getMoonPhase(currentTime); const moonEmoji = getMoonPhaseEmoji(moonPhase); return (