Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Dynamics/dynamics.h
- Revision:
- 0:4dd2d995f7d0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Dynamics/dynamics.h Tue May 07 01:56:53 2019 +0000 @@ -0,0 +1,24 @@ +#ifndef DYNAMICS_H +#define DYNAMICS_H + +#include "mbed.h" +#include "../Eigen/Dense.h" +#include "../structs.h" + +#define J0 .000115f +#define L0 .043f +#define B0 .00001f +#define J1 .00000237f +#define L1 .035f +#define M1 .0054f +#define B1 .00001f +#define G 9.8f + +#define P_RES 4096 // Pendulum encoder resolution +#define B_RES 4096 // Base encoder resolution + +#define PI 3.14159265359f + +void integrate_state(StateStruct * state, float torque, float dt); +void update_sensors(StateStruct state, SensorStruct * sensors); +#endif \ No newline at end of file