PecData Class Reference

Data container for PEC table. More...

List of all members.

Public Types

enum  Traversal { forward = 1, backward = -1 }

Public Member Functions

void clear ()
Traversal traversal () const
void setTraversal (Traversal eDirection)
int factor () const
int aggress () const
int fileFactorAggress () const
const PecSampleoperator[] (int nRow) const
PecSample::Val value (int nRow) const
int valueInt (int nRow) const
bool set (int nFactor, int nAggress, const QVector< PecSample::Val > &aTable)
bool setFactor (int nFactor)
bool setAggress (int nAggress)
bool setFileFactorAggress (int nFactorAggress)
bool setValue (int nRow, PecSample::Val eVal)
void setFinish ()
bool calc (const QVector< double > &aProfile, double dfPecPosScale, int nAggressMin, int nAggressMax, int nFactorMax, IProgress *pProgress)
bool fit (const QVector< double > &aProfile, double dfPecPosScale, IProgress *pProgress)

Static Public Attributes

static const int c_nRowNum = 256
static const int c_nRowGen = 4
static const int c_nAggressNum = 15
static const int c_nFactorNum = 15

Private Member Functions

void recalcGeo ()

Private Attributes

int m_nFactor
int m_nAggress
QVector< PecSamplem_aTable
Traversal m_eTraversal
int m_nOffset


Detailed Description

Data container for PEC table.

This class holds data for PEC (periodic error correction).


Member Function Documentation

void PecData::clear (  ) 

Clear PEC table

Sets all PEC value to PecSample::reset.

bool PecData::calc ( const QVector< double > &  aProfile,
double  dfPecPosScale,
int  nAggressMin,
int  nAggressMax,
int  nFactorMax,
IProgress *  pProgress 
)

Calculate PEC table to achieve the given PE profile aProfile

Background:

PE is a positional error of the worm gear.

Let x denote the rotation angle of the worm, running from 0 ... 256 for one worm revolution (360°).
Let y denote the rotation angle of the worm wheel, running from 0 ... 256 when advancing by one worm wheel tooth (360° / number of worm wheel teeth).

Ideally, y = x + C, with C being an arbitrary constant (worm and worm wheel beeing endless, so there's no special start point).
With PE, y = x + e(x) + C.

To compensate the PE, the MCU models e(x) with an approximation c(x), which has discrete slope values. The MCU holds a PEC table of 256 entries and a PEC factor f, which describe c(x). A PEC table entry has one of the following values:

c(x) is dependent on the traversal direction, i.e. whether the PEC table is processed with increasing or decreasing x. When traversing backwards, the MCU uses the PEC table entry at x to calculate the speed while moving from c(x+1) to c(x), i.e. it does a kind of look-ahead. It seems that currently the MCU always traverses the PEC table with decreasing x, so switching the RA direction (from Normal to Reversed or vice versa) or switching the Hemisphere invalidates the PEC table.

Concerning a, empirical measurements suggest a value of aggressiveness / (2 * max. goto rate), which is 1/80 for firmware v3.59, aggressiveness/240 for v4.00rc4 and less, and aggressiveness/200 for v4.00rc5 and above.

See also:
recalcGeo()

void PecData::recalcGeo (  )  [private]

Recalculate acceleration, speed and position from raw PEC table values


The documentation for this class was generated from the following files:
Generated on Sun Jun 3 16:45:47 2007 for Aspect by  doxygen 1.5.1