Files
dragonpilot/common/conversions.py
Dragonpilot Team 4d7a40310f dragonpilot 2022-08-11T09:38:43 for EON/C2
version: dragonpilot v0.8.16 beta for EON/C2
date: 2022-08-11T09:38:43
dp-dev(priv2) master commit: c6cd233f23f60e7a6055d42850bc593c0e69082e
2022-08-11 09:48:37 +00:00

20 lines
383 B
Python

import numpy as np
class Conversions:
# Speed
MPH_TO_KPH = 1.609344
KPH_TO_MPH = 1. / MPH_TO_KPH
MS_TO_KPH = 3.6
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
MS_TO_KNOTS = 1.9438
KNOTS_TO_MS = 1. / MS_TO_KNOTS
# Angle
DEG_TO_RAD = np.pi / 180.
RAD_TO_DEG = 1. / DEG_TO_RAD
# Mass
LB_TO_KG = 0.453592