Moved Quadcoptger to branch
This commit is contained in:
parent
a7020364d1
commit
2c8ae025a8
@ -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;
|
|
||||||
}
|
|
37
Quadcopter.h
37
Quadcopter.h
@ -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;
|
|
Loading…
x
Reference in New Issue
Block a user