NASA-AMMOS / AIT-DSN

MIT License
19 stars 10 forks source link

Add DSN monitor data plugin #210

Closed nttoole closed 2 months ago

nttoole commented 3 months ago

Lunar Trailblazer (LTB) is using AIT and is curious about AIT adding support to display the DSN monitor data.

SunRise implemented a plugin that performs the processing of monitor data using the AMPCS monitor dictionary (monitor_channel.xml). They wrote a module to retrieve the '0158 Station Monitor Data' and re-encode into a JSON. While they use OpenMCT for spacecraft telemetry, they did not have the resources to implement station monitor data visualization for it. So instead, they use InfluxDB2's dashboards, which was sufficient for their needs.

While it is an 'AIT plugin', SunRISE’s adaptation of AIT has diverged significantly so there is no guarantee the monitor data plugin will work with the MGSS version of AIT. They project adaptation of AIT was not limited to extending functionality via plugins but involved major changes to AIT-Core and minor changes to AIT-DSN as well. (As such they do not have bandwidth to support a proper PR with MGSS AIT as it would involve additional testing, documentation, etc. Nevertheless they are happy to share their code and advise as needed.)

Some details about implementation: the module runs as an AIT plugin and the monitor data eventually makes its way into InfluxDB (Note: SunRISE uses InfluxDB v2.x whereas MGSS AIT uses InfluxDB v1.x – the interface between these two versions of InfluxDB are different and another example of where the two AITs diverge with breaking changes). This leaves a question of whether or not AIT should be updated to support InfluxDB2 as well, TBD until LTB's needs are better understood.

Reference to the DSN plugin: https://github.jpl.nasa.gov/SunRISE-Ops/SunRISE-AIT/blob/master/sunrise/dsn_monitor.py

Some additional notes from Scott Markham:

be aware that 0158-Monitor data comes from a different DSN service than the telemetry data flow. 0158-Monitor is sent out on either UDP or TCP from the DSN Special Function Gateway so Lunar TrailBlazer will need to have the DSN tables configured to send to Lunar TrailBlazer and they will need to be sure they have a path through JPL and Calltech firewalls for the data to reach their MSA – they may have already done this but if not they will have to.

Note: This was recorded in AIT-Core but might be better suited in AIT-DSN

nttoole commented 3 months ago

Spec?: https://archives.esac.esa.int/psa/ftp/MARS-EXPRESS/MRS/MEX-M-MRS-1-2-3-MCO-0026-V1.0/DOCUMENT/DSN_DOC/MON0158.PDF

nttoole commented 3 months ago

Examining the dsn_monitor code, there does not seem to be any depedency on SunRise's AIT extensions (once unused imports are removed). After some minor code refactoring (make 'monitor_channel.xml' location configurable; update some internals to be self-documenting, and adding docs), transferring the Plugin to the AIT-DSN should be relatively painless.

Rough estimate of one day to port over, including refactoring.