Skip to content

A spy satellite simulator in your browser, except the data is real. Live open source spatial intelligence on a photorealistic 3D globe.

330 B
Raw Blame
/**
 * Format a compass direction for the awareness overlay.
 * @param {number} degrees
 * @returns {string}
 */
export function formatAwarenessDirection(degrees) {
  if (!Number.isFinite(degrees)) return '—';
  const normalized = ((degrees % 360) + 360) % 360;
  return String(Math.round(normalized) % 360).padStart(3, '0');
}