2020-08-18 21:26:43 +08:00
|
|
|
#pragma once
|
2021-10-19 19:04:01 -07:00
|
|
|
|
|
|
|
|
#include <array>
|
2022-05-18 14:11:57 -07:00
|
|
|
#include "common/mat.h"
|
2022-06-11 16:38:24 -07:00
|
|
|
#include "system/hardware/hw.h"
|
2021-10-19 19:04:01 -07:00
|
|
|
|
2022-09-30 05:52:41 +09:00
|
|
|
const int TRAJECTORY_SIZE = 33;
|
2021-07-30 14:34:29 -07:00
|
|
|
const int LAT_MPC_N = 16;
|
2021-08-12 21:06:26 -07:00
|
|
|
const int LON_MPC_N = 32;
|
2021-01-14 18:43:50 -08:00
|
|
|
const float MIN_DRAW_DISTANCE = 10.0;
|
|
|
|
|
const float MAX_DRAW_DISTANCE = 100.0;
|
2020-01-17 11:01:02 -08:00
|
|
|
|
2023-06-23 16:49:14 -07:00
|
|
|
const float RYG_GREEN = 0.01165;
|
|
|
|
|
const float RYG_YELLOW = 0.06157;
|
|
|
|
|
|
2021-12-17 06:19:46 +08:00
|
|
|
template <typename T, size_t size>
|
|
|
|
|
constexpr std::array<T, size> build_idxs(float max_val) {
|
|
|
|
|
std::array<T, size> result{};
|
|
|
|
|
for (int i = 0; i < size; ++i) {
|
|
|
|
|
result[i] = max_val * ((i / (double)(size - 1)) * (i / (double)(size - 1)));
|
2021-10-19 19:04:01 -07:00
|
|
|
}
|
2021-12-17 06:19:46 +08:00
|
|
|
return result;
|
2021-10-19 19:04:01 -07:00
|
|
|
}
|
|
|
|
|
|
2021-12-17 06:19:46 +08:00
|
|
|
constexpr auto T_IDXS = build_idxs<double, TRAJECTORY_SIZE>(10.0);
|
|
|
|
|
constexpr auto T_IDXS_FLOAT = build_idxs<float, TRAJECTORY_SIZE>(10.0);
|
|
|
|
|
constexpr auto X_IDXS = build_idxs<double, TRAJECTORY_SIZE>(192.0);
|
|
|
|
|
constexpr auto X_IDXS_FLOAT = build_idxs<float, TRAJECTORY_SIZE>(192.0);
|
2021-03-03 18:47:48 +08:00
|
|
|
|
2023-07-01 15:26:21 +08:00
|
|
|
const mat3 FCAM_INTRINSIC_MATRIX = (mat3){{2648.0, 0.0, 1928.0 / 2,
|
2022-04-18 17:55:23 -07:00
|
|
|
0.0, 2648.0, 1208.0 / 2,
|
|
|
|
|
0.0, 0.0, 1.0}};
|
2021-04-07 19:12:35 +02:00
|
|
|
|
2022-02-21 19:57:04 -08:00
|
|
|
// tici ecam focal probably wrong? magnification is not consistent across frame
|
|
|
|
|
// Need to retrain model before this can be changed
|
2023-07-01 15:26:21 +08:00
|
|
|
const mat3 ECAM_INTRINSIC_MATRIX = (mat3){{567.0, 0.0, 1928.0 / 2,
|
2022-02-21 19:57:04 -08:00
|
|
|
0.0, 567.0, 1208.0 / 2,
|
2021-09-07 06:12:27 +08:00
|
|
|
0.0, 0.0, 1.0}};
|