programa final
VerticalEstimator/VerticalEstimator.h@5:b1f5ea192d12, 2018-10-17 (annotated)
- Committer:
- yurindes
- Date:
- Wed Oct 17 12:13:33 2018 +0000
- Revision:
- 5:b1f5ea192d12
- Child:
- 8:1ad52489f6f3
yuri
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
yurindes | 5:b1f5ea192d12 | 1 | # ifndef VerticalEstimator_h |
yurindes | 5:b1f5ea192d12 | 2 | #define VerticalEstimator_h |
yurindes | 5:b1f5ea192d12 | 3 | #include "mbed.h" |
yurindes | 5:b1f5ea192d12 | 4 | #include "Library.h" |
yurindes | 5:b1f5ea192d12 | 5 | #include "VL53L0X.h" |
yurindes | 5:b1f5ea192d12 | 6 | // Vertical estimator class |
yurindes | 5:b1f5ea192d12 | 7 | class VerticalEstimator |
yurindes | 5:b1f5ea192d12 | 8 | { |
yurindes | 5:b1f5ea192d12 | 9 | public: |
yurindes | 5:b1f5ea192d12 | 10 | |
yurindes | 5:b1f5ea192d12 | 11 | // Class constructor |
yurindes | 5:b1f5ea192d12 | 12 | VerticalEstimator () ; |
yurindes | 5:b1f5ea192d12 | 13 | // Initialize class |
yurindes | 5:b1f5ea192d12 | 14 | void init () ; |
yurindes | 5:b1f5ea192d12 | 15 | // Predict vertical position and velocity from model |
yurindes | 5:b1f5ea192d12 | 16 | void predict () ; |
yurindes | 5:b1f5ea192d12 | 17 | // Correct vertical position and velocity with measurement |
yurindes | 5:b1f5ea192d12 | 18 | void correct ( float phi , float theta ); |
yurindes | 5:b1f5ea192d12 | 19 | // Vertical position (m) and velocity (m/s) estimation |
yurindes | 5:b1f5ea192d12 | 20 | float z, w; |
yurindes | 5:b1f5ea192d12 | 21 | private: |
yurindes | 5:b1f5ea192d12 | 22 | // Range sensor object |
yurindes | 5:b1f5ea192d12 | 23 | VL53L0X range ; |
yurindes | 5:b1f5ea192d12 | 24 | // Last vertical position (m) measurement |
yurindes | 5:b1f5ea192d12 | 25 | float z_m_last ; |
yurindes | 5:b1f5ea192d12 | 26 | }; |
yurindes | 5:b1f5ea192d12 | 27 | # endif |