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
PosVelFilter/PosVelFilter.hpp@92:52a91656458a, 2019-05-13 (annotated)
- Committer:
- joel_ssc
- Date:
- Mon May 13 19:25:26 2019 +0000
- Revision:
- 92:52a91656458a
- Parent:
- 87:6d95f853dab3
version for first flight test, timeouts not yet set correctly
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
danstrider | 10:085ab7328054 | 1 | #ifndef POSVELFILTER_H |
danstrider | 10:085ab7328054 | 2 | #define POSVELFILTER_H |
mkelly10 | 9:d5fcdcb3c89d | 3 | |
mkelly10 | 9:d5fcdcb3c89d | 4 | #include "mbed.h" |
joel_ssc | 87:6d95f853dab3 | 5 | #include <deque> |
joel_ssc | 87:6d95f853dab3 | 6 | #define _PI ((float) 3.14159265359) |
mkelly10 | 9:d5fcdcb3c89d | 7 | |
mkelly10 | 9:d5fcdcb3c89d | 8 | class PosVelFilter |
mkelly10 | 9:d5fcdcb3c89d | 9 | { |
mkelly10 | 9:d5fcdcb3c89d | 10 | public: |
mkelly10 | 9:d5fcdcb3c89d | 11 | PosVelFilter(); |
mkelly10 | 9:d5fcdcb3c89d | 12 | |
mkelly10 | 9:d5fcdcb3c89d | 13 | void update(float deltaT, float counts); |
mkelly10 | 9:d5fcdcb3c89d | 14 | |
mkelly10 | 9:d5fcdcb3c89d | 15 | void init(); |
mkelly10 | 9:d5fcdcb3c89d | 16 | |
mkelly10 | 9:d5fcdcb3c89d | 17 | float getPosition(); |
mkelly10 | 9:d5fcdcb3c89d | 18 | float getVelocity(); |
mkelly10 | 9:d5fcdcb3c89d | 19 | float getDt(); |
joel_ssc | 87:6d95f853dab3 | 20 | void setHeadingFlag(bool heading_flag); |
mkelly10 | 9:d5fcdcb3c89d | 21 | void writeWn(float wn); |
mkelly10 | 9:d5fcdcb3c89d | 22 | |
mkelly10 | 9:d5fcdcb3c89d | 23 | protected: |
joel_ssc | 87:6d95f853dab3 | 24 | float x1, x1c,x1s; |
joel_ssc | 87:6d95f853dab3 | 25 | float x2, x2c,x2s; |
joel_ssc | 87:6d95f853dab3 | 26 | float x1_dot, x1c_dot, x1s_dot; |
joel_ssc | 87:6d95f853dab3 | 27 | float x2_dot, x2c_dot, x2s_dot; |
mkelly10 | 9:d5fcdcb3c89d | 28 | float w_n; |
joel_ssc | 87:6d95f853dab3 | 29 | float counts_c, counts_s; |
mkelly10 | 9:d5fcdcb3c89d | 30 | |
mkelly10 | 9:d5fcdcb3c89d | 31 | float dt; |
joel_ssc | 87:6d95f853dab3 | 32 | float position,pnew, position_c, position_s; |
joel_ssc | 87:6d95f853dab3 | 33 | float velocity, velocity_c, velocity_s; |
joel_ssc | 87:6d95f853dab3 | 34 | bool _headingFlag; |
mkelly10 | 9:d5fcdcb3c89d | 35 | }; |
mkelly10 | 9:d5fcdcb3c89d | 36 | |
mkelly10 | 9:d5fcdcb3c89d | 37 | #endif |