Skip to content

Commit

Permalink
remove orientation setters and getters
Browse files Browse the repository at this point in the history
  • Loading branch information
SizzinSeal committed Dec 27, 2024
1 parent 51a16e8 commit cdf1f2d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
7 changes: 0 additions & 7 deletions include/units/Pose.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,6 @@ template <typename derivatives> class AbstractPose
*/
AbstractPose(Len x, Len y, Divided<Angle, Exponentiated<Time, derivatives>> orientation)
: Vector(x, y), orientation(orientation) {}

/**
* @brief Get the orientation
*
* @return Angle orientation
*/
Divided<Angle, Exponentiated<Time, derivatives>> getOrientation() const { return orientation; }
};

// Position Pose (Length, Angle)
Expand Down
17 changes: 9 additions & 8 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ void initialize() {
Number num = Number(1.0);
num = Number(0.0);
a.theta().convert(deg);
a.setOrientation(Quantity<std::ratio<0>, std::ratio<0>, std::ratio<-2>, std::ratio<0>, std::ratio<1>, std::ratio<0>,
std::ratio<0>, std::ratio<0>>(1.0));
a.getOrientation() += 2_rpm2;
2_rpm2 -= a.getOrientation();
a.orientation = Quantity<std::ratio<0>, std::ratio<0>, std::ratio<-2>, std::ratio<0>, std::ratio<1>, std::ratio<0>,
std::ratio<0>, std::ratio<0>>(1.0);
a.orientation += 2_rpm2;
2_rpm2 -= a.orientation;
to_cDeg(Quantity<std::ratio<0>, std::ratio<0>, std::ratio<0>, std::ratio<0>, std::ratio<1>, std::ratio<0>,
std::ratio<0>, std::ratio<0>>(5.0) -
a.theta() + 5_cDeg);
Expand All @@ -47,10 +47,11 @@ void initialize() {
Length z = toLinear<Angle>(y, 2_cm);
static_assert(Angle(5.1) >= Quantity<std::ratio<0>, std::ratio<0>, std::ratio<0>, std::ratio<0>, std::ratio<1>,
std::ratio<0>, std::ratio<0>, std::ratio<0>>(5.0));
units::clamp(2_cDeg, a.theta(), Quantity<std::ratio<0>, std::ratio<0>, std::ratio<0>, std::ratio<0>, std::ratio<1>,
std::ratio<0>, std::ratio<0>, std::ratio<0>>(5.0));
units::max(10_celsius, Quantity<std::ratio<0>, std::ratio<0>, std::ratio<0>, std::ratio<0>, std::ratio<0>, std::ratio<1>,
std::ratio<0>, std::ratio<0>>(1.0));
units::clamp(2_cDeg, a.theta(),
Quantity<std::ratio<0>, std::ratio<0>, std::ratio<0>, std::ratio<0>, std::ratio<1>, std::ratio<0>,
std::ratio<0>, std::ratio<0>>(5.0));
units::max(10_celsius, Quantity<std::ratio<0>, std::ratio<0>, std::ratio<0>, std::ratio<0>, std::ratio<0>,
std::ratio<1>, std::ratio<0>, std::ratio<0>>(1.0));
}

/**
Expand Down

0 comments on commit cdf1f2d

Please sign in to comment.