9#include "wpi/units/acceleration.hpp"
10#include "wpi/units/angular_acceleration.hpp"
25 units::meters_per_second_squared_t
ax = 0_mps_sq;
30 units::meters_per_second_squared_t
ay = 0_mps_sq;
35 units::radians_per_second_squared_t
alpha = 0_rad_per_s_sq;
54 return {units::meters_per_second_squared_t{rotated.X().value()},
55 units::meters_per_second_squared_t{rotated.Y().value()},
alpha};
75 return {units::meters_per_second_squared_t{rotated.X().value()},
76 units::meters_per_second_squared_t{rotated.Y().value()},
alpha};
107 return *
this + -other;
132 return {scalar *
ax, scalar *
ay, scalar *
alpha};
#define WPILIB_DLLEXPORT
Definition SymbolExports.hpp:36
A rotation in a 2D coordinate frame represented by a point on the unit circle (cosine and sine).
Definition Rotation2d.hpp:26
Represents a translation in 2D space.
Definition Translation2d.hpp:30
constexpr Translation2d RotateBy(const Rotation2d &other) const
Applies a rotation to the translation in 2D space.
Definition Translation2d.hpp:167
Definition LinearSystem.hpp:20
Represents robot chassis accelerations.
Definition ChassisAccelerations.hpp:21
units::meters_per_second_squared_t ax
Acceleration along the x-axis.
Definition ChassisAccelerations.hpp:25
constexpr ChassisAccelerations ToRobotRelative(const Rotation2d &robotAngle) const
Converts this field-relative set of accelerations into a robot-relative ChassisAccelerations object.
Definition ChassisAccelerations.hpp:48
constexpr ChassisAccelerations operator-(const ChassisAccelerations &other) const
Subtracts the other ChassisAccelerations from the current ChassisAccelerations and returns the differ...
Definition ChassisAccelerations.hpp:105
units::radians_per_second_squared_t alpha
Angular acceleration of the robot frame.
Definition ChassisAccelerations.hpp:35
units::meters_per_second_squared_t ay
Acceleration along the y-axis.
Definition ChassisAccelerations.hpp:30
constexpr ChassisAccelerations operator-() const
Returns the inverse of the current ChassisAccelerations.
Definition ChassisAccelerations.hpp:116
constexpr ChassisAccelerations operator*(double scalar) const
Multiplies the ChassisAccelerations by a scalar and returns the new ChassisAccelerations.
Definition ChassisAccelerations.hpp:131
constexpr ChassisAccelerations operator/(double scalar) const
Divides the ChassisAccelerations by a scalar and returns the new ChassisAccelerations.
Definition ChassisAccelerations.hpp:146
constexpr bool operator==(const ChassisAccelerations &other) const =default
Compares the ChassisAccelerations with another ChassisAccelerations.
constexpr ChassisAccelerations ToFieldRelative(const Rotation2d &robotAngle) const
Converts this robot-relative set of accelerations into a field-relative ChassisAccelerations object.
Definition ChassisAccelerations.hpp:69
constexpr ChassisAccelerations operator+(const ChassisAccelerations &other) const
Adds two ChassisAccelerations and returns the sum.
Definition ChassisAccelerations.hpp:89