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.
Fork of FYDP_Final2 by
reckon.h
00001 #ifndef RECKON_H 00002 #define RECKON_H 00003 00004 #include "mbed.h" 00005 #include "ADNS5090.h" 00006 00007 //TODO: include a function to swap motors if they are connected wrong. 00008 00009 #define DEGREES(radians)((radians)*180/M_PI) 00010 00011 class Reckon 00012 { 00013 public: 00014 00015 ADNS5090& optical_flow_L; 00016 ADNS5090& optical_flow_R; 00017 float r; 00018 00019 float x; 00020 float y; 00021 float accX; 00022 float accY; 00023 float accZ; 00024 00025 float flowX; 00026 float flowY; 00027 float flowYaw; 00028 float flow_dx_L; 00029 float flow_dx_R; 00030 float flow_dy_L; 00031 float flow_dy_R; 00032 float gyroYaw; 00033 00034 Reckon(ADNS5090& L,ADNS5090& R, float radius); 00035 00036 static float reduce_angle( float &); 00037 00038 float dest_angle(float x_dest, float y_dest); 00039 float dest_distance(float x_dest, float y_dest); 00040 00041 bool updateOpticalFlow(); //new 00042 void reset(); 00043 00044 private: 00045 Timer frametime; 00046 }; 00047 00048 #endif
Generated on Tue Jul 12 2022 16:56:36 by
