First Version of ACS Controller #329
@ -1,8 +1,8 @@
|
||||
#include <fsfw/src/fsfw/globalfunctions/constants.h>
|
||||
#include "AcsParameters.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <cmath>
|
||||
//#include <stddef.h>
|
||||
#include <math.h>
|
||||
|
||||
AcsParameters::AcsParameters() {
|
||||
|
||||
|
@ -6,17 +6,16 @@
|
||||
*/
|
||||
|
||||
#include "Igrf13Model.h"
|
||||
#include <cmath>
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
//#include <time.h>
|
||||
#include <fsfw/src/fsfw/globalfunctions/constants.h>
|
||||
#include <fsfw/src/fsfw/globalfunctions/math/MatrixOperations.h>
|
||||
#include <fsfw/src/fsfw/globalfunctions/math/QuaternionOperations.h>
|
||||
#include <fsfw/src/fsfw/globalfunctions/math/VectorOperations.h>
|
||||
#include <acs/util/MathOperations.h>
|
||||
|
||||
using namespace Math;
|
||||
|
||||
Igrf13Model::Igrf13Model(){
|
||||
}
|
||||
@ -28,7 +27,7 @@ void Igrf13Model::magFieldComp(const double longitude, const double gcLatitude,
|
||||
|
||||
double phi = longitude, theta = gcLatitude; //geocentric
|
||||
/* Here is the co-latitude needed*/
|
||||
theta -= 90*PI/180;
|
||||
theta -= 90*Math::PI/180;
|
||||
theta *= (-1);
|
||||
|
||||
double rE = 6371200.0; // radius earth [m]
|
||||
|
@ -16,15 +16,16 @@
|
||||
#ifndef IGRF13MODEL_H_
|
||||
#define IGRF13MODEL_H_
|
||||
|
||||
#include <cmath>
|
||||
#include <fsfw/parameters/HasParametersIF.h>
|
||||
//#include <cmath>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
|
||||
// Output should be transformed to [T] instead of [nT]
|
||||
// Updating Coefficients has to be implemented yet. Question, updating everyday ?
|
||||
class Igrf13Model {
|
||||
class Igrf13Model:public HasParametersIF{
|
||||
|
||||
public:
|
||||
Igrf13Model();
|
||||
@ -79,12 +80,12 @@ private:
|
||||
{ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0.5,-0.4},
|
||||
{ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,-0.6}}; // [m][n] in nT
|
||||
|
||||
const double svG[14][13] = {{5.7, -11, 2.2, -1.2, -0.3, -0.5, -0.1, 0, 0, 0, 0, 0 ,0},
|
||||
{7.4, -7, -5.9, -1.6, 0.5, -0.3, -0.2, 0.1, 0, 0, 0, 0,0},
|
||||
{0, -2.1, 3.1, -5.9, -0.6, 0.4, 0, -0.1, 0, 0, 0, 0, 0},
|
||||
{0, 0, -12, 5.2, 0.2, 1.3, 0.7, 0.4, 0, 0, 0, 0, 0},
|
||||
const double svG[14][13] = {{5.7,-11.0, 2.2,-1.2,-0.3,-0.5,-0.1, 0 , 0, 0, 0, 0 ,0},
|
||||
{7.4, -7.0, -5.9,-1.6, 0.5,-0.3,-0.2, 0.1, 0, 0, 0, 0, 0},
|
||||
{0 , -2.1, 3.1,-5.9,-0.6, 0.4, 0.0,-0.1, 0, 0, 0, 0, 0},
|
||||
{0 , 0 ,-12.0, 5.2, 0.2, 1.3, 0.7, 0.4, 0, 0, 0, 0, 0},
|
||||
{0 , 0 , 0 ,-5.1, 1.3,-1.4, 0.1,-0.1, 0, 0, 0, 0, 0},
|
||||
{0, 0, 0, 0, 0.9, 0, -0.5, 0.4, 0, 0, 0, 0, 0},
|
||||
{0 , 0 , 0 , 0 , 0.9, 0.0,-0.5, 0.4, 0, 0, 0, 0, 0},
|
||||
{0 , 0 , 0 , 0 , 0 , 0.9,-0.8, 0.3, 0, 0, 0, 0, 0},
|
||||
{0 , 0 , 0 , 0 , 0 , 0 , 0.8,-0.1, 0, 0, 0, 0, 0},
|
||||
{0 , 0 , 0 , 0 , 0 , 0 , 0 , 0.4, 0, 0, 0, 0, 0},
|
||||
@ -94,13 +95,13 @@ private:
|
||||
{0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0, 0, 0, 0, 0},
|
||||
{0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0, 0, 0, 0, 0}}; // [m][n] in nT
|
||||
|
||||
const double svH[14][13] = {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
||||
{-25.9, -30.2, 6, -0.1, 0, 0, 0.6, -0.2, 0, 0, 0, 0,0},
|
||||
const double svH[14][13] = {{ 0.0, 0.0, 0 , 0.0, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0},
|
||||
{-25.9,-30.2, 6.0,-0.1, 0.0, 0.0, 0.6,-0.2, 0, 0, 0, 0, 0},
|
||||
{ 0 ,-22.4,-1.1, 6.5, 2.5,-1.6, 0.6, 0.6, 0, 0, 0, 0, 0},
|
||||
{ 0 , 0 , 0.5, 3.6,-0.6,-1.3,-0.8,-0.2, 0, 0, 0, 0, 0},
|
||||
{0 ,0 ,0, -5, 3, 0.8, -0.2, 0.5, 0, 0, 0, 0, 0},
|
||||
{0, 0, 0, 0, 0.3, 0, -1.1, -0.3, 0, 0, 0, 0, 0},
|
||||
{0, 0, 0, 0, 0, 1, 0.1, -0.4, 0, 0, 0, 0, 0},
|
||||
{ 0 , 0 , 0 ,-5.0, 3.0, 0.8,-0.2, 0.5, 0, 0, 0, 0, 0},
|
||||
{ 0 , 0 , 0 , 0 , 0.3, 0.0,-1.1,-0.3, 0, 0, 0, 0, 0},
|
||||
{ 0 , 0 , 0 , 0 , 0 , 1.0, 0.1,-0.4, 0, 0, 0, 0, 0},
|
||||
{ 0 , 0 , 0 , 0 , 0 , 0 , 0.3, 0.5, 0, 0, 0, 0, 0},
|
||||
{ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0, 0, 0, 0, 0},
|
||||
{ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0, 0, 0, 0, 0},
|
||||
|
@ -8,7 +8,7 @@
|
||||
#ifndef MATH_MATHOPERATIONS_H_
|
||||
#define MATH_MATHOPERATIONS_H_
|
||||
|
||||
#include <cmath>
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <fsfw/src/fsfw/globalfunctions/constants.h>
|
||||
|
Loading…
Reference in New Issue
Block a user