Maybe make the orientation process more consistent.

pull/624/head
Eric Westphal 2017-06-13 17:48:34 -04:00
rodzic 51fd728cc6
commit 7af6f20884
3 zmienionych plików z 6 dodań i 3 usunięć

Wyświetl plik

@ -459,8 +459,9 @@ func handleOrientAHRS(w http.ResponseWriter, r *http.Request) {
log.Printf("AHRS Info: sensor orientation: received up direction %d\n", u)
if f == u || f == -u {
log.Println("AHRS Error: sensor orientation: up and forward axes cannot be the same")
http.Error(w, "up and forward axes cannot be the same", http.StatusBadRequest)
log.Printf("AHRS Error: sensor orientation: up (%d) and forward (%d) axes cannot be the same\n", u, f)
http.Error(w, fmt.Sprintf("up (%d) and forward (%d) axes cannot be the same", u, f),
http.StatusBadRequest)
return
}

Wyświetl plik

@ -376,6 +376,8 @@ func makeSensorRotationMatrix(g [3]float64) (rotmat *[3][3]float64) {
// This is used in the orientation process where the user specifies the forward and up directions.
func getMinAccelDirection() (i int, err error) {
myIMUReader.Read() // Clear out the averages
time.Sleep(500 * time.Millisecond) // Ensure we have enough values
_, _, _, _, a1, a2, a3, _, _, _, err, _ := myIMUReader.Read()
if err != nil {
return

Wyświetl plik

@ -61,7 +61,7 @@
<span class="col-xs-3 text-center">{{ahrs_heading}}&deg;</span>
<span class="col-xs-3 text-center">{{ahrs_pitch}}&deg;</span>
<span class="col-xs-3 text-center">{{ahrs_roll}}&deg;</span>
<span class="col-xs-3 text-center">{{ahrs_alt}} ft</span>
<span class="col-xs-3 text-center">{{ahrs_alt}}'</span>
</div>
<div class="row">
<strong class="col-xs-3 text-center">Mag Hdg</strong>