Fix heading delta on cam.

See merge request its/it2s-itss-facilities!2
This commit is contained in:
Diogo Jesus 2024-03-21 14:41:51 +00:00
commit 65585ea4a0
1 changed files with 1 additions and 0 deletions

View File

@ -437,6 +437,7 @@ int lightship_check() {
// Check heading delta > 4º // Check heading delta > 4º
int diff = epv.space.data.heading.value - lightship->last_pos.heading; int diff = epv.space.data.heading.value - lightship->last_pos.heading;
diff += (diff > 180) ? -360 : (diff < -180) ? 360 : 0;
if (abs(diff) > 40) rv = 1; if (abs(diff) > 40) rv = 1;
if (!rv) { if (!rv) {