From 3153d94c3d88a74c467a323108c70579b099dd8b Mon Sep 17 00:00:00 2001 From: ztimson Date: Thu, 11 Jul 2019 18:29:38 -0400 Subject: [PATCH] Changed where we reverse things --- src/app/map/map.component.ts | 2 +- src/app/physics/physics.service.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/map/map.component.ts b/src/app/map/map.component.ts index b876e81..64ed801 100644 --- a/src/app/map/map.component.ts +++ b/src/app/map/map.component.ts @@ -36,7 +36,7 @@ export class MapComponent { if(this.position.heading != null) { 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)` } } }); diff --git a/src/app/physics/physics.service.ts b/src/app/physics/physics.service.ts index f34ddfa..8124614 100644 --- a/src/app/physics/physics.service.ts +++ b/src/app/physics/physics.service.ts @@ -63,7 +63,7 @@ export class PhysicsService { 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 < 0) info.heading += 360; }