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.
Dependencies: mbed
Revision 2:970cd691d7de, committed 2019-10-05
- Comitter:
- Yokiru
- Date:
- Sat Oct 05 16:38:03 2019 +0000
- Parent:
- 1:c79aa502de30
- Commit message:
- fixed decoding AD data for EM
Changed in this revision
--- a/decode_uart/calculate_ad_data.h Tue Oct 30 10:32:08 2018 +0000 +++ b/decode_uart/calculate_ad_data.h Sat Oct 05 16:38:03 2019 +0000 @@ -10,12 +10,14 @@ #define calculate_R(D) ((-1.0*pow(10.0,5.0)*D)/(D-255.0)) #define calculate_T(D) ((1.0/(a + b*log(calculate_R(D)) + c*pow(log(calculate_R(D)),3.0))) - 273.15) #define calculate_solar_I(D) (D/510.0) -#define calculate_txmodem_I(D) (D/(51.0*82.5*0.06)) -#define calculate_rxFM_CW_I(D) (D/(51.0*20.5*0.39)) -#define calculate_rxmodem_I(D) (D/(51.0*20.5*1.82)) -#define calculate_txFM_I(D) (D/(51.0*56.5*0.04)) +#define calculate_txCW_FM_I(D) (D/(51.0*20.5*0.11)) +#define calculate_rx_modem_I(D) (D/(51.0*20.5*1.0)) +//#define calculate_txmodem_I(D) (D/(51.0*82.5*0.06)) +//#define calculate_rxFM_CW_I(D) (D/(51.0*20.5*0.39)) +//#define calculate_rxmodem_I(D) (D/(51.0*20.5*1.82)) +//#define calculate_txFM_I(D) (D/(51.0*56.5*0.04)) #define calculate_mis5V_I(D) (D/(51.0*82.5*0.06)) -#define calculate_mobc_I(D) (D/(51.0*82.5*0.06)) -#define calculate_misbus_I(D) (D/(51.0*5.0*0.18)) +#define calculate_mobc5V_I(D) (D/(51.0*82.5*0.06)) +#define calculate_misbus_I(D) (D/(51.0*8.2*0.1)) #endif \ No newline at end of file
--- a/decode_uart/decode_uart.cpp Tue Oct 30 10:32:08 2018 +0000 +++ b/decode_uart/decode_uart.cpp Sat Oct 05 16:38:03 2019 +0000 @@ -4,8 +4,7 @@ void Decode_UART::decode_uart(u8 _num_uart[]) { - ///*ADデータ*/// - printf("flag_power_shutdouwn\t\t\t%d\r\n",_num_uart[0]); + printf("flag_power_shutdouwn\t\t%d\r\n",_num_uart[0]); printf("mission command\t\t\t"); for(int i=0; i<8; i++) { printf("%x ,",_num_uart[1+i]); @@ -13,7 +12,10 @@ printf("\r\n"); uint32_t bobc_time=(_num_uart[9]<<24)+(_num_uart[10]<<16)+(_num_uart[11]<<8)+(_num_uart[12]); printf("BOBC time\t\t\t%u\r\n",bobc_time); - + tlm_tmp = _num_uart[13]; + printf("abnormity status\t\t0x%d\r\n\r\n", tlm_tmp); + + /* --- ADデータ --- */ printf("AD data\r\n"); tlm_tmp = _num_uart[14]; printf("battery voltage\t\t\t0x%02x\t%.2f[V]\r\n", tlm_tmp, calculate_V((double)tlm_tmp)); @@ -23,15 +25,15 @@ printf("battery temperature\t\t0x%02x\t%.2f[deg]\r\n", tlm_tmp, calculate_T((double)tlm_tmp)); tlm_tmp = _num_uart[17]; - printf("+X solar-battery current\t0x%02x\t%.2f[A]\r\n", tlm_tmp, calculate_solar_I((double)tlm_tmp)); + printf("-Y deployed panel solar-battery current\t0x%02x\t%.2f[A]\r\n", tlm_tmp, calculate_solar_I((double)tlm_tmp)); tlm_tmp = _num_uart[18]; - printf("-X solar-battery current\t0x%02x\t%.2f[A]\r\n", tlm_tmp, calculate_solar_I((double)tlm_tmp)); + printf("+Y undeployed panel solar-battery current\t0x%02x\t%.2f[A]\r\n", tlm_tmp, calculate_solar_I((double)tlm_tmp)); tlm_tmp = _num_uart[19]; - printf("+Y solar-battery current\t0x%02x\t%.2f[A]\r\n", tlm_tmp, calculate_solar_I((double)tlm_tmp)); + printf("+X solar-battery current\t0x%02x\t%.2f[A]\r\n", tlm_tmp, calculate_solar_I((double)tlm_tmp)); tlm_tmp = _num_uart[20]; - printf("-Y solar-battery current\t0x%02x\t%.2f[A]\r\n", tlm_tmp, calculate_solar_I((double)tlm_tmp)); + printf("-X solar-battery current\t0x%02x\t%.2f[A]\r\n", tlm_tmp, calculate_solar_I((double)tlm_tmp)); tlm_tmp = _num_uart[21]; - printf("+Z solar-battery current\t0x%02x\t%.2f[A]\r\n", tlm_tmp, calculate_solar_I((double)tlm_tmp)); + printf("+Y deployed panel solar-battery current\t0x%02x\t%.2f[A]\r\n", tlm_tmp, calculate_solar_I((double)tlm_tmp)); tlm_tmp = _num_uart[22]; printf("-Z solar-battery current\t0x%02x\t%.2f[A]\r\n", tlm_tmp, calculate_solar_I((double)tlm_tmp)); @@ -40,32 +42,30 @@ tlm_tmp = _num_uart[24]; printf("mission-board temperature\t0x%02x\t%.2f[deg]\r\n", tlm_tmp, calculate_T((double)tlm_tmp)); tlm_tmp = _num_uart[25]; - printf("+X panel temperature\t\t0x%02x\t%.2f[deg]\r\n", tlm_tmp, calculate_T((double)tlm_tmp)); + printf("-Y panel temperature\t\t0x%02x\t%.2f[deg]\r\n", tlm_tmp, calculate_T((double)tlm_tmp)); tlm_tmp = _num_uart[26]; printf("+Z panel temperature\t\t0x%02x\t%.2f[deg]\r\n", tlm_tmp, calculate_T((double)tlm_tmp)); tlm_tmp = _num_uart[27]; - printf("+Y panel temperature\t\t0x%02x\t%.2f[deg]\r\n", tlm_tmp, calculate_T((double)tlm_tmp)); + printf("+X panel temperature\t\t0x%02x\t%.2f[deg]\r\n", tlm_tmp, calculate_T((double)tlm_tmp)); tlm_tmp = _num_uart[28]; - printf("-Y panel temperature\t\t0x%02x\t%.2f[deg]\r\n", tlm_tmp, calculate_T((double)tlm_tmp)); + printf("-X panel temperature\t\t0x%02x\t%.2f[deg]\r\n", tlm_tmp, calculate_T((double)tlm_tmp)); tlm_tmp = _num_uart[29]; - printf("-X panel temperature\t\t0x%02x\t%.2f[deg]\r\n", tlm_tmp, calculate_T((double)tlm_tmp)); + printf("+Y panel temperature\t\t0x%02x\t%.2f[deg]\r\n", tlm_tmp, calculate_T((double)tlm_tmp)); tlm_tmp = _num_uart[30]; printf("-Z panel temperature\t\t0x%02x\t%.2f[deg]\r\n", tlm_tmp, calculate_T((double)tlm_tmp)); tlm_tmp = _num_uart[31]; - printf("EPS1-board temperature\t\t0x%02x\t%.2f[deg]\r\n", tlm_tmp, calculate_T((double)tlm_tmp)); + printf("EPS1-SHUNT temperature\t\t0x%02x\t%.2f[deg]\r\n", tlm_tmp, calculate_T((double)tlm_tmp)); - tlm_tmp = _num_uart[32]; - printf("tx-modem etc. current\t\t0x%02x\t%.2f[A]\r\n", tlm_tmp, calculate_txmodem_I((double)tlm_tmp)); + //num_uart[32]:割り当てなし tlm_tmp = _num_uart[33]; - printf("CW,rx-transceiver current\t0x%02x\t%.2f[A]\r\n", tlm_tmp, calculate_rxFM_CW_I((double)tlm_tmp)); + printf("tx(CW/FM) current\t\t0x%02x\t%.2f[A]\r\n", tlm_tmp, calculate_txCW_FM_I((double)tlm_tmp)); tlm_tmp = _num_uart[34]; - printf("rx-modem etc. current\t\t0x%02x\t%.2f[A]\r\n", tlm_tmp, calculate_rxmodem_I((double)tlm_tmp)); - tlm_tmp = _num_uart[35]; - printf("tx-transceiver current\t\t0x%02x\t%.2f[A]\r\n", tlm_tmp, calculate_txFM_I((double)tlm_tmp)); + printf("rx, modem(rx) etc. current\t0x%02x\t%.2f[A]\r\n", tlm_tmp, calculate_rx_modem_I((double)tlm_tmp)); + //num_uart[35]:割り当てなし tlm_tmp = _num_uart[36]; printf("mission-board 5V-line current\t0x%02x\t%.2f[A]\r\n", tlm_tmp, calculate_mis5V_I((double)tlm_tmp)); tlm_tmp = _num_uart[37]; - printf("MOBC current\t\t\t0x%02x\t%.2f[A]\r\n", tlm_tmp, calculate_mobc_I((double)tlm_tmp)); + printf("MOBC 5V-line current\t\t0x%02x\t%.2f[A]\r\n", tlm_tmp, calculate_mobc5V_I((double)tlm_tmp)); tlm_tmp = _num_uart[38]; printf("mission-board bus-line current\t0x%02x\t%.2f[A]\r\n", tlm_tmp, calculate_misbus_I((double)tlm_tmp)); @@ -77,5 +77,5 @@ // tlm_tmp = _num_uart[41]; // printf("RSSI\t\t\t\t0x%02x\t%.2f[V]\r\n", tlm_tmp, calculate_V((double)tlm_tmp)); - printf("\r\n"); + printf("\r\n\r\n"); }
--- a/main.cpp Tue Oct 30 10:32:08 2018 +0000 +++ b/main.cpp Sat Oct 05 16:38:03 2019 +0000 @@ -8,7 +8,7 @@ Decode_UART uart; u8 flag_uart_cs=0; -u8 num_uart[LENGTH_UART_DATA]={0}; +u8 num_uart[LENGTH_UART_DATA]={0}; u8 mis_command[LENGTH_MISSION_COMMAND]={0}; u8 flag_uart_timeout=0;