Skip to content

Commit

Permalink
Update Test_Sighting.html
Browse files Browse the repository at this point in the history
  • Loading branch information
pdr0663 authored Sep 2, 2024
1 parent 84a09b7 commit 3544069
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Test_Sighting.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ <h1>Compass Bearing</h1>
// Function to update the bearing
function updateBearing(event) {
let alpha = event.alpha;
const true_bearing = event.alpha;
const magnetic_bearing = event.webkitCompassHeading;
/*
// Adjust for different screen orientations
if (window.orientation === 0) { // Portrait
Expand Down Expand Up @@ -69,7 +71,7 @@ <h1>Compass Bearing</h1>
function captureBearing() {
if (currentBearing !== null) {
// document.getElementById('bearing').value = currentBearing + "°";
document.getElementById('bearing').value = "alpha B " + currentBearing;
document.getElementById('bearing').value = "C -> " + 'M' + magnetic_bearing + " T" + true_bearing;
} else {
document.getElementById('bearing').value = "No compass data available";
}
Expand Down

0 comments on commit 3544069

Please sign in to comment.