librmb 1.0
Rambunction 4330 Utility Library
Loading...
Searching...
No Matches
AHRSGyro.h
1#pragma once
2
3#include "AHRS.h"
4#include "frc/SerialPort.h"
5#include "frc/geometry/Rotation2d.h"
6#include "units/acceleration.h"
7#include <memory>
8#include <rmb/sensors/gyro.h>
9
10namespace rmb {
11class AHRSGyro : public Gyro {
12public:
13 AHRSGyro(frc::SerialPort::Port port);
14
15 virtual ~AHRSGyro() = default;
16
17 virtual units::turn_t getZRotation() const override;
18 virtual void resetZRotation() override;
19 virtual frc::Rotation2d getRotation() const override;
20
21 virtual units::meters_per_second_squared_t getXAcceleration() const override;
22 virtual units::meters_per_second_squared_t getYAcceleration() const override;
23 virtual units::meters_per_second_squared_t getZAcceleration() const override;
24
25 virtual units::meters_per_second_t getXVelocity() const override;
26 virtual units::meters_per_second_t getYVelocity() const override;
27 virtual units::meters_per_second_t getZVelocity() const override;
28
29private:
30 std::unique_ptr<AHRS> gyro;
31};
32} // namespace rmb
Definition AHRSGyro.h:11
Definition gyro.h:13
the master namespace of librmb
Definition LogitechGamepad.h:9