parse_cm.csd.csd_cmd_gen#

parse_cm.csd.csd_cmd_gen(csd, *, date=None, fot_requests=None, csd_dir=None, debug=False, initial_globals=None, use_default_globals=False)#

Parse DOT or FOT request and return a table of commands.

If the input is a FOT request then the date should be supplied as the starting date of the commands (defaults to 2000:001).

Example:

>>> from parse_cm import csd
>>> fot_req = '''
... RTSLOAD,A_QUP,SCS_NUM=214,
... Q1=0.70546907,
... Q2=0.32988307,
... Q3=0.53440900
... '''
>>> cmds = csd.csd_cmd_gen(fot_req, date='2021:001')
>>> print(cmds)
         date             type     tlmsid  scs                         params
--------------------- ----------- -------- --- ------------------------------------------------------
2021:001:00:00:00.000 MP_TARGQUAT AOUPTARQ 214 Q1=0.70546907 Q2=0.32988307 Q3=0.534409 Q4=0.328477658
Parameters:
  • csd – str, Path Input file name or text of DOT/FOT request to generate commands.

  • date – str, optional Starting date of the commands for a FOT request.

  • fot_requests – list of str, optional Optional list of FOT requests which are prepended to a DOT

  • csd_dir – str, optional Directory to look for CSD files (with subdirs ATS/ and/or RTS/). If not set or the file is not found then fall back to OCCweb. This parameter is handy for testing or for locally modified CSD files.

  • debug – bool If True, print debugging information.

  • initial_globals – dict Dictionary of initial global symbols.

  • use_default_globals – bool If True, use default global symbols.

Returns:

CommandTable