Documentation ¶
Overview ¶
Package sensors provides a stratux interface to sensors used for AHRS calculations.
Package sensors provides a stratux interface to sensors used for AHRS calculations.
Package sensors provides a stratux interface to sensors used for AHRS calculations.
Package sensors provides a stratux interface to sensors used for AHRS calculations.
Package sensors provides a stratux interface to sensors used for AHRS calculations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BMP280 ¶
type BMP280 struct {
// contains filtered or unexported fields
}
BMP280 represents a BMP280 sensor and implements the PressureSensor interface.
func NewBMP280 ¶
NewBMP280 looks for a BMP280 connected on the I2C bus having one of the valid addresses and begins reading it.
func (*BMP280) Temperature ¶
Temperature returns the current temperature in degrees C measured by the BMP280
type BMP388 ¶
type BMP388 struct {
// contains filtered or unexported fields
}
func (*BMP388) Temperature ¶
Temperature returns the current temperature in degrees C measured by the BMP280
type ICM20948 ¶
type ICM20948 struct {
// contains filtered or unexported fields
}
ICM20948 represents an InvenSense ICM-20948 attached to the I2C bus and satisfies the IMUReader interface.
func NewICM20948 ¶
NewICM20948 returns an instance of the ICM-20948 IMUReader, connected to an ICM-20948 attached on the I2C bus with either valid address.
type IMUReader ¶
type IMUReader interface { // Read returns the average (since last reading) time, Gyro X-Y-Z, Accel X-Y-Z, Mag X-Y-Z, // error reading Gyro/Accel, and error reading Mag. Read() (T int64, G1, G2, G3, A1, A2, A3, M1, M2, M3 float64, GAError, MagError error) // ReadOne returns the most recent time, Gyro X-Y-Z, Accel X-Y-Z, Mag X-Y-Z, // error reading Gyro/Accel, and error reading Mag. ReadOne() (T int64, G1, G2, G3, A1, A2, A3, M1, M2, M3 float64, GAError, MagError error) // Close stops reading the MPU. Close() }
IMUReader provides an interface to various Inertial Measurement Unit sensors, such as the InvenSense MPU9150 or MPU9250. It is a light abstraction on top of the current github.com/westphae/goflying MPU9250 driver so that it can accommodate other types of drivers.
type MPU9250 ¶
type MPU9250 struct {
// contains filtered or unexported fields
}
MPU9250 represents an InvenSense MPU9250 attached to the I2C bus and satisfies the IMUReader interface.
func NewMPU9250 ¶
NewMPU9250 returns an instance of the MPU9250 IMUReader, connected to an MPU9250 attached on the I2C bus with either valid address.
type PressureReader ¶
type PressureReader interface { Temperature() (temp float64, tempError error) // Temperature returns the temperature in degrees C. Pressure() (press float64, pressError error) // Pressure returns the atmospheric pressure in mBar. Close() // Close stops reading from the sensor. }
PressureReader provides an interface to a sensor reading pressure and maybe temperature or humidity, like the BMP180 or BMP280.