32 lines
1.3 KiB
C++
32 lines
1.3 KiB
C++
#include <fsfw/globalfunctions/math/VectorOperations.h>
|
|
|
|
#include "AcsParameters.h"
|
|
|
|
class SusConverter {
|
|
public:
|
|
SusConverter() {}
|
|
|
|
uint64_t checkSunSensorData(const uint16_t susChannel[6]);
|
|
bool checkValidity(bool* susValid, const uint64_t brightness[12], const float threshold);
|
|
void calculateSunVector(float* sunVectorSensorFrame, const uint16_t susChannel[6]);
|
|
|
|
private:
|
|
static const uint8_t GNDREF = 4;
|
|
// =2^12[Bit]high borderline for the channel values of one sun sensor for validity Check
|
|
static constexpr uint16_t SUS_CHANNEL_VALUE_HIGH = 4096;
|
|
// [Bit]low borderline for the channel values of one sun sensor for validity Check
|
|
static constexpr uint8_t SUS_CHANNEL_VALUE_LOW = 0;
|
|
// 4096[Bit]high borderline for check if the sun sensor is illuminated by the sun or by the
|
|
// reflection of sunlight from the moon/earth
|
|
static constexpr uint16_t SUS_ALBEDO_CHECK = 1000;
|
|
// [Bit]low borderline for check if the sun sensor is illuminated by the sun or by the reflection
|
|
// of sunlight from the moon/earth
|
|
static constexpr uint8_t SUS_CHANNEL_SUM_LOW = 0;
|
|
|
|
static constexpr float S = 0.03; // S=[mm] gap between diodes
|
|
static constexpr float D = 5; // D=[mm] edge length of the quadratic aperture
|
|
static constexpr float H = 1; // H=[mm] distance between diodes and aperture
|
|
|
|
AcsParameters acsParameters;
|
|
};
|