Fix heading check delta on cam.
This commit is contained in:
parent
4d61a6b21d
commit
af66066235
|
|
@ -680,8 +680,9 @@ int lightship_check() {
|
|||
itss_space_get();
|
||||
|
||||
// Check heading delta > 4º
|
||||
int diff = ((epv.space.heading - lightship->last_pos.heading) + 180) % 360 - 180;
|
||||
if (diff > 40) rv = 1;
|
||||
int diff = epv.space.heading - lightship->last_pos.heading;
|
||||
diff += (diff > 180) ? -360 : (diff < -180) ? 360 : 0;
|
||||
if (abs(diff) > 40) rv = 1;
|
||||
|
||||
if (!rv) {
|
||||
// Check speed delta > 0.5 m/s
|
||||
|
|
|
|||
Loading…
Reference in New Issue