From 2c8ae025a89f28f746cd9592b62c37d8a127d6cf Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Tue, 5 Dec 2023 11:37:06 +0100 Subject: [PATCH] Moved Quadcoptger to branch --- Quadcopter.cpp | 38 -------------------------------------- Quadcopter.h | 37 ------------------------------------- 2 files changed, 75 deletions(-) delete mode 100644 Quadcopter.cpp delete mode 100644 Quadcopter.h diff --git a/Quadcopter.cpp b/Quadcopter.cpp deleted file mode 100644 index af04794..0000000 --- a/Quadcopter.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include "Quadcopter.h" - -Quadcopter::Quadcopter() {} - -void Quadcopter::SetTwistSpeed(float forward, float yaw) { - this->velocity = Vector3::forward * forward; - this->yawSpeed = yaw; -} - -void Quadcopter::SetTwistSpeed(Vector2 linear, float yaw) { - this->velocity = Vector3(linear.x, 0.0F, linear.y); - this->yawSpeed = yaw; -} - -void Quadcopter::SetTwistSpeed(Vector3 velocity, - float yaw, - float pitch, - float roll) { - this->velocity = velocity; - this->yawSpeed = yaw; - this->rollSpeed = roll; - this->pitchSpeed = pitch; -} - -Vector3 Quadcopter::GetTargetVelocity() { - return this->velocity; -} - -float Quadcopter::GetPitchSpeed() { - return this->pitchSpeed; -} - -float Quadcopter::GetYawSpeed() { - return this->yawSpeed; -} -float Quadcopter::GetRollSpeed() { - return this->rollSpeed; -} diff --git a/Quadcopter.h b/Quadcopter.h deleted file mode 100644 index 6c7b212..0000000 --- a/Quadcopter.h +++ /dev/null @@ -1,37 +0,0 @@ -#pragma once - -#include "Propulsion.h" -#include "Thing.h" -#include "Vector3.h" - -namespace Passer { -namespace RoboidControl { - -/// @brief Support for Quadcopter as a propulsion method -class Quadcopter : public Propulsion { - public: - /// @brief Default constuctor - Quadcopter(); - - virtual void SetTwistSpeed(float forward, float yaw = 0.0F) override; - virtual void SetTwistSpeed(Vector2 linear, float yaw = 0.0F) override; - virtual void SetTwistSpeed(Vector3 linear, - float yaw = 0.0F, - float pitch = 0.0F, - float roll = 0.0F) override; - - Vector3 GetTargetVelocity(); - float GetYawSpeed(); - float GetPitchSpeed(); - float GetRollSpeed(); - - protected: - Vector3 velocity = Vector3::zero; - float pitchSpeed = 0.0F; - float yawSpeed = 0.0F; - float rollSpeed = 0.0F; -}; - -} // namespace RoboidControl -} // namespace Passer -using namespace Passer::RoboidControl; \ No newline at end of file