controls pan and tilt
More...
#include <pdhffc_pid.h>
Public Member Functions |
| cTrackingControler () |
| Class constructor Inits LastDir and history structs.
|
| ~cTrackingControler () |
| Class destructor Inits LastDir and history structs.
|
int | SetPanControlParams (unsigned int BZ=20, double Kp=17.0, double Ki=10.0, double Kd=10.0) |
| Sets Pan controler params.
|
int | SetTiltControlParams (unsigned int BZ=20, double Kp=17.0, double Ki=10.0, double Kd=10.0) |
| Sets Tilt controler params.
|
int | SetTargetPos (unsigned int x, unsigned int y) |
| Sets internal variables TargetPos.x and y to given values.
|
int | SetCurrentPos (unsigned int x, unsigned int y) |
| Sets internal variables CurrentPos.x and y to given values.
|
int | SetControlerDescription (unsigned int cd) |
| Sets controler type.
|
int | DoLoop (int *PanPos, int *TiltPos, double *PanS, double *TiltS, int *PanHalt, int *TiltHalt) |
Private Member Functions |
int | ResetPanKiSum (void) |
int | ResetTiltKiSum (void) |
Private Attributes |
struct { |
TypeControlParams Pan |
TypeControlParams Tilt |
struct { |
unsigned int x |
unsigned int y |
} TargetPos |
struct { |
unsigned int x |
unsigned int y |
} CurrentPos |
struct { |
int x [ERRORHISTORYSIZE] |
int y [ERRORHISTORYSIZE] |
double AvgX |
double AvgY |
int SumX |
int SumY |
int derX |
int derY |
} ErrorHistory |
int LastXDir |
int LastYDir |
} | P |
int | ControlerDescription |
Detailed Description
controls pan and tilt
- Author:
- Miguel Oliveira
- Version:
- 0.0
- Date:
- 26/11/2006
Member Function Documentation
int cTrackingControler::ResetPanKiSum |
( |
void |
|
) |
[inline, private] |
int cTrackingControler::ResetTiltKiSum |
( |
void |
|
) |
[inline, private] |
int cTrackingControler::SetCurrentPos |
( |
unsigned int |
x, |
|
|
unsigned int |
y | |
|
) |
| | [inline] |
Sets internal variables CurrentPos.x and y to given values.
- Parameters:
-
- Returns:
- function result. 1 is OK 0 is NOK
References P.
int cTrackingControler::SetPanControlParams |
( |
unsigned int |
BZ = 20 , |
|
|
double |
Kp = 17.0 , |
|
|
double |
Ki = 10.0 , |
|
|
double |
Kd = 10.0 | |
|
) |
| | [inline] |
Sets Pan controler params.
If none are given, some are assumed by default:
- Bz = 20
- Kp = 17.0
- Ki = 10.0
- Kd = 10.0
- Parameters:
-
| BZ | Blind zone size |
| Kp | Proportional constant |
| Ki | Integrative constant |
| Kd | Derivative constant |
- Returns:
- function result. 1 is OK 0 is NOK
References P.
int cTrackingControler::SetTargetPos |
( |
unsigned int |
x, |
|
|
unsigned int |
y | |
|
) |
| | [inline] |
Sets internal variables TargetPos.x and y to given values.
- Parameters:
-
- Returns:
- function result. 1 is OK 0 is NOK
References P.
int cTrackingControler::SetTiltControlParams |
( |
unsigned int |
BZ = 20 , |
|
|
double |
Kp = 17.0 , |
|
|
double |
Ki = 10.0 , |
|
|
double |
Kd = 10.0 | |
|
) |
| | [inline] |
Sets Tilt controler params.
If none are given, some are assumed by default:
- Bz = 20
- Kp = 17.0
- Ki = 10.0
- Kd = 10.0
- Parameters:
-
| BZ | Blind zone size |
| Kp | Proportional constant |
| Ki | Integrative constant |
| Kd | Derivative constant |
- Returns:
- function result. 1 is OK 0 is NOK
References P.
Field Documentation
The documentation for this class was generated from the following files: