Exemple #1
0
 def add_units(self, app_c_data, app_f_data):
     """ Populate spacecraft object with cf heaters
     
     Description: Iterates through thermal STIRS appendices to obtain cf heater properties (cmds, tlm, etc.), then
     populates spacecraft object cf heater list.
     Arguments: app_c_data -- Heaters. Dictionary of heater name:(dictionary of cmd/tlm id:cmd/tlm object)
                app_f_data -- Heater sfty relays. Dictionary of htr sfty rly name:(dictionary of cmd/tlm id:cmd/tlm object)
     """
     for htr_name in sorted(app_c_data.keys()):
         if 'Htr' in htr_name and 'Side' not in htr_name:
             htr = Components.Heater()
             htr.name = htr_name
             htr.cmds_pids = app_c_data[htr_name][0]
             htr.power_val = app_c_data[htr_name][1]
             # Standardize naming convention
             htr_name = IOUtils.adjust_htr_name(htr_name)
             if htr_name in self.dbase.carved_subbuses.keys():
                 htr.subbus = self.dbase.carved_subbuses[htr_name]
                 htr.tray = self.dbase.carved_prefixes[htr_name]
             else:
                 # See if not exact match, but simply 'contained in'
                 print_error = True
                 for htr_name_t in self.dbase.carved_subbuses.keys():
                     if re.search('^' + htr_name, htr_name_t):
                         htr.subbus = self.dbase.carved_subbuses[htr_name_t]
                         htr.tray = self.dbase.carved_prefixes[htr_name_t]
                         print_error = False
                         break
                 if print_error:
                     self.gui.output_text(
                         '    Warning - Subbus not associated for ' +
                         htr.name + '. Assuming LVC.')
                     htr.subbus = self.dbase.subbuses['LVC']
                     htr.tray = ''
             for sfty_rly_name in app_f_data.keys():
                 if re.search('^' + htr.name, sfty_rly_name):
                     htr.sfty_rly.name = sfty_rly_name
                     htr.sfty_rly.cmds_pids = app_f_data[sfty_rly_name]
                     break
             self.spacecraft.cf_heaters[htr.name] = htr
             if 'batt' not in htr_name.lower():
                 self._carve(htr.name)
Exemple #2
0
 def add_units(self, app_c_data, app_f_data):
     """ Populate spacecraft object with cf heaters
     
     Description: Iterates through thermal STIRS appendices to obtain cf heater properties (cmds, tlm, etc.), then
     populates spacecraft object cf heater list.
     Arguments: app_c_data -- Heaters. Dictionary of heater name:(dictionary of cmd/tlm id:cmd/tlm object)
                app_f_data -- Heater sfty relays. Dictionary of htr sfty rly name:(dictionary of cmd/tlm id:cmd/tlm object)
     """
     for htr_name in sorted(app_c_data.keys()):
         if 'Htr' in htr_name and 'Side' not in htr_name:
             htr = Components.Heater()
             htr.name = htr_name
             htr.cmds_pids = app_c_data[htr_name][0]
             htr.power_val = app_c_data[htr_name][1]
             # Standardize naming convention
             htr_name = IOUtils.adjust_htr_name(htr_name)
             if htr_name in self.dbase.carved_subbuses.keys():
                 htr.subbus = self.dbase.carved_subbuses[htr_name]
                 htr.tray = self.dbase.carved_prefixes[htr_name]
             else:
                 # See if not exact match, but simply 'contained in'
                 print_error = True
                 for htr_name_t in self.dbase.carved_subbuses.keys():
                     if re.search('^'+htr_name, htr_name_t):
                         htr.subbus = self.dbase.carved_subbuses[htr_name_t]
                         htr.tray = self.dbase.carved_prefixes[htr_name_t]
                         print_error = False
                         break
                 if print_error:
                     self.gui.output_text('    Warning - Subbus not associated for ' + htr.name + '. Assuming LVC.')
                     htr.subbus = self.dbase.subbuses['LVC']
                     htr.tray = ''
             for sfty_rly_name in app_f_data.keys():
                 if re.search('^'+htr.name,sfty_rly_name):
                     htr.sfty_rly.name = sfty_rly_name
                     htr.sfty_rly.cmds_pids = app_f_data[sfty_rly_name]
                     break
             self.spacecraft.cf_heaters[htr.name] = htr
             if 'batt' not in htr_name.lower():
                 self._carve(htr.name)