Speeduino
Loading...
Searching...
No Matches
Classes
crank_angle_calculator.h File Reference

Crank calculations. To be reused by individual decoders. More...

#include "src/utils/nominmax.h"
#include <tuple>
#include "config_pages.h"

Go to the source code of this file.

Classes

struct  last_tooth_rev_calculator_t
 A crank angle calculator that computes a temporal adjustment based on when the tooth was last detected. More...
 
struct  tooth_interval_calculator_t
 A crank angle calculator that computes a temporal adjustment based on the gap between the 2 most recent teeth rather than the last full revolution. More...
 
struct  lookup_initial_calculator_t
 A crank angle calculator that looks up the initial crank angle from an array. More...
 
struct  compute_initial_calculator_t
 A crank angle calculator that computes the initial crank angle from a tooth angle. More...
 
struct  sequential_correction_calculator_t
 A crank angle calculator that computes a revolution adjustment. More...
 
struct  simple_crank_angle_calculator_t
 
struct  lookup_crank_angle_calculator_t
 
struct  trigger_angle_crank_angle_calculator_t
 
struct  lookup_crank_angle_calculator_tooth_interval_t
 
struct  compute_crank_angle_calculator_tooth_interval_t
 

Detailed Description

Crank calculations. To be reused by individual decoders.

Crank angle calculations (usually) have 4 components:

  1. The angle of the last detected tooth. This can be computed from a fixed tooth angle or looked up from an array. This only gives accuracy to the nearest tooth.
  2. A temporal adjustment to account for rotation since the last tooth was detected. This can be a simple delta or based on the interval between teeth
  3. An adjustment for sequential operation to account for the 1st (0-359°) or 2nd (360-719°) revolution
  4. A user defined offset from TDC (this accounts for sensor position on the wheel)