Find nearest radar site

This commit is contained in:
Dan Paulat 2023-02-19 13:01:19 -06:00
parent b739aad4bb
commit 4a31cf6d3e
3 changed files with 91 additions and 4 deletions

View file

@ -1,6 +1,7 @@
#pragma once
#include <memory>
#include <optional>
#include <string>
#include <vector>
@ -38,6 +39,20 @@ public:
static std::shared_ptr<RadarSite> Get(const std::string& id);
static std::vector<std::shared_ptr<RadarSite>> GetAll();
/**
* Find the nearest radar site to the supplied location.
*
* @param latitude Latitude in degrees
* @param longitude Longitude in degrees
* @param type Restrict results to optional radar type
*
* @return Nearest radar site
*/
static std::shared_ptr<RadarSite>
FindNearest(double latitude,
double longitude,
std::optional<std::string> type = std::nullopt);
static void Initialize();
static size_t ReadConfig(const std::string& path);