From 17a81ac769008c388644a4678ddf165b04526aa8 Mon Sep 17 00:00:00 2001 From: James <91348155+FrogAi@users.noreply.github.com> Date: Mon, 1 Dec 2025 12:00:00 -0700 Subject: [PATCH] FrogPilot conversions --- common/constants.py | 4 ++++ common/util.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/common/constants.py b/common/constants.py index 1653076b..55c23f75 100644 --- a/common/constants.py +++ b/common/constants.py @@ -20,6 +20,10 @@ class CV: LB_TO_KG = 0.453592 # FrogPilot variables + METER_TO_FOOT = 3.28084 + FOOT_TO_METER = 1. / METER_TO_FOOT + CM_TO_INCH = 1. / 2.54 + INCH_TO_CM = 1. / CM_TO_INCH ACCELERATION_DUE_TO_GRAVITY = 9.81 # m/s^2 diff --git a/common/util.h b/common/util.h index 7bccadb8..dfb12009 100644 --- a/common/util.h +++ b/common/util.h @@ -38,6 +38,9 @@ const double METER_TO_MILE = KM_TO_MILE / 1000.0; const double METER_TO_FOOT = 3.28084; // FrogPilot variables +const double FOOT_TO_METER = 1. / METER_TO_FOOT; +const double CM_TO_INCH = 1. / 2.54; +const double INCH_TO_CM = 1. / CM_TO_INCH; #define ALIGNED_SIZE(x, align) (((x) + (align)-1) & ~((align)-1))