Home > Back-end >  C language programming
C language programming

Time:11-14

Read from the selected data file any three variables in the data, and will be read by data according to the format write self-built TXT file, at the same time please students in calculating the data points, three points average filter, limiter, the most value and its time points, the mean, variance, standard deviation of this 7 kinds of data processing method, choose two data processing methods to extract the data is analyzed, and the results show that on the screen (the most value and its time point, the mean, variance, standard deviation need 4 methods) and file,

Data file has the following names to choose from:
Will choose data: time_boot_ms
Choose two: roll, pitch, yaw, rollspeed, pitchspeed, yawspeed, servo1_raw, servo2_raw, servo3_raw, servo4_raw, chan1_raw, chan2_raw, chan3_raw, chan4_raw, chan5_raw, chan1_scaled, chan2_scaled, chan3_scaled, chan4_scaled, chan5_scaled, press_abs, press_diff,
Written to the file data format for:
According to the line arrangement: data \ t
According to the arrangement: data \ n
Data: 2017/6/6 14:36:39 FE 9 88 FF BE 0 mavlink_heartbeat_t custom_mode 0 type 6 autopilot 8 system_status base_mode 0 0 mavlink_version 3 Len 17
2017/6/6 14:36:39 FE c 78 1 1 1 e mavlink_attitude_t time_boot_ms 2596452 roll - pitch 0.08377136 0.008107094 yaw rollspeed 2.546685 0.08374476 pitchspeed yawspeed Len 36
0.1077908 0.18977162017/6/6 14:36:39 FE 14 79 1 1 4 a mavlink_vfr_hud_t groundspeed airspeed 0 0 Alt 7.51 climb 0.04 heading 145 throttle 0 Len 28
2017/6/6 14:36:39 FE 9 7 a 1 1 0 mavlink_heartbeat_t custom_mode 0 type 2 autopilot 3 base_mode 81 system_status 4 mavlink_version 3 Len 17
2017/6/6 14:36:39 FE c 7 b 1 1 1 e mavlink_attitude_t time_boot_ms 2596632 roll - pitch yaw pitchspeed rollspeed - 0.02840534-2.561687 0.002585128 0.09769697 0.07362269 0.07107522 Len yawspeed 36
2017/6/6 14:36:39 FE 14 7 c 1 1 4 a mavlink_vfr_hud_t groundspeed airspeed 0 0 Alt 7.47 climb 0.12 heading 146 throttle 0 Len 28
2017/6/6 14:36:39 FE E 7 d 1 1 1 d mavlink_scaled_pressure_t time_boot_ms 2596732 press_abs press_diff 442.2036-0.3744922 temperature 3381 Len 22
2017/6/6 14:36:39 FE 2 a 7 e 1 1 96 mavlink_sensor_offsets_t mag_declination 0 raw_press 6051773 raw_temp 8425339 gyro_cal_y gyro_cal_x - 0.01416344-0.089735 gyro_cal_z accel_cal_x 0.005016467 0.2391279 0.03186627 accel_cal_z accel_cal_y 0.08498573 mag_ofs_z mag_ofs_y mag_ofs_x - 121-116-83 Len 50
2017/6/6 14:36:39 FE 7 f 1 1 1 1 f mavlink_sys_status_t onboard_control_sensors_present onboard_control_sensors_enabled onboard_control_sensors_health load 4294966287 4294945807 4294966287 10080 errors_comm drop_rate_comm current_battery - 1 0 0 0 voltage_battery errors_count4 errors_count3 errors_count2 errors_count1 0 0 0 0 battery_remaining 255 Len 39

CodePudding user response:

refer to the original poster weixin_45210991 response:
read from the selected data file any three variables in the data, and will be read by data according to the format write self-built TXT file, at the same time please students in calculating the data points, three points average filter, limiter, the most value and its time points, the mean, variance, standard deviation of this 7 kinds of data processing method, choose two data processing methods to extract the data is analyzed, and the results show that on the screen (the most value and its time point, the mean, variance, standard deviation need 4 methods) and file,

Data file has the following names to choose from:
Will choose data: time_boot_ms
Choose two: roll, pitch, yaw, rollspeed, pitchspeed, yawspeed, servo1_raw, servo2_raw, servo3_raw, servo4_raw, chan1_raw, chan2_raw, chan3_raw, chan4_raw, chan5_raw, chan1_scaled, chan2_scaled, chan3_scaled, chan4_scaled, chan5_scaled, press_abs, press_diff,
Written to the file data format for:
According to the line arrangement: data \ t
According to the arrangement: data \ n
Data: 2017/6/6 14:36:39 FE 9 88 FF BE 0 mavlink_heartbeat_t custom_mode 0 type 6 autopilot 8 system_status base_mode 0 0 mavlink_version 3 Len 17
2017/6/6 14:36:39 FE c 78 1 1 1 e mavlink_attitude_t time_boot_ms 2596452 roll - pitch 0.08377136 0.008107094 yaw rollspeed 2.546685 0.08374476 pitchspeed yawspeed Len 36
0.1077908 0.18977162017/6/6 14:36:39 FE 14 79 1 1 4 a mavlink_vfr_hud_t groundspeed airspeed 0 0 Alt 7.51 climb 0.04 heading 145 throttle 0 Len 28
2017/6/6 14:36:39 FE 9 7 a 1 1 0 mavlink_heartbeat_t custom_mode 0 type 2 autopilot 3 base_mode 81 system_status 4 mavlink_version 3 Len 17
2017/6/6 14:36:39 FE c 7 b 1 1 1 e mavlink_attitude_t time_boot_ms 2596632 roll - pitch yaw pitchspeed rollspeed - 0.02840534-2.561687 0.002585128 0.09769697 0.07362269 0.07107522 Len yawspeed 36
2017/6/6 14:36:39 FE 14 7 c 1 1 4 a mavlink_vfr_hud_t groundspeed airspeed 0 0 Alt 7.47 climb 0.12 heading 146 throttle 0 Len 28
2017/6/6 14:36:39 FE E 7 d 1 1 1 d mavlink_scaled_pressure_t time_boot_ms 2596732 press_abs press_diff 442.2036-0.3744922 temperature 3381 Len 22
2017/6/6 14:36:39 FE 2 a 7 e 1 1 96 mavlink_sensor_offsets_t mag_declination 0 raw_press 6051773 raw_temp 8425339 gyro_cal_y gyro_cal_x - 0.01416344-0.089735 gyro_cal_z accel_cal_x 0.005016467 0.2391279 0.03186627 accel_cal_z accel_cal_y 0.08498573 mag_ofs_z mag_ofs_y mag_ofs_x - 121-116-83 Len 50
2017/6/6 14:36:39 FE 7 f 1 1 1 1 f mavlink_sys_status_t onboard_control_sensors_present onboard_control_sensors_enabled onboard_control_sensors_health load 4294966287 4294945807 4294966287 10080 errors_comm drop_rate_comm current_battery - 1 0 0 0 voltage_battery errors_count4 errors_count3 errors_count2 errors_count1 0 0 0 0 battery_remaining 255 Len 39

Online for bosses answer,,,,
  • Related