; ; Mars Polar Lander startup file for SPICE's Inspekt utility program. ; by Boris Semenov, December 15, 1998. ; ; The following macros are defined in this startup file: ; ; SHOW_COMMANDS_OVER_TIME ; SHOW_COMMANDS_FOR_SUBSYSTEM ; SHOW_COMMANDS ; SHOW_COMMANDS_WITH_DESC ; SHOW_PARAMETER_VALUES ; SHOW_PARAMETER_LONG_VALUES ; SHOW_PARAMETERS_WITH_DESC ; COMMAND_DESCRIPTION ; PARAMETERS_DESCRIPTION ; SHOW_STATUS ; SHOW_STATUS_AT_TIME ; SHOW_NOTES ; SHOW_NOTES_OVER_TIME ; SHOW_ACTIVITIES ; SHOW_ACTIVITIES_OVER_TIME ; SHOW_ACTIVITY_ATTRIBUTE_VALUES ; SHOW_GR_EVENTS ; SHOW_GR_EVENTS_OVER_TIME ; SHOW_GR_EVENT_ATTRIBUTE_VALUES ; ;################################################################## ; ; Load data and ancillary files (interactive prompts for LSK and ; command dictionary are commented out.) ; load leapseconds LEAPSECONDS_FILE?; load ek COMMAND_DICTIONARY_FILE?; load ek SEQUENCE_EK_FILE?; ; set format tabular; set page width 132; ; ; Setups for command, status and dictionary tables. ; set default time format YYYY MON DD HR:MN:SC.###; ; ;################################################################## ; ; SET_WIDTH sets given column width. ; define set_width set column column_name? width width_?; ; ;################################################################## ; ; cmd_table contains name of the PEF data table. ; DICTIONARY_TABLE contains name of the command dictionary table. ; define cmd_table mpl_cmd; define act_table mpl_act; define gev_table mpl_gev; define status_table mpl_status; define note_table mpl_note; define dictionary_table mpl_commands; ; ;################################################################## ; ; SHOW_COMMANDS_OVER_TIME finds all commands in PEF table ; within provided time borders and displays ; them ordered by time. ; define show_commands_over_time select entry_id, time, command from cmd_table where parameter_index eq 0 and time between START_TIME? and END_TIME? order by time; define scot show_commands_over_time; ; ;################################################################## ; ; SHOW_COMMANDS_FOR_SUBSYSTEM find all command in PEF table for ; some subsystem defined in dictionary table ; and displays these commands in timely ordered. ; define show_commands_for_subsystem select a.entry_id, a.time, a.command from cmd_table a, dictionary_table b where a.parameter_index eq 0 and b.parameter_index eq 0 and a.command eq b.command and b.subsystem like SUBSYSTEM? order by a.time; define scfs show_commands_for_subsystem; ; ;################################################################## ; ; SHOW_COMMANDS finds all appearences of the particuar ; command in PEF table and displays them time ; ordered ; define show_commands select entry_id, time, command from cmd_table where parameter_index eq 0 and command like COMMAND_NAME? order by time; define sc show_commands; ; ;################################################################## ; ; SHOW_COMMANDS_WITH_DESC finds all appearences of the particuar ; command in PEF table and displays them time ; ordered. Also provides command descriptions ; for each of them. ; define show_commands_with_desc select a.entry_id, a.time, a.command, b.description from cmd_table a, dictionary_table b where a.parameter_index eq 0 and b.parameter_index eq 0 and a.command eq b.command and a.command like COMMAND_NAME? order by time; define scwd show_commands_with_desc; ; ;################################################################## ; ; SHOW_PARAMETER_VALUES displays index ordered values of all ; parameters for particular command record from ; PEF table. ; define show_parameter_values select time, command, parameter_name, chr_value from cmd_table where entry_id like ENTRY_ID? order by parameter_index; define spv show_parameter_values; ; ;################################################################## ; ; SHOW_PARAMETER_LONG_VALUES displays index ordered short and long ; values of all parameters for particular ; command record from PEF table. ; define show_parameter_long_values select time, command, parameter_name, chr_value, long_value from cmd_table where entry_id like ENTRY_ID? order by parameter_index; define splv show_all_parameter_values; ; ;################################################################## ; ; SHOW_PARAMETERS_WITH_DESC displays index ordered values ; of all parameters for particular command ; record from PEF table. The parameter ; descriptions from dictionary table displayed ; along with PEF data. ; define show_parameters_with_desc select a.command, a.parameter_name, a.chr_value, b.description from cmd_table a, dictionary_table b where a.entry_id like ENTRY_ID? and a.command eq b.command and a.parameter_name eq b.parameter_name order by a.parameter_index; define spwd show_parameters_with_desc; ; ;################################################################## ; ; COMMAND_DESCRIPTION displays command description from dictionary ; table. ; define command_description select command, description from dictionary_table where command like COMMAND? and parameter_index eq 0; define cd command_description; ; ;################################################################## ; ; PARAMETERS_DESCRIPTION displays parameter descriptions for ; particular command from dictionary table. ; define parameters_description select command, parameter_name, description from dictionary_table where command like COMMAND? order by parameter_index; define pd parameters_description; ; ;################################################################## ; ; SHOW_STATUS displays status of the particular subsystem ; through all time interval covered by PEF ; based data tables. ; define show_status select time, subsystem, parameter_name, chr_value from status_table where subsystem like SUBSYSTEM? order by subsystem, parameter_name, time; define ss show_status; ; ;################################################################## ; ; SHOW_STATUS_AT_TIME displays status of the particular subsystem ; through before given time. ; define show_status_at_time select time, subsystem, parameter_name, chr_value from status_table where subsystem like SUBSYSTEM? and time le TIME? order by subsystem, parameter_name, time; define ssat show_status_at_time; ; ;################################################################## ; ; SHOW_NOTES displays notes from the PEF file. ; define show_notes select time, chr_value from note_table where attribute_name eq 'NOTE_TEXT' order by time; define sn show_notes; ; ;################################################################## ; ; SHOW_NOTES_OVER_TIME displays notes from the PEF file ; within provided time borders and displays ; them ordered by time. ; define show_notes_over_time select time, chr_value from note_table where attribute_name eq 'NOTE_TEXT' and time between START_TIME? and END_TIME? order by time; define snot show_notes_over_time; ; ;################################################################## ; ; SHOW_ACTIVITIES finds all appearences of the particuar ; activity in PEF table and displays them time ; ordered ; define show_activities select entry_id, time, activity from act_table where attribute_index eq 0 and activity like ACTIVITY_NAME? order by time; define sa show_activities; ; ;################################################################## ; ; SHOW_ACTIVITIES_OVER_TIME finds all activities in PEF table ; within provided time borders and displays ; them ordered by time. ; define show_activities_over_time select entry_id, time, activity from act_table where attribute_index eq 0 and activity like ACTIVITY_NAME? and time between START_TIME? and END_TIME? order by time; define saot show_activities_over_time; ; ;################################################################## ; ; SHOW_ACTIVITY_ATTRIBUTE_VALUES displays index ordered values of all ; attributes for particular activity record from ; PEF table. ; define show_activity_attribute_values select time, activity, attribute_name, chr_value from act_table where entry_id like ENTRY_ID? order by attribute_index; define saav show_activity_attribute_values; ; ;################################################################## ; ; SHOW_GR_EVENTS finds all appearences of the particuar ; grount event in PEF table and displays them ; time ordered ; define show_gr_events select entry_id, time, ground_event, attribute_name, chr_value from gev_table where ( attribute_name eq 'TYPE' or attribute_name eq 'ANT' or attribute_name eq 'ORBIT_NO' ) and ground_event like GROUND_EVENT_NAME? order by time, entry_id, attribute_index; define sge show_gr_events; ; ;################################################################## ; ; SHOW_GR_EVENTS_OVER_TIME finds all ground events in PEF table ; within provided time borders and displays ; them ordered by time. ; define show_gr_events_over_time select entry_id, time, ground_event, attribute_name, chr_value from gev_table where ( attribute_name eq 'TYPE' or attribute_name eq 'ANT' or attribute_name eq 'ORBIT_NO' ) and ground_event like GROUND_EVENT_NAME? and time between START_TIME? and END_TIME? order by time, entry_id, attribute_index; define sgeot show_gr_events_over_time; ; ;################################################################## ; ; SHOW_GR_EVENT_ATTRIBUTE_VALUES displays index ordered values of all ; attributes for particular gr_event record from ; PEF table. ; define show_gr_event_attribute_values select time, ground_event, attribute_name, chr_value from gev_table where entry_id like ENTRY_ID? order by attribute_index; define sgeav show_gr_event_attribute_values; set column mpl_cmd.entry_id width 14; set column mpl_cmd.command width 20; set column mpl_cmd.parameter_name width 14; set column mpl_cmd.parameter_index width 8; set column mpl_cmd.value_flag width 8; set column mpl_cmd.chr_value width 16; set column mpl_cmd.dp_value width 8; set column mpl_cmd.int_value width 8; set column mpl_cmd.long_value width 22; ; set column mpl_status.entry_id width 14; set column mpl_status.subsystem width 20; set column mpl_status.parameter_name width 14; set column mpl_status.parameter_index width 8; set column mpl_status.value_flag width 8; set column mpl_status.chr_value width 16; set column mpl_status.dp_value width 8; set column mpl_status.int_value width 8; set column mpl_status.long_value width 22; ; set column mpl_note.entry_id width 14; set column mpl_note.attribute_name width 14; set column mpl_note.attribute_index width 8; set column mpl_note.chr_value width 42; set column mpl_note.long_value width 42; ; ; Setups for command dictionary table. ; set column mpl_commands.command width 20; set column mpl_commands.parameter_name width 14; set column mpl_commands.parameter_index width 8; set column mpl_commands.parameter_type width 16; set column mpl_commands.parameter_range width 20; set column mpl_commands.description width 40; ; ; Setups for activity and ground event data tables. ; set column mpl_act.entry_id width 14; set column mpl_act.activity width 20; set column mpl_act.attribute_name width 14; set column mpl_act.attribute_index width 8; set column mpl_act.value_flag width 8; set column mpl_act.chr_value width 16; set column mpl_act.dp_value width 8; set column mpl_act.int_value width 8; set column mpl_act.long_value width 22; ; set column mpl_gev.entry_id width 14; set column mpl_gev.ground_event width 20; set column mpl_gev.attribute_name width 14; set column mpl_gev.attribute_index width 8; set column mpl_gev.value_flag width 8; set column mpl_gev.chr_value width 16; set column mpl_gev.dp_value width 8; set column mpl_gev.int_value width 8; set column mpl_gev.long_value width 22; ;