2016-11-29 18:34:21 -08:00
|
|
|
import numpy as np
|
|
|
|
|
|
|
|
|
|
class Conversions:
|
2018-06-04 15:39:54 -04:00
|
|
|
#Speed
|
2017-08-09 17:32:45 -07:00
|
|
|
MPH_TO_KPH = 1.609344
|
|
|
|
|
KPH_TO_MPH = 1. / MPH_TO_KPH
|
2016-11-29 18:34:21 -08:00
|
|
|
MS_TO_KPH = 3.6
|
2017-08-09 17:32:45 -07:00
|
|
|
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
|
2016-11-29 18:34:21 -08:00
|
|
|
MS_TO_KNOTS = 1.9438
|
2017-08-09 17:32:45 -07:00
|
|
|
KNOTS_TO_MS = 1. / MS_TO_KNOTS
|
2018-06-04 15:39:54 -04:00
|
|
|
#Angle
|
2017-08-09 17:32:45 -07:00
|
|
|
DEG_TO_RAD = np.pi/180.
|
|
|
|
|
RAD_TO_DEG = 1. / DEG_TO_RAD
|
2018-06-04 15:39:54 -04:00
|
|
|
#Mass
|
|
|
|
|
LB_TO_KG = 0.453592
|
2016-11-29 18:34:21 -08:00
|
|
|
|
|
|
|
|
|
2019-09-09 23:03:02 +00:00
|
|
|
RADAR_TO_CENTER = 2.7 # (deprecated) RADAR is ~ 2.7m ahead from center of car
|
|
|
|
|
RADAR_TO_CAMERA = 1.52 # RADAR is ~ 1.5m ahead from center of mesh frame
|
2016-11-29 18:34:21 -08:00
|
|
|
|
|
|
|
|
class UIParams:
|
2017-10-31 02:27:39 -07:00
|
|
|
lidar_x, lidar_y, lidar_zoom = 384, 960, 6
|
2016-11-29 18:34:21 -08:00
|
|
|
lidar_car_x, lidar_car_y = lidar_x/2., lidar_y/1.1
|
|
|
|
|
car_hwidth = 1.7272/2 * lidar_zoom
|
|
|
|
|
car_front = 2.6924 * lidar_zoom
|
|
|
|
|
car_back = 1.8796 * lidar_zoom
|
|
|
|
|
car_color = 110
|
|
|
|
|
|