kopia lustrzana https://github.com/cyoung/stratux
Maybe make the orientation process more consistent.
rodzic
51fd728cc6
commit
7af6f20884
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
<span class="col-xs-3 text-center">{{ahrs_heading}}°</span>
|
||||
<span class="col-xs-3 text-center">{{ahrs_pitch}}°</span>
|
||||
<span class="col-xs-3 text-center">{{ahrs_roll}}°</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>
|
||||
|
|
Ładowanie…
Reference in New Issue