Changed where we reverse things

This commit is contained in:
Zakary Timson 2019-07-11 18:29:38 -04:00
parent 8a91b61b48
commit 3153d94c3d
2 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ export class MapComponent {
if(this.position.heading != null) { if(this.position.heading != null) {
let marker: HTMLElement = document.querySelector('img[src*="arrow.png"]'); let marker: HTMLElement = document.querySelector('img[src*="arrow.png"]');
if(marker) marker.style.transform = `rotate(-${this.position.heading}deg)` if(marker) marker.style.transform = `rotate(${this.position.heading}deg)`
} }
} }
}); });

View File

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