Galaxis Codebase  1.0.0
Team Galaxis software stack for the Carolo Cup 2023 - ROS2 based software
Conversions.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <stdint.h>
5 
6 /*
7  * Converts the given light states for every of the four light channels
8  * into one integer
9  */
11  const uint8_t,
12  const uint8_t,
13  const uint8_t,
14  const uint8_t,
15  const uint8_t,
16  const uint8_t,
17  const uint8_t);
18 
19 /*
20  * Calculates the velocity of the car based on
21  * the given rpm that was measured using the rotary
22  * encoder and transmitted by the ECU to the software
23  */
25  const int64_t,
26  const float,
27  const float,
28  const float);
29 
30 /*
31  * Calculates the RPM for the given
32  * velocity considering the gear ratios
33  */
35  const float,
36  const float,
37  const float,
38  const float);
convertLightStatesIntoFinalState
uint16_t convertLightStatesIntoFinalState(const uint8_t, const uint8_t, const uint8_t, const uint8_t, const uint8_t, const uint8_t, const uint8_t)
Definition: Conversions.cpp:4
calculateVelocityByRpm
float calculateVelocityByRpm(const int64_t, const float, const float, const float)
Definition: Conversions.cpp:23
ServiceState.hpp
calculateRpmByVelocity
int64_t calculateRpmByVelocity(const float, const float, const float, const float)
Definition: Conversions.cpp:38