From fc1a9400e6f5d568fe9893ffc1508a3f6db144ed Mon Sep 17 00:00:00 2001 From: David Dupre Date: Fri, 23 Mar 2018 15:43:51 -0700 Subject: [PATCH] Add more sensor proc commands and screens --- .../ADCS_SENSORPROC/cmd_tlm/_sp_states.txt | 5 ++ .../ADCS_SENSORPROC/cmd_tlm/ss_cmd.txt | 24 ++++++++ .../ADCS_SENSORPROC/cmd_tlm/ss_tlm.txt | 12 ++++ .../ADCS_SENSORPROC/screens/manual_power.txt | 20 +++++++ .../targets/ADCS_SENSORPROC/screens/pos.txt | 16 ----- .../ADCS_SENSORPROC/screens/sensors.txt | 58 +++++++++++++++++++ .../ADCS_SENSORPROC/screens/status.txt | 39 +++++++++++-- .../ADCS_SENSORPROC/screens/sun_sensor.txt | 28 --------- 8 files changed, 154 insertions(+), 48 deletions(-) create mode 100644 COSMOS/flatsat/config/targets/ADCS_SENSORPROC/cmd_tlm/_sp_states.txt create mode 100644 COSMOS/flatsat/config/targets/ADCS_SENSORPROC/screens/manual_power.txt delete mode 100644 COSMOS/flatsat/config/targets/ADCS_SENSORPROC/screens/pos.txt create mode 100644 COSMOS/flatsat/config/targets/ADCS_SENSORPROC/screens/sensors.txt delete mode 100644 COSMOS/flatsat/config/targets/ADCS_SENSORPROC/screens/sun_sensor.txt diff --git a/COSMOS/flatsat/config/targets/ADCS_SENSORPROC/cmd_tlm/_sp_states.txt b/COSMOS/flatsat/config/targets/ADCS_SENSORPROC/cmd_tlm/_sp_states.txt new file mode 100644 index 0000000..cb6e5d3 --- /dev/null +++ b/COSMOS/flatsat/config/targets/ADCS_SENSORPROC/cmd_tlm/_sp_states.txt @@ -0,0 +1,5 @@ + STATE OK 0 + STATE WARN_LOWER 1 + STATE ERR_LOWER 2 + STATE WARN_UPPER 3 + STATE ERR_UPPER 4 \ No newline at end of file diff --git a/COSMOS/flatsat/config/targets/ADCS_SENSORPROC/cmd_tlm/ss_cmd.txt b/COSMOS/flatsat/config/targets/ADCS_SENSORPROC/cmd_tlm/ss_cmd.txt index 77c144f..185507a 100644 --- a/COSMOS/flatsat/config/targets/ADCS_SENSORPROC/cmd_tlm/ss_cmd.txt +++ b/COSMOS/flatsat/config/targets/ADCS_SENSORPROC/cmd_tlm/ss_cmd.txt @@ -19,3 +19,27 @@ COMMAND ADCS_SENSORPROC OVERRIDE_BUCK LITTLE_ENDIAN "Buck converter status overr APPEND_PARAMETER ENABLE 8 UINT 0 1 0 "Override enable/disable" STATE DISABLE 0 STATE ENABLE 1 HAZARDOUS "Warning! Bad buck converter status will be ignored." + +COMMAND ADCS_SENSORPROC TEST_RESET LITTLE_ENDIAN "Direct RESET pin control" + # This must ALWAYS be the first entry in any command packet + <%= render "../../SYSTEM/cmd_tlm/_shared_cmd_header.txt", locals: { eid: 10, opc: 4 } %> + + APPEND_PARAMETER ACTIVATE 8 UINT 0 1 0 "Activate/deactivate" + STATE DEACTIVATE 0 + STATE ACTIVATE 1 + +COMMAND ADCS_SENSORPROC TEST_BUCK LITTLE_ENDIAN "Direct buck converter control" + # This must ALWAYS be the first entry in any command packet + <%= render "../../SYSTEM/cmd_tlm/_shared_cmd_header.txt", locals: { eid: 10, opc: 5 } %> + + APPEND_PARAMETER ENABLE 8 UINT 0 1 0 "Enable/disable" + STATE DISABLE 0 + STATE ENABLE 1 + +COMMAND ADCS_SENSORPROC TEST_GPS_SWITCH LITTLE_ENDIAN "Direct GPS switch control" + # This must ALWAYS be the first entry in any command packet + <%= render "../../SYSTEM/cmd_tlm/_shared_cmd_header.txt", locals: { eid: 10, opc: 6 } %> + + APPEND_PARAMETER ENABLE 8 UINT 0 1 0 "Enable/disable" + STATE DISABLE 0 + STATE ENABLE 1 HAZARDOUS "Warning! GPS will power on" diff --git a/COSMOS/flatsat/config/targets/ADCS_SENSORPROC/cmd_tlm/ss_tlm.txt b/COSMOS/flatsat/config/targets/ADCS_SENSORPROC/cmd_tlm/ss_tlm.txt index 00b1a2b..9032d86 100644 --- a/COSMOS/flatsat/config/targets/ADCS_SENSORPROC/cmd_tlm/ss_tlm.txt +++ b/COSMOS/flatsat/config/targets/ADCS_SENSORPROC/cmd_tlm/ss_tlm.txt @@ -138,16 +138,28 @@ TELEMETRY ADCS_SENSORPROC HWMONITOR BIG_ENDIAN "Hardware measurements" APPEND_ITEM TEMP 32 FLOAT "Temperature" LITTLE_ENDIAN UNITS Celcius C + APPEND_ITEM TEMP_S 8 UINT "Temperature status" LITTLE_ENDIAN + <%= render "_sp_states.txt" %> APPEND_ITEM ANTCUR 32 FLOAT "Antenna current" LITTLE_ENDIAN UNITS Amps A + APPEND_ITEM ANTCUR_S 8 UINT "Antenna current status" LITTLE_ENDIAN + <%= render "_sp_states.txt" %> APPEND_ITEM SUPVOLT 32 FLOAT "Supply voltage" LITTLE_ENDIAN UNITS Volts V + APPEND_ITEM SUPVOLT_S 8 UINT "Supply voltage status" LITTLE_ENDIAN + <%= render "_sp_states.txt" %> APPEND_ITEM ANTVOLT 32 FLOAT "Antenna voltage" LITTLE_ENDIAN UNITS Volts V + APPEND_ITEM ANTVOLT_S 8 UINT "Antenna voltage status" LITTLE_ENDIAN + <%= render "_sp_states.txt" %> APPEND_ITEM DIGCOREVOLT 32 FLOAT "Digital core voltage" LITTLE_ENDIAN UNITS Volts V + APPEND_ITEM DIGCOREVOLT_S 8 UINT "Digital core voltage status" LITTLE_ENDIAN + <%= render "_sp_states.txt" %> APPEND_ITEM TEMP2 32 FLOAT "Secondary temperature" LITTLE_ENDIAN UNITS Celcius C + APPEND_ITEM TEMP2_S 8 UINT "Secondary temp. status" LITTLE_ENDIAN + <%= render "_sp_states.txt" %> TELEMETRY ADCS_SENSORPROC SATVIS2 BIG_ENDIAN "Satellite visibility" # This must ALWAYS be the first entry in any telemetry packet diff --git a/COSMOS/flatsat/config/targets/ADCS_SENSORPROC/screens/manual_power.txt b/COSMOS/flatsat/config/targets/ADCS_SENSORPROC/screens/manual_power.txt new file mode 100644 index 0000000..04672e5 --- /dev/null +++ b/COSMOS/flatsat/config/targets/ADCS_SENSORPROC/screens/manual_power.txt @@ -0,0 +1,20 @@ +SCREEN AUTO AUTO 1.0 + + TITLE "Manual GPS Power" + + MATRIXBYCOLUMNS 4 + LABEL "Buck converter" + VALUE ADCS_SENSORPROC GPSPOWER BUCK + BUTTON "Disable" "cmd('ADCS_SENSORPROC TEST_BUCK with ENABLE 0')" + BUTTON "Enable" "cmd('ADCS_SENSORPROC TEST_BUCK with ENABLE 1')" + + LABEL "GPS switch" + VALUE ADCS_SENSORPROC GPSPOWER GPS + BUTTON "Disable" "cmd('ADCS_SENSORPROC TEST_GPS_SWITCH with ENABLE 0')" + BUTTON "Enable" "cmd('ADCS_SENSORPROC TEST_GPS_SWITCH with ENABLE 1')" + + LABEL "RESET pin" + VALUE ADCS_SENSORPROC GPSPOWER RESET + BUTTON "Activate" "cmd('ADCS_SENSORPROC TEST_RESET with ACTIVATE 0')" + BUTTON "Deactivate" "cmd('ADCS_SENSORPROC TEST_RESET with ACTIVATE 1')" + END diff --git a/COSMOS/flatsat/config/targets/ADCS_SENSORPROC/screens/pos.txt b/COSMOS/flatsat/config/targets/ADCS_SENSORPROC/screens/pos.txt deleted file mode 100644 index 3b146b7..0000000 --- a/COSMOS/flatsat/config/targets/ADCS_SENSORPROC/screens/pos.txt +++ /dev/null @@ -1,16 +0,0 @@ -SCREEN AUTO AUTO 1.0 - - TITLE "Position" - - VERTICALBOX - LABELVALUE ADCS_SENSORPROC POSVEL RECEIVED_TIMEFORMATTED WITH_UNITS 25 # COSMOS Received Time (Local time zone, Formatted string) - LABELVALUE ADCS_SENSORPROC POSVEL RECEIVED_COUNT # COSMOS packet received count - - HORIZONTALLINE - - BUTTON "Start display" 'require astro.rb; my_function(self)' - - CANVAS 1200 601 - CANVASIMAGE "map.jpg" 0 0 - END - END diff --git a/COSMOS/flatsat/config/targets/ADCS_SENSORPROC/screens/sensors.txt b/COSMOS/flatsat/config/targets/ADCS_SENSORPROC/screens/sensors.txt new file mode 100644 index 0000000..c32da9c --- /dev/null +++ b/COSMOS/flatsat/config/targets/ADCS_SENSORPROC/screens/sensors.txt @@ -0,0 +1,58 @@ +SCREEN AUTO AUTO 1.0 + + HORIZONTALBOX + + VERTICALBOX + SECTIONHEADER "GPS" + + VALUE ADCS_SENSORPROC POSVEL POS_STATUS + + HORIZONTALLINE + + SECTIONHEADER "Time" + LABELVALUE ADCS_SENSORPROC POSVEL WEEK + LABELVALUE ADCS_SENSORPROC POSVEL MS + + SECTIONHEADER "Position" + LABELVALUEDESC ADCS_SENSORPROC POSVEL POSX "X" + LABELVALUEDESC ADCS_SENSORPROC POSVEL POSY "Y" + LABELVALUEDESC ADCS_SENSORPROC POSVEL POSZ "Z" + + SECTIONHEADER "Velocity" + LABELVALUEDESC ADCS_SENSORPROC POSVEL VELX "X" + LABELVALUEDESC ADCS_SENSORPROC POSVEL VELY "Y" + LABELVALUEDESC ADCS_SENSORPROC POSVEL VELZ "Z" + END + + + VERTICALBOX + SECTIONHEADER "Sun sensor" + + LABELVALUEDESC ADCS_SENSORPROC SUNSENSOR STATUS + LABELFORMATVALUE ADCS_SENSORPROC SUNSENSOR ALPHA "%.2f" FORMATTED + LABELFORMATVALUE ADCS_SENSORPROC SUNSENSOR BETA "%.2f" FORMATTED + + CANVAS 241 241 + CANVASLABEL 120 20 "B 60" + CANVASLABEL 120 240 "B -60" + CANVASLABEL 0 120 "A -60" + CANVASLABEL 190 120 "A 60" + CANVASLINE 0 0 240 0 + CANVASLINE 240 0 240 240 + CANVASLINE 240 240 0 240 + CANVASLINE 0 240 0 0 + CANVASLINE 119 1 119 239 gray + CANVASLINE 1 119 239 119 gray + CANVASDOT 'tlm_variable("ADCS_SENSORPROC SUNSENSOR ALPHA", :RAW) * 2 + 120' 'tlm_variable("ADCS_SENSORPROC SUNSENSOR BETA", :RAW) * -2 + 120' red 5 + END + END + + + VERTICALBOX + SECTIONHEADER "Photodiodes" + LABELVALUE ADCS_SENSORPROC PHOTODIODE CENTER + LABELVALUE ADCS_SENSORPROC PHOTODIODE LEFT + LABELVALUE ADCS_SENSORPROC PHOTODIODE CENTER + END + + END diff --git a/COSMOS/flatsat/config/targets/ADCS_SENSORPROC/screens/status.txt b/COSMOS/flatsat/config/targets/ADCS_SENSORPROC/screens/status.txt index b7fdec7..0463dbb 100644 --- a/COSMOS/flatsat/config/targets/ADCS_SENSORPROC/screens/status.txt +++ b/COSMOS/flatsat/config/targets/ADCS_SENSORPROC/screens/status.txt @@ -2,8 +2,39 @@ SCREEN AUTO AUTO 1.0 TITLE "Status" -VERTICALBOX - SECTIONHEADER "Information" - LABELVALUE ADCS_SENSORPROC STATUS VALUE - LABELVALUE ADCS_SENSORPROC STATUS BOOL +SECTIONHEADER "Board" +LABELVALUE ADCS_SENSORPROC HEALTH OMS +LABELVALUE ADCS_SENSORPROC HEALTH RESETCOUNT +LABELVALUEDESC ADCS_SENSORPROC GPSPOWER STATE +BUTTON "Disable GPS" "cmd('ADCS_SENSORPROC GPS_ENABLE with ENABLE 0')" +BUTTON "Enable GPS" "cmd('ADCS_SENSORPROC GPS_ENABLE with ENABLE 1')" + +SECTIONHEADER "Receiver" +LABELVALUEDESC ADCS_SENSORPROC RXSTATUS ERROR +LABELVALUEDESC ADCS_SENSORPROC RXSTATUS STATUS +LABELVALUEDESC ADCS_SENSORPROC RXSTATUS AUX1 +LABELVALUEDESC ADCS_SENSORPROC RXSTATUS AUX2 +LABELVALUEDESC ADCS_SENSORPROC RXSTATUS AUX3 + +SECTIONHEADER "Hardware monitor" +LABELVALUEDESC ADCS_SENSORPROC HEALTH INTTEMP "MSP temp" + +MATRIXBYCOLUMNS 2 + LABELVALUEDESC ADCS_SENSORPROC HWMONITOR TEMP "GPS temp" + VALUE ADCS_SENSORPROC HWMONITOR TEMP_S + + LABELVALUEDESC ADCS_SENSORPROC HWMONITOR TEMP2 "GPS temp 2" + VALUE ADCS_SENSORPROC HWMONITOR TEMP2_S + + LABELVALUEDESC ADCS_SENSORPROC HWMONITOR SUPVOLT + VALUE ADCS_SENSORPROC HWMONITOR SUPVOLT_S + + LABELVALUEDESC ADCS_SENSORPROC HWMONITOR ANTCUR + VALUE ADCS_SENSORPROC HWMONITOR ANTCUR_S + + LABELVALUEDESC ADCS_SENSORPROC HWMONITOR ANTVOLT + VALUE ADCS_SENSORPROC HWMONITOR ANTVOLT_S + + LABELVALUEDESC ADCS_SENSORPROC HWMONITOR DIGCOREVOLT + VALUE ADCS_SENSORPROC HWMONITOR DIGCOREVOLT_S END diff --git a/COSMOS/flatsat/config/targets/ADCS_SENSORPROC/screens/sun_sensor.txt b/COSMOS/flatsat/config/targets/ADCS_SENSORPROC/screens/sun_sensor.txt deleted file mode 100644 index e19e84f..0000000 --- a/COSMOS/flatsat/config/targets/ADCS_SENSORPROC/screens/sun_sensor.txt +++ /dev/null @@ -1,28 +0,0 @@ -SCREEN AUTO AUTO 1.0 - - TITLE "Sun Sensor" - - VERTICALBOX - LABELVALUE ADCS_SENSORPROC SUNSENSOR RECEIVED_TIMEFORMATTED WITH_UNITS 25 # COSMOS Received Time (Local time zone, Formatted string) - LABELVALUE ADCS_SENSORPROC SUNSENSOR RECEIVED_COUNT # COSMOS packet received count - - HORIZONTALLINE - - LABELVALUEDESC ADCS_SENSORPROC SUNSENSOR STATUS - LABELFORMATVALUE ADCS_SENSORPROC SUNSENSOR ALPHA "%.2f" FORMATTED - LABELFORMATVALUE ADCS_SENSORPROC SUNSENSOR BETA "%.2f" FORMATTED - - CANVAS 241 241 - CANVASLABEL 120 20 "B 60" - CANVASLABEL 120 240 "B -60" - CANVASLABEL 0 120 "A -60" - CANVASLABEL 190 120 "A 60" - CANVASLINE 0 0 240 0 - CANVASLINE 240 0 240 240 - CANVASLINE 240 240 0 240 - CANVASLINE 0 240 0 0 - CANVASLINE 119 1 119 239 gray - CANVASLINE 1 119 239 119 gray - CANVASDOT 'tlm_variable("ADCS_SENSORPROC SUNSENSOR ALPHA", :RAW) * 2 + 120' 'tlm_variable("ADCS_SENSORPROC SUNSENSOR BETA", :RAW) * -2 + 120' red 5 - END - END