From 7bcab97eee4dd3515955e28c0cefbc3c02c1ccda Mon Sep 17 00:00:00 2001 From: FrogAi <91348155+FrogAi@users.noreply.github.com> Date: Fri, 7 Jun 2024 03:05:56 -0700 Subject: [PATCH] FrogPilot setup - Add more conversions --- common/conversions.py | 4 ++++ common/util.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/common/conversions.py b/common/conversions.py index b02b33c62..e0506e520 100644 --- a/common/conversions.py +++ b/common/conversions.py @@ -8,6 +8,10 @@ class Conversions: KPH_TO_MS = 1. / MS_TO_KPH MS_TO_MPH = MS_TO_KPH * KPH_TO_MPH MPH_TO_MS = MPH_TO_KPH * KPH_TO_MS + 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 MS_TO_KNOTS = 1.9438 KNOTS_TO_MS = 1. / MS_TO_KNOTS diff --git a/common/util.h b/common/util.h index 186873ac2..4c67312a4 100644 --- a/common/util.h +++ b/common/util.h @@ -36,6 +36,9 @@ const double MS_TO_KPH = 3.6; const double MS_TO_MPH = MS_TO_KPH * KM_TO_MILE; const double METER_TO_MILE = KM_TO_MILE / 1000.0; const double METER_TO_FOOT = 3.28084; +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; namespace util {