TR-mbed 1.0
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
WheelKalman Class Reference

#include <WheelKalman.h>

Inheritance diagram for WheelKalman:
TinyEKF

Public Member Functions

 WheelKalman ()
 
void setDt (double dt)
 
- Public Member Functions inherited from TinyEKF
double getX (int i)
 
void setX (int i, double value)
 
bool step (double *z)
 

Public Attributes

double dt
 
double u [ControlInputs]
 

Protected Member Functions

void model (double fx[Nsta], double F[Nsta][Nsta], double hx[Mobs], double H[Mobs][Nsta]) override
 
- Protected Member Functions inherited from TinyEKF
 TinyEKF ()
 
 ~TinyEKF ()
 
void setP (int i, int j, double value)
 
void setQ (int i, int j, double value)
 
void setR (int i, int j, double value)
 

Protected Attributes

double B [Nsta][ControlInputs]
 
- Protected Attributes inherited from TinyEKF
double * x
 

Detailed Description

The WheelKalman class is a Kalman filter used to control a single wheel/motor. It uses an Extended Kalman Filter (EKF) to implement position control of the wheel.

Constructor & Destructor Documentation

◆ WheelKalman()

WheelKalman::WheelKalman ( )

Creates a new WheelKalman object

Member Function Documentation

◆ model()

void WheelKalman::model ( double  fx[Nsta],
double  F[Nsta][Nsta],
double  hx[Mobs],
double  H[Mobs][Nsta] 
)
overrideprotectedvirtual

Implement this function for your EKF model.

Parameters
fxgets output of state-transition function f(x0 .. n-1)
Fgets n × n Jacobian of f(x)
hxgets output of observation function h(x0 .. n-1)
Hgets m × n Jacobian of h(x)

Implements TinyEKF.

◆ setDt()

void WheelKalman::setDt ( double  dt)

Sets the dt (time delta) of the kalman filter, used to predict how much the position will change each timestep based on speed and dt

Parameters
dtThe time delta in milliseconds

Member Data Documentation

◆ B

double WheelKalman::B[Nsta][ControlInputs]
protected

◆ dt

double WheelKalman::dt

◆ u

double WheelKalman::u[ControlInputs]

The documentation for this class was generated from the following files: