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.
struct.h
00001 00002 typedef struct _fcc_data { 00003 00004 unsigned short US; //2 00005 unsigned short IR1; //2 00006 unsigned short IR2; //2 00007 unsigned short IR3; //2 00008 unsigned short IR4; //2 00009 unsigned short bat; //2 00010 char state_flag; //1 00011 float roll, pitch, yaw; // 4, 4, 4 00012 float g_roll, g_pitch, g_yaw; //4, 4, 4 00013 float acc_x, acc_y, acc_z; //4, 4 ,4 00014 00015 }FCC_DATA; 00016 FCC_DATA fcc; 00017 00018 typedef struct _imu{ 00019 char *roll, *pitch, *yaw, *g_roll, *g_pitch, *g_yaw, *acc_x, *acc_y, *acc_z; 00020 }data_IMU; 00021 data_IMU data; 00022 00023 typedef struct _ahrs { 00024 00025 short packet; //2 00026 unsigned char data_info; //1 00027 float g_roll, g_pitch, g_yaw; //4, 4, 4 00028 float acc_x, acc_y, acc_z; //4, 4 ,4 00029 float roll, pitch, yaw; // 4, 4, 4 00030 00031 }AHRS_DATA; 00032 AHRS_DATA IMU; 00033 00034 00035 typedef struct _gps { 00036 float lat, lon, alti, dist, bear; 00037 }GPS_DATA; 00038 GPS_DATA gps; 00039 00040 typedef struct _rc { 00041 short roll, throttle, pitch, yaw, sw; 00042 short rolls, throttles, pitchs, yaws, sws; 00043 } RC_DATA; 00044 RC_DATA RC; 00045 00046 typedef struct _last{ 00047 float roll, pitch, yaw; // 4, 4, 4 00048 float g_roll, g_pitch, g_yaw; //4, 4, 4 00049 float acc_x, acc_y, acc_z; //4, 4 ,4 00050 } LAST_IMU; 00051 LAST_IMU last; 00052 00053 typedef struct _gainRoll{ 00054 float p, i, d, r; 00055 }GAIN_ROLL; 00056 GAIN_ROLL gainRoll; 00057 00058 typedef struct _gainPitch{ 00059 float p, i, d, r; 00060 }GAIN_PITCH; 00061 GAIN_PITCH gainPitch; 00062 00063 typedef struct _gainYaw{ 00064 float p, i, d, r; 00065 }GAIN_YAW; 00066 GAIN_YAW gainYaw; 00067 00068 typedef struct _gainAlti{ 00069 float p, i, d, r; 00070 }GAIN_ALTI; 00071 GAIN_ALTI gainAlti; 00072 00073 00074 //======== PID Struct =====/ 00075 typedef struct GAIN_GET 00076 { 00077 char Index, flight_mode, sensor_select; //3 00078 float p_gain, i_gain, d_gain, goal; //4, 4, 4, 4 00079 char dumm; //1 -dummy 00080 }PID_GAIN; 00081 PID_GAIN PID; 00082 00083 00084 //======== F_MODE Struct =====/ 00085 typedef struct F_MODE_GET 00086 { 00087 unsigned short mode; 00088 ///char lock, mode, mission; //1, 1, 1 00089 // unsigned short heading_ref; //2 00090 // unsigned short alti_ref; //2 00091 /// unsigned short y_trim; //2 00092 /// unsigned short r_trim; //2 00093 /// unsigned short p_trim; //2 00094 //char dumm; //1 -dummy 00095 }F_MODE_DATA; 00096 F_MODE_DATA FMD; 00097
Generated on Sun Jul 17 2022 00:27:14 by
