MotorWare f2806x Module API Documentation

- Main Page
- Modules
- Data Structures
- Files

Data Structures | Typedefs | Functions
ANGLE

## Data Structures
struct | _ANGLE_Obj_
| Defines the angle generator (ANGLE) object. More...

## Typedefs
typedef struct _ANGLE_Obj_ | ANGLE_Obj
| Defines the angle generator (ANGLE) object. More...
typedef struct _ANGLE_Obj_ * | ANGLE_Handle
| Defines the ANGLE handle. More...

## Functions
static float_t | ANGLE_getAccelEst_rps2 (ANGLE_Handle handle)
| Gets the estimated acceleration value. More...
static float_t | ANGLE_getAngle_rad (ANGLE_Handle handle)
| Gets the predicted angle value. More...
static float_t | ANGLE_getAngleEst_rad (ANGLE_Handle handle)
| Gets the estimated angle value. More...
static float_t | ANGLE_getAngleWithDelay_rad (ANGLE_Handle handle)
| Gets the updated angle value considering system delay. More...
static float_t | ANGLE_getAngleDelayed_sf_sec (ANGLE_Handle handle)
| Gets the scale factor for computing the delayed angle. More...
static float_t | ANGLE_getSpeed_rps (ANGLE_Handle handle)
| Gets the predicted speed value. More...
static float_t | ANGLE_getSpeedEst_rps (ANGLE_Handle handle)
| Gets the estimated speed value. More...
static int_least32_t | ANGLE_getTimeStamp (ANGLE_Handle handle)
| Gets the time stamp value for the estimated data. More...
static float_t | ANGLE_getTimeStampPeriod_sec (ANGLE_Handle handle)
| Gets the time stamp period value. More...
ANGLE_Handle | ANGLE_init (void *pMemory, const size_t numBytes)
| Initializes the angle generator (ANGLE) module. More...
ANGLE_Handle | cla_ANGLE_init (void *pMemory, const size_t numBytes)
void | ANGLE_run (ANGLE_Handle handle, const int_least32_t timeStamp)
| Updates the angle value in the angle generator. More...
void | cla_ANGLE_run (ANGLE_Handle handle, const int_least32_t timeStamp)
static void | ANGLE_setAccelEst_rps2 (ANGLE_Handle handle, const float_t accel_rps2)
| Sets the estimated acceleration value. More...
static void | ANGLE_setAngle_rad (ANGLE_Handle handle, const float_t angle_rad)
| Sets the predicted angle value. More...
static void | ANGLE_setAngleEst_rad (ANGLE_Handle handle, const float_t angle_rad)
| Sets the estimated angle value. More...
static void | ANGLE_setAngleWithDelay_rad (ANGLE_Handle handle, const float_t angle_rad)
| Sets the angle value considering system delay. More...
static void | ANGLE_setAngleDelayed_sf_sec (ANGLE_Handle handle, const float_t angleDelayed_sf_sec)
| Sets the scale factor for computing the delayed angle. More...
void | ANGLE_setParams (ANGLE_Handle handle, const float_t timeStampPeriod_sec, const float_t angleDelayed_sf_sec)
| Sets the parameters. More...
void | cla_ANGLE_setParams (ANGLE_Handle handle, const float_t timeStampPeriod_sec, const float_t angleDelayed_sf_sec)
static void | ANGLE_setSpeed_rps (ANGLE_Handle handle, const float_t speed_rps)
| Sets the predicted speed value. More...
static void | ANGLE_setSpeedEst_rps (ANGLE_Handle handle, const float_t speed_rps)
| Sets the estimated speed value. More...
static void | ANGLE_setTimeStamp (ANGLE_Handle handle, const int_least32_t timeStamp)
| Sets the time stamp value for the estimated data. More...
static void | ANGLE_setTimeStampPeriod_sec (ANGLE_Handle handle, const float_t timeStampPeriod_sec)
| Sets the time stamp period value. More...
void | ANGLE_setup (ANGLE_Handle handle, const int_least32_t timeStamp, const float_t angle_rad, const float_t speed_rps, const float_t accel_rps2)
| Updates the angle generator with new data. More...
void | cla_ANGLE_setup (ANGLE_Handle handle, const int_least32_t timeStamp, const float_t angle_rad, const float_t speed_rps, const float_t accel_rps2)

## Detailed Description

## Data Structure Documentation

struct _ANGLE_Obj_

Defines the angle generator (ANGLE) object.

Definition at line 50 of file angle.h.

Data Fields
float_t | accelEst_rps2 | the estimated angular acceleration value, rad/sec^2
float_t | angle_rad | the predicted angle value, rad
float_t | angleDelayed_sf_sec | the scale factor for computing angle value considering system delay, sec
float_t | angleEst_rad | the estimated angle value, rad
float_t | angleWithDelay_rad | the predicted angle value considering system delay, rad
float_t | speed_rps | the predicted angular speed value, rad/sec
float_t | speedEst_rps | the estimated angular speed value, rad/sec
int_least32_t | timeStamp | the time stamp for the estimated angle and speed values
float_t | timeStampPeriod_sec | the time stamp period, sec

## Typedef Documentation

typedef struct _ANGLE_Obj_* ANGLE_Handle

Defines the ANGLE handle.

Definition at line 68 of file angle.h.

typedef struct _ANGLE_Obj_ ANGLE_Obj

Defines the angle generator (ANGLE) object.

## Function Documentation

static float_t ANGLE_getAccelEst_rps2 | ( | ANGLE_Handle | handle | ) |
| inline static

Gets the estimated acceleration value.

Parameters

  [in] | handle | The estimator (EST) handle

Returns
  The estimated acceleration value, rad/sec^2

Definition at line 81 of file angle.h.

References _ANGLE_Obj_::accelEst_rps2.

static float_t ANGLE_getAngle_rad | ( | ANGLE_Handle | handle | ) |
| inline static

Gets the predicted angle value.

Parameters

  [in] | handle | The angle generator (ANGLE) handle

Returns
  The predicted angle value, rad

Definition at line 92 of file angle.h.

References _ANGLE_Obj_::angle_rad.

static float_t ANGLE_getAngleDelayed_sf_sec | ( | ANGLE_Handle | handle | ) |
| inline static

Gets the scale factor for computing the delayed angle.

Parameters

  [in] | handle | The angle generator (ANGLE) handle

Returns
  The scale factor, sec

Definition at line 125 of file angle.h.

References _ANGLE_Obj_::angleDelayed_sf_sec.

static float_t ANGLE_getAngleEst_rad | ( | ANGLE_Handle | handle | ) |
| inline static

Gets the estimated angle value.

Parameters

  [in] | handle | The angle generator (ANGLE) handle

Returns
  The estimated angle value, rad

Definition at line 103 of file angle.h.

References _ANGLE_Obj_::angleEst_rad.

static float_t ANGLE_getAngleWithDelay_rad | ( | ANGLE_Handle | handle | ) |
| inline static

Gets the updated angle value considering system delay.

Parameters

  [in] | handle | The angle generator (ANGLE) handle

Returns
  The updated angle value considering delay, rad

Definition at line 114 of file angle.h.

References _ANGLE_Obj_::angleWithDelay_rad.

static float_t ANGLE_getSpeed_rps | ( | ANGLE_Handle | handle | ) |
| inline static

Gets the predicted speed value.

Parameters

  [in] | handle | The estimator (EST) handle

Returns
  The predicted speed value, rad/sec

Definition at line 136 of file angle.h.

References _ANGLE_Obj_::speed_rps.

static float_t ANGLE_getSpeedEst_rps | ( | ANGLE_Handle | handle | ) |
| inline static

Gets the estimated speed value.

Parameters

  [in] | handle | The estimator (EST) handle

Returns
  The estimated speed value, rad/sec

Definition at line 147 of file angle.h.

References _ANGLE_Obj_::speedEst_rps.

static int_least32_t ANGLE_getTimeStamp | ( | ANGLE_Handle | handle | ) |
| inline static

Gets the time stamp value for the estimated data.

Parameters

  [in] | handle | The angle generator (ANGLE) handle

Returns
  The time stamp value

Definition at line 158 of file angle.h.

References _ANGLE_Obj_::timeStamp.

static float_t ANGLE_getTimeStampPeriod_sec | ( | ANGLE_Handle | handle | ) |
| inline static

Gets the time stamp period value.

Parameters

  [in] | handle | The estimator (EST) handle

Returns
  The time stamp period, sec

Definition at line 169 of file angle.h.

References _ANGLE_Obj_::timeStampPeriod_sec.

ANGLE_Handle ANGLE_init | ( | void * | pMemory,
|  | const size_t | numBytes
| ) |  |

Initializes the angle generator (ANGLE) module.

Parameters

  [in] | pMemory | A pointer to the memory for the object
  [in] | numBytes | The number of bytes allocated for the object, bytes

Returns
  The angle generator (ANGLE) object handle

void ANGLE_run | ( | ANGLE_Handle | handle,
|  | const int_least32_t | timeStamp
| ) |  |

Updates the angle value in the angle generator.

Parameters

  [in] | handle | The angle generator (ANGLE) handle
  [in] | timeStamp | The time stamp for execution

static void ANGLE_setAccelEst_rps2 | ( | ANGLE_Handle | handle,
|  | const float_t | accel_rps2
| ) |  |
| inline static

Sets the estimated acceleration value.

Parameters

  [in] | handle | The angle generator (ANGLE) handle
  [in] | accel_rps2 | The estimated acceleration value, rad/sec2

Definition at line 195 of file angle.h.

References _ANGLE_Obj_::accelEst_rps2.

static void ANGLE_setAngle_rad | ( | ANGLE_Handle | handle,
|  | const float_t | angle_rad
| ) |  |
| inline static

Sets the predicted angle value.

Parameters

  [in] | handle | The angle generator (ANGLE) handle
  [in] | angle_rad | The angle value, rad

