mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-05 00:05:59 +08:00
FrogPilot setup - Add more conversions
This commit is contained in:
@@ -11,6 +11,12 @@ class Conversions:
|
||||
MS_TO_KNOTS = 1.9438
|
||||
KNOTS_TO_MS = 1. / MS_TO_KNOTS
|
||||
|
||||
# Distance
|
||||
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
|
||||
|
||||
# Angle
|
||||
DEG_TO_RAD = np.pi / 180.
|
||||
RAD_TO_DEG = 1. / DEG_TO_RAD
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user