fixed usage of sunMagAngleMin
This commit is contained in:
parent
e4936b1bed
commit
c338c4fb58
@ -129,10 +129,8 @@ void SafeCtrl::safeNoMekf(timeval now, double *susDirB, bool susDirBValid, doubl
|
|||||||
/* Only valid if angle between sun direction and magnetic field direction
|
/* Only valid if angle between sun direction and magnetic field direction
|
||||||
is sufficiently large */
|
is sufficiently large */
|
||||||
|
|
||||||
double sinAngle = 0;
|
double angleSunMag = acos(cosAngleSunMag);
|
||||||
sinAngle = sin(acos(cos(cosAngleSunMag)));
|
if (angleSunMag < safeModeControllerParameters->sunMagAngleMin) {
|
||||||
|
|
||||||
if (!(sinAngle > sin(safeModeControllerParameters->sunMagAngleMin * M_PI / 180))) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user