blob: f48f31f85c5f48fa799f83877c3ee4d875321da4 [file] [log] [blame]
Alex Perrycb7da4b2019-08-28 19:35:56 -07001namespace frc971;
Brian Silverman5f17a972016-02-28 01:49:32 -05002
3// Values returned from an IMU.
Austin Schuh73b6e3b2019-05-27 16:37:15 -07004// Published on ".frc971.imu_values"
Alex Perrycb7da4b2019-08-28 19:35:56 -07005table IMUValues {
Brian Silverman5f17a972016-02-28 01:49:32 -05006 // Gyro readings in radians/second.
7 // Positive is clockwise looking at the connector.
Alex Perrycb7da4b2019-08-28 19:35:56 -07008 gyro_x:float;
Brian Silverman5f17a972016-02-28 01:49:32 -05009 // Positive is clockwise looking at the right side (from the connector).
Alex Perrycb7da4b2019-08-28 19:35:56 -070010 gyro_y:float;
Brian Silverman5f17a972016-02-28 01:49:32 -050011 // Positive is counterclockwise looking at the top.
Alex Perrycb7da4b2019-08-28 19:35:56 -070012 gyro_z:float;
Brian Silverman5f17a972016-02-28 01:49:32 -050013
14 // Accelerometer readings in Gs.
15 // Positive is up.
Alex Perrycb7da4b2019-08-28 19:35:56 -070016 accelerometer_x:float;
Brian Silverman5f17a972016-02-28 01:49:32 -050017 // Positive is away from the right side (from the connector).
Alex Perrycb7da4b2019-08-28 19:35:56 -070018 accelerometer_y:float;
Brian Silverman5f17a972016-02-28 01:49:32 -050019 // Positive is away from the connector.
Alex Perrycb7da4b2019-08-28 19:35:56 -070020 accelerometer_z:float;
Brian Silverman5f17a972016-02-28 01:49:32 -050021
22 // Magnetometer readings in gauss.
23 // Positive is up.
Alex Perrycb7da4b2019-08-28 19:35:56 -070024 magnetometer_x:float;
Brian Silverman5f17a972016-02-28 01:49:32 -050025 // Positive is away from the right side (from the connector).
Alex Perrycb7da4b2019-08-28 19:35:56 -070026 magnetometer_y:float;
Brian Silverman5f17a972016-02-28 01:49:32 -050027 // Positive is away from the connector.
Alex Perrycb7da4b2019-08-28 19:35:56 -070028 magnetometer_z:float;
Brian Silverman5f17a972016-02-28 01:49:32 -050029
30 // Barometer readings in pascals.
Alex Perrycb7da4b2019-08-28 19:35:56 -070031 barometer:float;
Brian Silverman5f17a972016-02-28 01:49:32 -050032
33 // Temperature readings in degrees Celsius.
Alex Perrycb7da4b2019-08-28 19:35:56 -070034 temperature:float;
Brian Silverman5f17a972016-02-28 01:49:32 -050035
36 // FPGA timestamp when the values were captured.
Alex Perrycb7da4b2019-08-28 19:35:56 -070037 fpga_timestamp:double;
Brian Silverman5f17a972016-02-28 01:49:32 -050038 // CLOCK_MONOTONIC time in nanoseconds when the values were captured.
Alex Perrycb7da4b2019-08-28 19:35:56 -070039 monotonic_timestamp_ns:long;
40}
41
42root_type IMUValues;