#include "RigidBody.hpp"
#include "BodyEnvironment.hpp"
#include "Vector.hpp"
+#include "Turbulence.hpp"
namespace yasim {
RigidBody* getBody();
Integrator* getIntegrator();
+ void setTurbulence(Turbulence* turb) { _turb = turb; }
+
State* getState();
void setState(State* s);
- void resetState();
bool isCrashed();
void setCrashed(bool crashed);
float getAGL();
- void iterate(float dt);
+ void iterate();
// Externally-managed subcomponents
int addThruster(Thruster* t);
int numThrusters();
Thruster* getThruster(int handle);
void setThruster(int handle, Thruster* t);
- void initIteration(float dt);
+ void initIteration();
void getThrust(float* out);
//
virtual void newState(State* s);
private:
+ void initRotorIteration();
void calcGearForce(Gear* g, float* v, float* rot, float* ground);
float gearFriction(float wgt, float v, Gear* g);
float localGround(State* s, float* out);
- void localWind(float* pos, State* s, float* out);
+ void localWind(float* pos, State* s, float* out, float alt);
Integrator _integrator;
RigidBody _body;
+ Turbulence* _turb;
+
Vector _thrusters;
Vector _surfaces;
Vector _rotorparts;