zhyinch
2019-12-15 d56da5b9006bfb55a4c7ae2dbb00c026fa3148ae
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef TRACKINGDIFF_H_
#define TRACKINGDIFF_H_
#include "stm32f10x.h"
#ifdef __cplusplus
extern "C" {
#endif
    
typedef struct TrackingDiffClass_
{
    float error;
    float vel_predict;
    float pos_predict;
    
    float vel_factor;
    float pos_factor;
    float time_correction;
} TrackingDiffClass;
 
TrackingDiffClass* NewTrackingDiffClass(float vel_factor, float pos_factor, float time_factor);
void TrackingDiffUpdate(TrackingDiffClass* self, float target);
 
#ifdef __cplusplus
}
#endif
 
#endif