Definition at line 208 of file angle.h.

References _ANGLE_Obj_::angle_rad.

static void ANGLE_setAngleDelayed_sf_sec | ( | ANGLE_Handle | handle,
|  | const float_t | angleDelayed_sf_sec
| ) |  |
| inline static

Sets the scale factor for computing the delayed angle.

Parameters

  [in] | handle | The angle generator (ANGLE) handle
  [in] | angleDelayed_sf_sec | The scale factor

Definition at line 247 of file angle.h.

References _ANGLE_Obj_::angleDelayed_sf_sec.

static void ANGLE_setAngleEst_rad | ( | ANGLE_Handle | handle,
|  | const float_t | angle_rad
| ) |  |
| inline static

Sets the estimated angle value.

Parameters

  [in] | handle | The angle generator (ANGLE) handle
  [in] | angle_rad | The estimated angle value, rad

Definition at line 221 of file angle.h.

References _ANGLE_Obj_::angle_rad, and _ANGLE_Obj_::angleEst_rad.

static void ANGLE_setAngleWithDelay_rad | ( | ANGLE_Handle | handle,
|  | const float_t | angle_rad
| ) |  |
| inline static

Sets the angle value considering system delay.

Parameters

  [in] | handle | The angle generator (ANGLE) handle
  [in] | angle_rad | The angle value with system delay, rad

Definition at line 234 of file angle.h.

References _ANGLE_Obj_::angle_rad, and _ANGLE_Obj_::angleWithDelay_rad.

void ANGLE_setParams | ( | ANGLE_Handle | handle,
|  | const float_t | timeStampPeriod_sec,
|  | const float_t | angleDelayed_sf_sec
| ) |  |

Sets the parameters.

Parameters

  [in] | handle | The angle generator (ANGLE) handle
  [in] | timeStampPeriod_sec | The time difference between two consecutive time stamp values
  [in] | angleDelayed_sf_sec | The scale factor for computing the delayed angle

static void ANGLE_setSpeed_rps | ( | ANGLE_Handle | handle,
|  | const float_t | speed_rps
| ) |  |
| inline static

Sets the predicted speed value.

Parameters

  [in] | handle | The angle generator (ANGLE) handle
  [in] | speed_rps | The speed value, rad/sec

Definition at line 272 of file angle.h.

References _ANGLE_Obj_::speed_rps.

static void ANGLE_setSpeedEst_rps | ( | ANGLE_Handle | handle,
|  | const float_t | speed_rps
| ) |  |
| inline static

Sets the estimated speed value.

Parameters

  [in] | handle | The angle generator (ANGLE) handle
  [in] | speed_rps | The speed value, rad/sec

Definition at line 285 of file angle.h.

References _ANGLE_Obj_::speed_rps, and _ANGLE_Obj_::speedEst_rps.

static void ANGLE_setTimeStamp | ( | ANGLE_Handle | handle,
|  | const int_least32_t | timeStamp
| ) |  |
| inline static

Sets the time stamp value for the estimated data.

Parameters

  [in] | handle | The angle generator (ANGLE) handle
  [in] | timeStamp | The time stamp value

Definition at line 298 of file angle.h.

References _ANGLE_Obj_::timeStamp.

static void ANGLE_setTimeStampPeriod_sec | ( | ANGLE_Handle | handle,
|  | const float_t | timeStampPeriod_sec
| ) |  |
| inline static

Sets the time stamp period value.

Parameters

  [in] | handle | The angle generator (ANGLE) handle
  [in] | timeStampPeriod_sec | The time stamp period, sec

Definition at line 311 of file angle.h.

References _ANGLE_Obj_::timeStampPeriod_sec.

void ANGLE_setup | ( | ANGLE_Handle | handle,
|  | const int_least32_t | timeStamp,
|  | const float_t | angle_rad,
|  | const float_t | speed_rps,
|  | const float_t | accel_rps2
| ) |  |

Updates the angle generator with new data.

Parameters

  [in] | handle | The angle generator (ANGLE) handle
  [in] | timeStamp | The time stamp for the angle and speed estimates
  [in] | angle_rad | The estimated angle value, rad
  [in] | speed_rps | The estimated speed value, rad/sec
  [in] | accel_rps2 | The estimated acceleration value, rad/sec^2

ANGLE_Handle cla_ANGLE_init | ( | void * | pMemory,
|  | const size_t | numBytes
| ) |  |

void cla_ANGLE_run | ( | ANGLE_Handle | handle,
|  | const int_least32_t | timeStamp
| ) |  |

void cla_ANGLE_setParams | ( | ANGLE_Handle | handle,
|  | const float_t | timeStampPeriod_sec,
|  | const float_t | angleDelayed_sf_sec
| ) |  |

void cla_ANGLE_setup | ( | ANGLE_Handle | handle,
|  | const int_least32_t | timeStamp,
|  | const float_t | angle_rad,
|  | const float_t | speed_rps,
|  | const float_t | accel_rps2
| ) |  |