convert Igrf13 model vector from nT to uT
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
This commit is contained in:
parent
a75e035cc5
commit
650f24d0ff
@ -20,6 +20,7 @@ Igrf13Model::~Igrf13Model() {}
|
|||||||
void Igrf13Model::magFieldComp(const double longitude, const double gcLatitude,
|
void Igrf13Model::magFieldComp(const double longitude, const double gcLatitude,
|
||||||
const double altitude, timeval timeOfMagMeasurement,
|
const double altitude, timeval timeOfMagMeasurement,
|
||||||
double* magFieldModelInertial) {
|
double* magFieldModelInertial) {
|
||||||
|
double magFieldModel[3] = {0, 0, 0};
|
||||||
double phi = longitude, theta = gcLatitude; // geocentric
|
double phi = longitude, theta = gcLatitude; // geocentric
|
||||||
/* Here is the co-latitude needed*/
|
/* Here is the co-latitude needed*/
|
||||||
theta -= 90 * PI / 180;
|
theta -= 90 * PI / 180;
|
||||||
@ -100,12 +101,8 @@ void Igrf13Model::magFieldComp(const double longitude, const double gcLatitude,
|
|||||||
magFieldModelInertial[2] =
|
magFieldModelInertial[2] =
|
||||||
magFieldModel[0] * sin(gcLatitude) - magFieldModel[1] * cos(gcLatitude);
|
magFieldModel[0] * sin(gcLatitude) - magFieldModel[1] * cos(gcLatitude);
|
||||||
|
|
||||||
double normVecMagFieldInert[3] = {0, 0, 0};
|
// convert nT to uT
|
||||||
VectorOperations<double>::normalize(magFieldModelInertial, normVecMagFieldInert, 3);
|
VectorOperations<double>::mulScalar(magFieldModelInertial, 1e-3, magFieldModelInertial, 3);
|
||||||
|
|
||||||
magFieldModel[0] = 0;
|
|
||||||
magFieldModel[1] = 0;
|
|
||||||
magFieldModel[2] = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Igrf13Model::updateCoeffGH(timeval timeOfMagMeasurement) {
|
void Igrf13Model::updateCoeffGH(timeval timeOfMagMeasurement) {
|
||||||
|
@ -47,7 +47,6 @@ class Igrf13Model /*:public HasParametersIF*/ {
|
|||||||
|
|
||||||
// Coefficient wary over year, could be updated sometimes.
|
// Coefficient wary over year, could be updated sometimes.
|
||||||
void updateCoeffGH(timeval timeOfMagMeasurement); // Secular variation (SV)
|
void updateCoeffGH(timeval timeOfMagMeasurement); // Secular variation (SV)
|
||||||
double magFieldModel[3];
|
|
||||||
void schmidtNormalization();
|
void schmidtNormalization();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user