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.
Dependents: M-G354PDH0_serial_Lib INS_GNSS_logger_1 UBX_GPS_muliti_SPI_4_logger_ver
MG354PDH0.h
00001 00002 class MG354PDH0 { 00003 00004 public: 00005 MG354PDH0(Serial* ps); 00006 00007 void call_window1(); 00008 void call_window0(); 00009 void GLOB_CMD_read(); 00010 void DIAG_STAT_read(); 00011 void UART_CTRL_write(); 00012 /*サンプリングモードへの移行*/ 00013 void move_to_sampling_mode(); 00014 /*IMUが動作可能かどうかの確認*/ 00015 void power_on_sequence1(); 00016 /*IMUが動作可能かどうかの確認*/ 00017 void power_on_sequence2(); 00018 00019 /*X軸周りの角速度を算出*/ 00020 float read_angular_rate_x(); 00021 /*Y軸周りの角速度を算出*/ 00022 float read_angular_rate_y(); 00023 /*Z軸周りの角速度を算出*/ 00024 float read_angular_rate_z(); 00025 00026 /*X軸の加速度を算出*/ 00027 float read_acceleration_x(); 00028 /*Y軸の加速度を算出*/ 00029 float read_acceleration_y(); 00030 /*Z軸の加速度を算出*/ 00031 float read_acceleration_z(); 00032 00033 float gyro_val[3];//角速度の値 00034 float acc_val[3];//加速度の値 00035 00036 00037 private: 00038 Serial* p_port; 00039 00040 #define SCALE_FACTOR_GYRO 0.016 00041 #define SCALE_FACTOR_ACC 0.20 00042 #define GRAVITIONAL_ACCELERATION 9.80665 00043 00044 char val_GLOB_CMD_read[2]; 00045 short i_GLOB_CMD_read; 00046 00047 char val_DIAG_STAT_read[2]; 00048 short i_DIAG_STAT_read; 00049 00050 char val_rate_x[4]; 00051 char val_rate_y[4]; 00052 char val_rate_z[4]; 00053 00054 char val_acc_x[4]; 00055 char val_acc_y[4]; 00056 char val_acc_z[4]; 00057 00058 float gyro_x,gyro_y,gyro_z; 00059 float acceleration_x,acceleration_y,acceleration_z; 00060 00061 };
Generated on Wed Jul 13 2022 14:47:59 by
1.7.2