Initial Vec2 impl ready for algo

This commit is contained in:
2026-03-31 00:24:48 +02:00
parent 5e19e7daa8
commit 46c652181c
8 changed files with 90 additions and 22 deletions

View File

@@ -23,6 +23,15 @@ struct LatLng {
float lng_;
};
struct Vec2 {
float x_;
float y_;
};
Vec2 eqRectProjection(const LatLng target, const LatLng ref);
Vec2 abMidpoint(const Vec2 A, const Vec2 B);
float abSqDist(const Vec2 A, const Vec2 B);
struct TrackData {
uint16_t magic_ = CONFIG_MAGIC;
unsigned short id_;
@@ -31,6 +40,12 @@ struct TrackData {
LatLng point_b_;
};
struct GlobalTrackData {
bool loaded = false;
Vec2 center_;
TrackData root_;
};
struct GpsSubData {
uint32_t age_;
bool valid_;