implement distanceTo and courseTo

This commit is contained in:
2022-12-14 13:21:16 +01:00
parent 787cd5e72b
commit 49145d2b0f
3 changed files with 35 additions and 5 deletions
+7 -4
View File
@@ -13,8 +13,12 @@
#define ROUTE_H
#include <cstdint>
#include <list>
#include <list>
#include <cmath>
#define ROUTE_DEGREE_TO_RADIANT 0.01745
#define ROUTE_DISTANCE_BETWEEN_LATITUDE 111300
#define ROUTE_PI 3.14159265358979323846
/**
* @brief A to handle points on the earth
@@ -55,9 +59,8 @@ class Point{
*/
bool isValid() const { return this->lat + this->lon; }
// FIXME: Add real implementations!
double distanceTo(const Point& point) const { return 0; }
double courseTo(const Point& point) const { return 0; }
double distanceTo(const Point& point) const;
double courseTo(const Point& point) const;
};
/**