Skip to content

Commit

Permalink
push orientation data behind motion data
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgilbers committed Sep 24, 2024
1 parent 715c2b0 commit f11762a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/sensor.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ const estimationError = 0.01 // Anfangsfehlerabschätzung
const kalman = new KalmanFilter(dt, processNoise, measurementNoise, estimationError)

if (debug) {
handleOrientation({ alpha: 69, beta: 32, gamma: 80, webkitCompassHeading: 359 })
handleMotion()
handleOrientation({ alpha: 69, beta: 32, gamma: 80, webkitCompassHeading: 359 })
}
function handleOrientation (event) {
if (debug) {
Expand All @@ -34,7 +34,7 @@ function handleOrientation (event) {
orientationArray.push([30, 14, 69])
} else {
// orientationArray = addValue([event.webkitCompassHeading, event.beta, event.gamma], orientationArray)
downloadArray.push([event.webkitCompassHeading, event.beta, event.gamma])
downloadArray[downloadArray.length - 1].push(event.webkitCompassHeading, event.beta, event.gamma)
}
updateFieldIfNotNull('Orientation_a', event.alpha)
updateFieldIfNotNull('Orientation_b', event.beta)
Expand Down

0 comments on commit f11762a

Please sign in to comment.