most functionality to splashdwon, find neutral and start mission. short timeouts still in code for testing, will adjust to go directly to sit_idle after splashdown
Dependencies: mbed MODSERIAL FATFileSystem
Diff: PosVelFilter/PosVelFilter.hpp
- Revision:
- 9:d5fcdcb3c89d
- Child:
- 10:085ab7328054
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PosVelFilter/PosVelFilter.hpp Fri Oct 20 11:41:22 2017 +0000 @@ -0,0 +1,42 @@ +#ifndef MBED_DEPTHFILTER_H +#define MBED_DEPTHFILTER_H + +#include "mbed.h" + +class PosVelFilter +{ +public: + PosVelFilter(); + + void update(float deltaT, float counts); + + void init(); + + float getPosition(); + float getVelocity(); + float getDt(); + + // void setConfigFlag(); + void writeWn(float wn); + +protected: + float x1; + float x2; + float x2_dot; + float x1_dot; + float w_n; + + //float last_time; + //float curr_time; + float dt; + + float conv_distance; + float position; + float velocity; + + // bool readConfiguration(); + // bool configFlag; + // int count; +}; + +#endif \ No newline at end of file