conversions.py 383 B

12345678910111213141516171819
  1. import numpy as np
  2. class Conversions:
  3. # Speed
  4. MPH_TO_KPH = 1.609344
  5. KPH_TO_MPH = 1. / MPH_TO_KPH
  6. MS_TO_KPH = 3.6
  7. KPH_TO_MS = 1. / MS_TO_KPH
  8. MS_TO_MPH = MS_TO_KPH * KPH_TO_MPH
  9. MPH_TO_MS = MPH_TO_KPH * KPH_TO_MS
  10. MS_TO_KNOTS = 1.9438
  11. KNOTS_TO_MS = 1. / MS_TO_KNOTS
  12. # Angle
  13. DEG_TO_RAD = np.pi / 180.
  14. RAD_TO_DEG = 1. / DEG_TO_RAD
  15. # Mass
  16. LB_TO_KG = 0.453592