Adafruit Unified Sensor Library
Public Attributes | List of all members
sensors_vec_t Struct Reference

#include <Adafruit_Sensor.h>

Public Attributes

union {
   float   v [3]
 3D vector elements
 
   struct {
      float   x
 X component of vector.
 
      float   y
 Y component of vector.
 
      float   z
 Z component of vector.
 
   } 
 Struct for holding XYZ component.
 
   struct {
      float   roll
 
      float   pitch
 
      float   heading
 
   } 
 Struct for holding roll/pitch/heading.
 
}; 
 
int8_t status
 Status byte.
 
uint8_t reserved [3]
 Reserved.
 

Detailed Description

struct sensors_vec_s is used to return a vector in a common format.

Member Data Documentation

◆ roll

float sensors_vec_t::roll

Rotation around the longitudinal axis (the plane body, 'X axis'). Roll is positive and increasing when moving downward. -90 degrees <= roll <= 90 degrees

◆ pitch

float sensors_vec_t::pitch

Rotation around the lateral axis (the wing span, 'Y axis'). Pitch is positive and increasing when moving upwards. -180 degrees <= pitch <= 180 degrees)

◆ heading

float sensors_vec_t::heading

Angle between the longitudinal axis (the plane body) and magnetic north, measured clockwise when viewing from the top of the device. 0-359 degrees

◆ @1

union { ... }

Union that can hold 3D vector array, XYZ components or roll/pitch/heading


The documentation for this struct was generated from the following file: