fixed minor bugs
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
2022-09-27 11:57:15 +02:00
parent 5f17f365e3
commit 4a1cce19c4
8 changed files with 48 additions and 43 deletions

View File

@ -12,21 +12,6 @@
#include <fsfw/datapoollocal/LocalPoolVariable.h>
#include <fsfw/datapoollocal/LocalPoolVector.h>
void SunSensor::setSunSensorData() {
// ToDo: exchange dummy values with DataPool
susChannelValues[0] = {3913, 3912, 3799, 4056};
susChannelValues[1] = {3913, 3912, 3799, 4056};
susChannelValues[2] = {3913, 3912, 3799, 4056};
susChannelValues[3] = {3913, 3912, 3799, 4056};
susChannelValues[4] = {3913, 3912, 3799, 4056};
susChannelValues[5] = {3913, 3912, 3799, 4056};
susChannelValues[6] = {3913, 3912, 3799, 4056};
susChannelValues[7] = {3913, 3912, 3799, 4056};
susChannelValues[8] = {3913, 3912, 3799, 4056};
susChannelValues[9] = {3913, 3912, 3799, 4056};
susChannelValues[10] = {3913, 3912, 3799, 4056};
susChannelValues[11] = {3913, 3912, 3799, 4056};
}
void SunSensor::checkSunSensorData(uint8_t susNumber) {
uint16_t channelValueSum;
@ -261,14 +246,14 @@ void SunSensor::CalculateSunVector(uint8_t susNumber) {
(sqrt(powf((tan(alpha * (M_PI / 180))), 2) + powf((tan(beta * (M_PI / 180))), 2) + (1))));
}
float* SunSensor::getSunVectorBodyFrame() {
float* SunSensor::getSunVectorBodyFrame(uint8_t susNumber) {
// return function for the sun vector in the body frame
float* SunVectorBodyFrameReturn = 0;
SunVectorBodyFrameReturn = new float[3];
SunVectorBodyFrameReturn[0] = sunVectorBodyFrame[0];
SunVectorBodyFrameReturn[1] = sunVectorBodyFrame[1];
SunVectorBodyFrameReturn[2] = sunVectorBodyFrame[2];
SunVectorBodyFrameReturn[0] = sunVectorBodyFrame[susNumber][0];
SunVectorBodyFrameReturn[1] = sunVectorBodyFrame[susNumber][1];
SunVectorBodyFrameReturn[2] = sunVectorBodyFrame[susNumber][2];
return SunVectorBodyFrameReturn;
}
@ -289,7 +274,7 @@ float* SunSensor::TransferSunVector() {
for (uint8_t susNumber = 0; susNumber < 12;
susNumber++) { // save the sun vector of each SUS in their body frame into an array for
// further processing
float* SunVectorBodyFrame = SunVectorBodyFrame[susNumber];
float* SunVectorBodyFrame = &SunVectorBodyFrame[susNumber];
sunVectorMatrixBodyFrame[0][susNumber] = SunVectorBodyFrame[0];
sunVectorMatrixBodyFrame[1][susNumber] = SunVectorBodyFrame[1];
sunVectorMatrixBodyFrame[2][susNumber] = SunVectorBodyFrame[2];