|
@@ -79,7 +79,7 @@ namespace Lemma {
|
79
|
79
|
BMag = bfield.norm( );
|
80
|
80
|
BInc = std::acos (bfield.dot(Vector3r(0,0,1)) / BMag) ;
|
81
|
81
|
BDec = std::acos (bfield.dot(Vector3r(1,0,0)) / BMag) ;
|
82
|
|
- BFieldUnit = BField.array() / BMag;
|
|
82
|
+ BFieldUnit = BField / BField.norm();
|
83
|
83
|
}
|
84
|
84
|
|
85
|
85
|
void EarthModel::SetMagneticFieldIncDecMag(const Real &inc,
|
|
@@ -104,7 +104,7 @@ namespace Lemma {
|
104
|
104
|
BField(0) = BMag * cos(BInc*(PI/180.)) * cos(BDec*(PI/180.));
|
105
|
105
|
BField(1) = BMag * cos(BInc*(PI/180.)) * sin(BDec*(PI/180.));
|
106
|
106
|
BField(2) = BMag * sin(BInc*(PI/180.)) ;
|
107
|
|
- BFieldUnit = BField.array() / BMag;
|
|
107
|
+ BFieldUnit = BField / BField.norm();
|
108
|
108
|
}
|
109
|
109
|
|
110
|
110
|
// ==================== INQUIRY =======================
|
|
@@ -118,7 +118,7 @@ namespace Lemma {
|
118
|
118
|
}
|
119
|
119
|
|
120
|
120
|
Vector3r EarthModel::GetMagneticFieldUnitVector() {
|
121
|
|
- return this->BFieldUnit;
|
|
121
|
+ return BField/BField.norm();
|
122
|
122
|
}
|
123
|
123
|
|
124
|
124
|
Real EarthModel::GetMagneticFieldMagnitude() {
|