NASA-AMMOS / aerie

A software framework for modeling spacecraft.
https://nasa-ammos.github.io/aerie-docs/
MIT License
65 stars 17 forks source link

Support globals in the Sequencing EDSL #707

Open camargo opened 1 year ago

camargo commented 1 year ago

This should be done after https://github.com/NASA-AMMOS/aerie/issues/706 is complete, since #706 will flesh out the design as to how we will represent special values (i.e. locals, parameters) in the EDSL. Please see that issue first for a full explanation about what is going on here.

Users need to be able to specify global strings and output them as symbols in Seq JSON. Here is one proposal:

export default () =>
  Sequence.new({
    seqId: '',
    metadata: {},
    steps: [
      C.FSW_CMD_0({ arg0: globals.pressure  })
    ],
  });

The corresponding .seq.json:

{
  "id": "",
  "metadata": {},
  "steps": [
    {
      "args": [
        { "name": "arg0", "type": "symbol", "value": "pressure" },
      ],
      "stem": "FSW_CMD_0",
      "time": { "type": "COMMAND_COMPLETE" },
      "type": "command"
    }
  ]
}
dyst5422 commented 1 year ago

Should globals be defined at the mission level similar to how sequence metadata is defined at the mission level?