更新数据解析脚本
This commit is contained in:
+59
-22
@@ -4,12 +4,26 @@ import scipy.io as spio
|
||||
import math
|
||||
|
||||
line_buff = []
|
||||
inv_dalin_fix = [-0.0061075297, 0.0116297975, 0.0000028471, -0.0000004536]
|
||||
inv_dalout_fix = [-0.0202131443, 0.0125861888, 0.0000298655, -0.0000013490]
|
||||
inv_darin_fix = [-0.0010516139, -0.0114334432, -0.0000011885, 0.0000004852]
|
||||
inv_darout_fix = [-0.0004526855, -0.0112986413, -0.0000081846, 0.0000004624]
|
||||
inv_drl_fix = [0.0024652155, -0.0139869564, 0.0000143248, 0.0000004647]
|
||||
inv_drr_fix = [-0.0016802808, -0.0139145523, -0.0000072242, 0.0000002906]
|
||||
|
||||
|
||||
inv_dali_fix = [0.1408039507 ,-0.0140627200 ,-0.0000033598, 0.0000001592]
|
||||
inv_dalo_fix = [0.0070414080 ,-0.0140834449, 0.0000011782 ,0.0000001592]
|
||||
inv_dari_fix = [-0.0628936466 ,0.0139820955, -0.0000013965, 0.0000000274]
|
||||
inv_daro_fix = [0.0760199848 ,0.0140838792 ,-0.0000000214, -0.0000002133]
|
||||
inv_deli_fix = [0.0279715821 ,-0.0139882897, 0.0000012014 ,0.0000000240]
|
||||
inv_delo_fix = [-0.1674419142 ,-0.0141767262, -0.0000105237, -0.0000001360]
|
||||
inv_deri_fix = [-0.0913878050 ,0.0140764858 ,-0.0000026448, 0.0000000087]
|
||||
inv_dero_fix = [-0.0028783254, 0.0143703649 ,0.0001068659 ,-0.0000027725]
|
||||
inv_dfli_fix = [-0.1532449359 ,0.0146335728 ,-0.0000043779 ,0.0000000649]
|
||||
inv_dflo_fix = [0.0278719692, 0.0146730933, 0.0000014963 ,-0.0000002196]
|
||||
inv_dfri_fix = [0.0176016124, 0.0146706756, 0.0000019575 ,-0.0000002196]
|
||||
inv_dfro_fix = [-0.1678829514 ,0.0146425231, -0.0000045724, 0.0000000649]
|
||||
inv_dfali_fix = [0.1407942292 ,-0.0140664510, -0.0000031613 ,0.0000001864]
|
||||
inv_dfalo_fix = [-0.0139722450, 0.0139733266 ,-0.0000011090 ,0.0000000274]
|
||||
inv_dfari_fix = [0.3546473539 ,0.0139533437 ,-0.0000010483 ,-0.0000000271]
|
||||
inv_dfaro_fix = [0.0422548962 ,-0.0140863505 ,-0.0000000160, 0.0000001592]
|
||||
|
||||
|
||||
|
||||
def printline(txt):
|
||||
global line_buff
|
||||
@@ -229,27 +243,27 @@ def parseHJ(filename):
|
||||
],
|
||||
7: [struct.Struct('<I8H'),
|
||||
[['boot_time', 0.005, '时间戳', 0],
|
||||
['act_can1_dfli_pos', 1, '左内襟翼 舵机1', 0],
|
||||
['act_can1_drli_pos', 1, '右内襟翼 舵机2', 0],
|
||||
['act_can1_dfali_pos', 1, '左内襟副翼 舵机3', 0],
|
||||
['act_can1_dfari_pos', 1, '右内襟副翼舵机4', 0],
|
||||
['act_can1_dali_pos', 1, '左内副翼 舵机5', 0],
|
||||
['act_can1_dari_pos', 1, '右内副翼 舵机6', 0],
|
||||
['act_can1_deli_pos', 1, '左内尾翼 舵机7', 0],
|
||||
['act_can1_deri_pos', 1, '右内尾翼 舵机8', 0],
|
||||
['act_can1_dfli_pos', act2deg_new(inv_dfli_fix), '左内襟翼 舵机1', 0],
|
||||
['act_can1_dfri_pos', act2deg_new(inv_dfri_fix), '右内襟翼 舵机2', 0],
|
||||
['act_can1_dfali_pos', act2deg_new(inv_dfali_fix), '左内襟副翼 舵机3', 0],
|
||||
['act_can1_dfari_pos', act2deg_new(inv_dfari_fix), '右内襟副翼舵机4', 0],
|
||||
['act_can1_dali_pos', act2deg_new(inv_dali_fix), '左内副翼 舵机5', 0],
|
||||
['act_can1_dari_pos', act2deg_new(inv_dari_fix), '右内副翼 舵机6', 0],
|
||||
['act_can1_deli_pos', act2deg_new(inv_deli_fix), '左内尾翼 舵机7', 0],
|
||||
['act_can1_deri_pos', act2deg_new(inv_deri_fix), '右内尾翼 舵机8', 0],
|
||||
],
|
||||
[],
|
||||
],
|
||||
8: [struct.Struct('<I8H'),
|
||||
[['boot_time', 0.005, '时间戳', 0],
|
||||
['act_can2_dflo_pos', 1, '左外襟翼 舵机9', 0],
|
||||
['act_can2_dfro_pos', 1, '右外襟翼 舵机10', 0],
|
||||
['act_can2_dfalo_pos', 1, '左外襟副翼 舵机11', 0],
|
||||
['act_can2_dfaro_pos', 1, '右外襟副翼 舵机12', 0],
|
||||
['act_can2_dalo_pos', 1, '左外副翼 舵机13', 0],
|
||||
['act_can2_daro_pos', 1, '右外副翼 舵机14', 0],
|
||||
['act_can2_delo_pos', 1, '左外尾翼 舵机15', 0],
|
||||
['act_can2_dero_pos', 1, '右外尾翼 舵机16', 0],
|
||||
['act_can2_dflo_pos', act2deg_new(inv_dflo_fix), '左外襟翼 舵机9', 0],
|
||||
['act_can2_dfro_pos', act2deg_new(inv_dfro_fix), '右外襟翼 舵机10', 0],
|
||||
['act_can2_dfalo_pos', act2deg_new(inv_dfalo_fix), '左外襟副翼 舵机11', 0],
|
||||
['act_can2_dfaro_pos', act2deg_new(inv_dfaro_fix), '右外襟副翼 舵机12', 0],
|
||||
['act_can2_dalo_pos', act2deg_new(inv_dalo_fix), '左外副翼 舵机13', 0],
|
||||
['act_can2_daro_pos', act2deg_new(inv_daro_fix), '右外副翼 舵机14', 0],
|
||||
['act_can2_delo_pos', act2deg_new(inv_delo_fix), '左外尾翼 舵机15', 0],
|
||||
['act_can2_dero_pos', act2deg_new(inv_dero_fix), '右外尾翼 舵机16', 0],
|
||||
],
|
||||
[],
|
||||
],
|
||||
@@ -586,6 +600,29 @@ def parseHJ(filename):
|
||||
],
|
||||
[],
|
||||
],
|
||||
24: [struct.Struct('<I18f'),
|
||||
[['boot_time', 0.005, '时间戳', 0],
|
||||
['q_tht_hat', 1, 'q_tht_hat', 0],
|
||||
['q_sigma_hat', 1, 'q_sigma_hat', 0],
|
||||
['q_omega_hat', 1, 'q_omega_hat', 0],
|
||||
['q_hat', 57.3, 'q_hat', 0],
|
||||
['p_tht_hat', 1, 'p_tht_hat', 0],
|
||||
['p_sigma_hat', 1, 'p_sigma_hat', 0],
|
||||
['p_omega_hat', 1, 'p_omega_hat', 0],
|
||||
['p_hat', 57.3, 'p_hat', 0],
|
||||
['pdot_c', 57.31, 'pdot_c', 0],
|
||||
['qdot_c', 57.31, 'qdot_c', 0],
|
||||
['qdot_c_out', 57.31, 'qdot_c_out', 0],
|
||||
['pdot_c_out', 57.31, 'pdot_c_out', 0],
|
||||
['rdot_c', 57.31, 'rdot_c', 0],
|
||||
['r_hat', 57.3, 'r_hat', 0],
|
||||
['r_sigma_hat', 1, 'r_sigma_hat', 0],
|
||||
['r_omega_hat', 1, 'r_omega_hat', 0],
|
||||
['r_tht_hat', 1, 'r_tht_hat', 0],
|
||||
['rdot_c_out', 57.31, 'rdot_c_out', 0],
|
||||
],
|
||||
[],
|
||||
],
|
||||
25: [struct.Struct('<I22fH'),
|
||||
[['boot_time', 0.005, '时间戳', 0],
|
||||
|
||||
|
||||
Reference in New Issue
Block a user