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