Skip to content
/ ahrs Public

Estimation algorithm based off xioTechnologies Fusion library for Go.

License

Notifications You must be signed in to change notification settings

soypat/ahrs

Repository files navigation

ahrs

Estimation algorithm based off xioTechnologies Fusion library for Go.

package main

import (
	"fmt"
	"time"

	"github.com/soypat/ahrs"
)

func main() {
    imu := YourIMUInterface()
    estimator := ahrs.NewXioARS(1, imu)
    dt := time.Second
    tick := time.NewTicker(dt)
    for range tick.C {
        estimator.Update(dt.Seconds())
        attitude := estimator.GetQuaternion()
        rot := ahrs.RotationMatrixFromQuat(attitude)

        eulerAngles := rot.TaitBryan(ahrs.OrderXYZ)
        fmt.Printf("IMU attitude: %+v", eulerAngles)
    }
}

About

Estimation algorithm based off xioTechnologies Fusion library for Go.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages