Skip to content

Commit

Permalink
Add LPF telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
200km committed May 20, 2024
1 parent 8cacb0e commit 384a84c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions database/TLM_DB/AOBC_TLM_DB_AOBC_CONTROL.csv
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,,
,TARGET.INTERPOLATION.PREVIOUS_QUATERNION_TARGET_I2T_Y,float,(float)(quaternion_interpolator->previous_quaternion_target_i2t.vector_part[1]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,前回の目標Quaternion I2T Y,
,TARGET.INTERPOLATION.PREVIOUS_QUATERNION_TARGET_I2T_Z,float,(float)(quaternion_interpolator->previous_quaternion_target_i2t.vector_part[2]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,前回の目標Quaternion I2T Z,
,TARGET.INTERPOLATION.PREVIOUS_QUATERNION_TARGET_I2T_W,float,(float)(quaternion_interpolator->previous_quaternion_target_i2t.scalar_part),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,前回の目標Quaternion I2T W,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,TARGET.LPF_ANGULAR_VELOCITY.SAMPLING_Hz,float,(float)(target_attitude_calculator->sampling_freq_Hz),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,Angular velocity LPF sampling frequency Hz,
,TARGET.LPF_ANGULAR_VELOCITY.CUTOFF_Hz,float,(float)(target_attitude_calculator->cut_off_freq_lpf_1st_Hz),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,Angular velocity LPF cutoff frequency Hz,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
Expand Down
4 changes: 2 additions & 2 deletions database/TLM_DB/calced_data/AOBC_TLM_DB_AOBC_CONTROL.csv
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,,
,TARGET.INTERPOLATION.PREVIOUS_QUATERNION_TARGET_I2T_Y,float,(float)(quaternion_interpolator->previous_quaternion_target_i2t.vector_part[1]),PACKET,221,0,32,NONE,,,,,,,,前回の目標Quaternion I2T Y,
,TARGET.INTERPOLATION.PREVIOUS_QUATERNION_TARGET_I2T_Z,float,(float)(quaternion_interpolator->previous_quaternion_target_i2t.vector_part[2]),PACKET,225,0,32,NONE,,,,,,,,前回の目標Quaternion I2T Z,
,TARGET.INTERPOLATION.PREVIOUS_QUATERNION_TARGET_I2T_W,float,(float)(quaternion_interpolator->previous_quaternion_target_i2t.scalar_part),PACKET,229,0,32,NONE,,,,,,,,前回の目標Quaternion I2T W,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,TARGET.LPF_ANGULAR_VELOCITY.SAMPLING_Hz,float,(float)(target_attitude_calculator->sampling_freq_Hz),PACKET,233,0,32,NONE,,,,,,,,Angular velocity LPF sampling frequency Hz,
,TARGET.LPF_ANGULAR_VELOCITY.CUTOFF_Hz,float,(float)(target_attitude_calculator->cut_off_freq_lpf_1st_Hz),PACKET,237,0,32,NONE,,,,,,,,Angular velocity LPF cutoff frequency Hz,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
Expand Down
6 changes: 4 additions & 2 deletions src/src_user/TlmCmd/telemetry_definitions.c
Original file line number Diff line number Diff line change
Expand Up @@ -2120,7 +2120,7 @@ static TF_TLM_FUNC_ACK Tlm_AOBC_FRAME_TRANSFORMATION_(uint8_t* packet, uint16_t*

static TF_TLM_FUNC_ACK Tlm_AOBC_CONTROL_(uint8_t* packet, uint16_t* len, uint16_t max_len)
{
if (233 > max_len) return TF_TLM_FUNC_ACK_TOO_SHORT_LEN;
if (241 > max_len) return TF_TLM_FUNC_ACK_TOO_SHORT_LEN;

#ifndef BUILD_SETTINGS_FAST_BUILD
TF_copy_float(&packet[26], (float)(bdot->control_gain[0]));
Expand Down Expand Up @@ -2186,9 +2186,11 @@ static TF_TLM_FUNC_ACK Tlm_AOBC_CONTROL_(uint8_t* packet, uint16_t* len, uint16_
TF_copy_float(&packet[221], (float)(quaternion_interpolator->previous_quaternion_target_i2t.vector_part[1]));
TF_copy_float(&packet[225], (float)(quaternion_interpolator->previous_quaternion_target_i2t.vector_part[2]));
TF_copy_float(&packet[229], (float)(quaternion_interpolator->previous_quaternion_target_i2t.scalar_part));
TF_copy_float(&packet[233], (float)(target_attitude_calculator->sampling_freq_Hz));
TF_copy_float(&packet[237], (float)(target_attitude_calculator->cut_off_freq_lpf_1st_Hz));
#endif

*len = 233;
*len = 241;
return TF_TLM_FUNC_ACK_SUCCESS;
}

Expand Down

0 comments on commit 384a84c

Please sign in to comment.