sot / kadi

Chandra commands and events
https://sot.github.io/kadi
BSD 3-Clause "New" or "Revised" License
5 stars 3 forks source link

State debug printing to console / logging? #276

Closed jeanconn closed 1 year ago

jeanconn commented 1 year ago

The perigee health plots are sending this email

         date             type     tlmsid  scs step      time      source    vcdu                     params                   
--------------------- ----------- -------- --- ---- ------------- -------- ------- --------------------------------------------
2023:044:17:27:23.442  COMMAND_SW AONMMODE 130  353 792696512.626 FEB1323A 4891823                    hex=8030402 msid=AONMMODE
2023:044:17:27:23.442    SIMTRANS     None 133  438 792696512.626 FEB1323A 4891823                                    pos=92904
2023:044:17:27:23.699  COMMAND_SW AONM2NPE 130  355 792696512.883 FEB1323A 4891824                    hex=8030601 msid=AONM2NPE
2023:044:17:27:27.799 MP_TARGQUAT AOUPTARQ 130  357 792696516.983 FEB1323A 4891840 cmds=8 q1=0.0391529771 q2=-0.458937853 q ...
2023:044:17:27:29.442  MP_STARCAT AOSTRCAT 130  366 792696518.626 FEB1323A 4891846 cmds=49 imnum1=0 yang1=0.004460022 zang1 ...
2023:044:17:27:33.693  COMMAND_SW AOMANUVR 130  417 792696522.877 FEB1323A 4891863                    hex=8034101 msid=AOMANUVR
2023:044:17:30:23.442    MP_OBSID COAOSQID 133  448 792696692.626 FEB1323A 4892525                              cmds=3 id=24407
2023:044:17:41:01.738    MP_OBSID COAOSQID   0    0 792697330.922  CMD_EVT      -1 event=Obsid event_date=2023:044:17:41:01 ...
2023:044:17:41:07.000  COMMAND_SW AONSMSAF   0    2 792697336.184  CMD_EVT      -1 event=Safe_mode event_date=2023:044:17:4 ...
2023:044:17:41:08.025    SIMTRANS     None   0   11 792697337.209  CMD_EVT      -1 event=Safe_mode event_date=2023:044:17:4 ...

I haven't tried to figure out just why this is getting triggered, but I note that just trying to get continuity is printing log_context_obs. it looks like that is set to print for a couple of different warning conditions but the warning isn't actually getting to console? Maybe this is due to the maneuver to nowhere in the command events sheet right now?

In [1]: from kadi.commands import states

In [3]: states.get_continuity("2023:044")
2023-02-15 09:06:19,023 log_context_obs: 
         date             type     tlmsid  scs step      time      source    vcdu                     params                   
--------------------- ----------- -------- --- ---- ------------- -------- ------- --------------------------------------------
2023:044:17:27:23.442  COMMAND_SW AONMMODE 130  353 792696512.626 FEB1323A 4891823                    hex=8030402 msid=AONMMODE
2023:044:17:27:23.442    SIMTRANS     None 133  438 792696512.626 FEB1323A 4891823                                    pos=92904
2023:044:17:27:23.699  COMMAND_SW AONM2NPE 130  355 792696512.883 FEB1323A 4891824                    hex=8030601 msid=AONM2NPE
2023:044:17:27:27.799 MP_TARGQUAT AOUPTARQ 130  357 792696516.983 FEB1323A 4891840 cmds=8 q1=0.0391529771 q2=-0.458937853 q ...
2023:044:17:27:29.442  MP_STARCAT AOSTRCAT 130  366 792696518.626 FEB1323A 4891846 cmds=49 imnum1=0 yang1=0.004460022 zang1 ...
2023:044:17:27:33.693  COMMAND_SW AOMANUVR 130  417 792696522.877 FEB1323A 4891863                    hex=8034101 msid=AOMANUVR
2023:044:17:30:23.442    MP_OBSID COAOSQID 133  448 792696692.626 FEB1323A 4892525                              cmds=3 id=24407
2023:044:17:41:01.738    MP_OBSID COAOSQID   0    0 792697330.922  CMD_EVT      -1 event=Obsid event_date=2023:044:17:41:01 ...
2023:044:17:41:07.000  COMMAND_SW AONSMSAF   0    2 792697336.184  CMD_EVT      -1 event=Safe_mode event_date=2023:044:17:4 ...
2023:044:17:41:08.025    SIMTRANS     None   0   11 792697337.209  CMD_EVT      -1 event=Safe_mode event_date=2023:044:17:4 ...