Fixed setN (?)

This commit is contained in:
Zakary Timson 2019-09-02 22:15:30 -04:00
parent 10a0f97e0d
commit 194ae4643f

View File

@ -52,7 +52,7 @@ export class PhysicsService {
this.requireCalibration.emit();
}
info.heading = -(data[1] ? data[1].alpha : 0) + (data[2] == Infinity ? 0 : data[2]);
info.heading = -(data[1] ? data[1].alpha : 0) - (data[2] == Infinity ? 0 : data[2]);
if(info.heading < 0) info.heading += 360;
if(info.heading >= 360) info.heading -= 360;
}