guorbit / obc-model

Functional/Architectural Capella 6.0 model for the ASTRAEUS-01 spacecraft system and all its subsystems.
https://guorbit.github.io/obc-model/
12 stars 1 forks source link

"Dumb Comms" Refactoring of Commanded, OBC -Relayed and -Bypassing Mode Change #26

Closed chgio closed 1 year ago

chgio commented 1 year ago

This MR corrects the previous work elaborating the Mode Change Capability, in order to account for the widespread lack of user-programmable logic in COTS Communication Modules.

Conceptually, the main point is the shift of the logic expanding user-level commands into subsystem-level instruction packets from the Comms module to the G/S computer. Consequently, in order to avoid an excessive toll on the link (and, with it, timing too) budget, there is also a transition in the redundancy paradigm, from a "request and fulfill" pattern to an "observer-enforcer" approach.

Before

Note how the majority of the logic is allocated to the Comms module:

sequenceDiagram
    actor op as Operator
    participant gs as G/S
    participant comms as Comms
    participant obc as OBC
    participant other as Other S/S

    activate op

    op ->> gs       : mode change <br> command for S/C
    activate gs
    gs ->> comms    : uplink command
    activate comms
    comms ->> obc   : request relay
    activate obc

    alt OBC UP
        obc ->> other   : relay packets
        activate other
        obc ->> other   : 
        obc ->> other   : 
        other -->> obc  : full telemetry
        deactivate other
        obc -->> comms  : report telemetry
        deactivate obc
    else OBC DOWN
        comms ->> comms : expand into <br> S/S-specific packets
        comms ->> comms : 
        comms ->> comms : 
        comms ->> other : relay packets
        activate other
        comms ->> other : 
        comms ->> other : 
        other -->> comms: minimal telemetry
        deactivate other
    end

    comms -->> gs   : downlink telemetry
    deactivate comms
    gs -->> op      : display telemetry
    deactivate gs
    deactivate op

For more detail, check the CI docgen output for before the refactoring: Documentation-Before.zip

After

Note how the logic previously allocated to the Comms module has been shifted to the G/S:

sequenceDiagram
    actor op as Operator
    participant gs as G/S
    participant comms as Comms
    participant obc as OBC
    participant other as Other S/S

    activate op

    op ->> gs       : mode change <br> command for S/C
    activate gs
    gs ->> gs       : expand into <br> S/S-specific packet
    gs ->> gs       : 
    gs ->> gs       : 

    gs ->> comms    : uplink packet
    activate comms
    gs ->> comms    : 
    gs ->> comms    : 

    comms ->> other : dump packet
    activate other
    comms ->> other : 

    alt OBC UP
        comms ->> obc   : 
        activate obc
        obc ->> other   : observe response <br> / relay packets
        other -->> obc  : full telemetry
        deactivate other
        obc -->> comms  : report telemetry
        deactivate obc
    else OBC DOWN
        activate other
        other -->> comms: minimal telemetry
        deactivate other
    end
    comms -->> gs   : downlink telemetry
    deactivate comms
    gs -->> op      : display telemetry
    deactivate gs
    deactivate op

For more detail, check the CI docgen output for after the refactoring: Documentation-After.zip

chgio commented 1 year ago

This MR also includes the Finite State Automaton representation of the S/C System

However, that is awaiting review from our mentor, so any proposed changes would get implemented on this branch and bundled in this MR.

See #40 for all things FSM