-
Notifications
You must be signed in to change notification settings - Fork 0
/
thruster.hpp
36 lines (30 loc) · 868 Bytes
/
thruster.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#pragma once
#include "vectorExtendedPGE.hpp"
#include "plume.hpp"
class Thruster
{
public:
static olc::VxOLCPGE * Renderer;
float * fuelTank = nullptr;
float maxThrust = 392.3f*2.0f*10.0f; // 2x weight
float specificImpulse = 2000.0f;
olc::vf2d gimbalLocation = {0.0f,-5.0f};
float rotationAngle = (float)M_PI_2; // Angle from positive X which the thrust value acts.
float gimbalLimit = (float)M_PI/6;
float gimbalAngle;
float throttle;
// TODO PLUME
Plume plume;
public:
Thruster();
Thruster(olc::VxOLCPGE * Renderer_);
~Thruster();
void setThrottle(float throttle_); //
float getThrottle() const;
void setGimbal(float gimbalAngle_); //Radians
float getGimbalAngle();
olc::vf2d getThrust (); // N
float getMoment();// N*m
float getMdot(); // kgs
void Draw(olc::vf2d const & hostPosition,olc::Mat2d const & body2world);
};