svoe
Dependencies: mbed mbed-STM32F103C8T6 MPU6050_1
Diff: common.h
- Revision:
- 12:721a9ea55e91
- Parent:
- 9:8f98b1c277a4
- Child:
- 13:789b451cc27d
--- a/common.h Sun Oct 14 07:53:07 2018 +0000 +++ b/common.h Sat Nov 03 11:43:03 2018 +0000 @@ -5,4 +5,33 @@ DigitalOut test(PB_15); //Test pin for diagnostics and debugging int volatile proc_counter; //(3e5 - 2e6 idle, 2e5 - 5e5 at motion) / per 50 mS -float t_step = 0.01;//SI realtime step \ No newline at end of file +float const t_step = 0.02;//SI realtime step + +float const g= 9.81;//SI +float const r_wheel = 0.038;//SI +float const center_mas = 0.022;//SI (ot osi) +float const mass = 1.3;//SI +float const m_inert = 5e-3;//SI +float const half_axis = 0.08;//SI +float const pi = 3.1415926535; +float const ppr = 3200;//pulses per revolution + +struct coord{ +float x; //m +float y; //m +float azimuth; // rad +float speed; //m/s +float path; //m +float angular_speed; //rad/s +}; + +coord current; +coord target; + +float balance_prop = 0.8; +float balance_diff = 1.2; +float x_prop = 40; +float x_diff = 25; +float azimuth_prop = 0.8; +float azimuth_diff = 0.65; +