package
0.0.0-20250123172850-dd059ec48194
Repository: https://github.com/stratux/goflying.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
FromQuaternion calculates the Tait-Bryan angles phi, theta, psi corresponding to the quaternion.
Initialize the state at the start of the Kalman filter, based on current measurements.
Initialize the state at the start of the Kalman filter, based on current measurements.
MakeHardSoftRotationMatrix constructs a rotation matrix that rotates the unit vector h1 exactly into the unit vector h2 and the unit vector s1 as nearly as possible into the unit vector s2.
MakeOrthogonal returns a vector close to the input target vector but with the projection on the input ortho vector removed.
MakePerpendicular returns a vector that is perpendicular to both input vectors.
MakeUnitVector re-scales the vector vec into a unit vector.
No description provided by the author
NewMeasurement returns a pointer to an empty AHRS Measurement.
NewSimpleAHRS returns a new Simple AHRS object.
NewVarianceAccumulator(init, decay float64) returns a function that, when passed a float, accumulates the exponentially weighted mean and variance of the first differences with decay constant "decay".
QuaternionAToB constructs a quaternion Q such that QAQ* = B for arbitrary vectors A and B.
QuaternionNormalize re-scales the input quaternion to unit norm.
QuaternionRotate rotates a quaternion Qea by a small rate-of-change vector Ha (e.g.
QuaternionSign chooses the sign of quaternion q so that it is minimally distant from quaternion r.
QuaternionToRotationMatrix computes the rotation matrix r corresponding to a quaternion q.
Regularize ensures that roll, pitch, and heading are in the correct ranges.
RotationMatrixToQuaternion computes the quaternion q corresponding to a rotation matrix r.
ToQuaternion calculates the 0,1,2,3 components of the rotation quaternion corresponding to the Tait-Bryan angles phi, theta, psi.
VarFromQuaternion returns the standard deviation of the Tate-Bryan angles phi, theta, psi corresponding to the quaternion q0, q1, q2, q3 with stdev dq0, dq1, dq2, dq3.

# Constants

No description provided by the author
No description provided by the author
G is the acceleration due to gravity, kt/s.
2**15-1.
Exponential decay constant for measurement variances.
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
Measurement holds the measurements used for updating the Kalman filter: true airspeed, groundspeed, accelerations, gyro rates, magnetometer, time; along with variance accumulators and uncertainty matrix.
No description provided by the author
State holds the complete information describing the state of the aircraft Aircraft frame is noninertial: 1 is to nose; 2 is to left wing; 3 is up Earth frame is inertial: 1 is east; 2 is north; 3 is up Sensor frame is fixed within aircraft frame, so noninertial, rotated.

# Interfaces

AHRSProvider defines an AHRS (Kalman or other) algorithm, such as ahrs_kalman, ahrs_simple, etc.