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 4, 2024
1 parent b253ef0 commit 284f4c8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Test_Sighting.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</head>
<body>
<h1>Compass Bearing</h1>
<p id="instruction">Press the button to request permission and capture the bearing.</p>
<p id="instruction">Press the button to request permission and capture the bearing.<br>Rev A</p>
<input type="text" id="bearing" readonly placeholder="Bearing will appear here">
<button id="permissionButton">Request Permission & Capture Bearing</button>
<button id="captureButton" style="display: none;">Capture Bearing</button>
Expand All @@ -38,8 +38,8 @@ <h1>Compass Bearing</h1>
// Function to update the bearing
function updateBearing(event) {
let alpha = event.alpha;
let true_bearing = event.alpha;
let magnetic_bearing = event.webkitCompassHeading;
true_bearing = event.alpha;
magnetic_bearing = event.webkitCompassHeading;
/*
// Adjust for different screen orientations
if (window.orientation === 0) { // Portrait
Expand Down Expand Up @@ -76,7 +76,7 @@ <h1>Compass Bearing</h1>
console.log(true_bearing);
console.log(magnetic_bearing);
console.log();
document.getElementById('bearing').value = "D -> " + "M" + magnetic_bearing + " T" + true_bearing;
document.getElementById('bearing').value = "M" + magnetic_bearing + " T" + true_bearing;
} else {
document.getElementById('bearing').value = "No compass data available";
}
Expand Down

0 comments on commit 284f4c8

Please sign in to comment.