Skip to content
LIBRARY
Demux6.md

Demux6

Split a 6-element vector into six scalar outputs. Used in ControlledRotorCraft to expose the six elements of RotorCraft.y_pos ([alt, roll, pitch, yaw, forward, sideways]) as labelled scalar ports.

Usage

MultibodyComponents.Demux6()

Connectors

  • u_in - This connector represents a real signal as an input to a component (RealInput)

  • y1 - This connector represents a real signal as an output from a component (RealOutput)

  • y2 - This connector represents a real signal as an output from a component (RealOutput)

  • y3 - This connector represents a real signal as an output from a component (RealOutput)

  • y4 - This connector represents a real signal as an output from a component (RealOutput)

  • y5 - This connector represents a real signal as an output from a component (RealOutput)

  • y6 - This connector represents a real signal as an output from a component (RealOutput)

Behavior

Source

dyad
"""
Split a 6-element vector into six scalar outputs. Used in
`ControlledRotorCraft` to expose the six elements of `RotorCraft.y_pos`
([alt, roll, pitch, yaw, forward, sideways]) as labelled scalar ports.
"""
component Demux6
  "6-element input vector"
  u_in = [RealInput() for i in 1:6] {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -100, "y1": 450, "x2": 0, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 1 (= u_in[1]; semantically: altitude when used on y_pos)"
  y1 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 50, "x2": 1100, "y2": 150, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 2 (= u_in[2]; semantically: roll when used on y_pos)"
  y2 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 210, "x2": 1100, "y2": 310, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 3 (= u_in[3]; semantically: pitch when used on y_pos)"
  y3 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 370, "x2": 1100, "y2": 470, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 4 (= u_in[4]; semantically: yaw when used on y_pos)"
  y4 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 530, "x2": 1100, "y2": 630, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 5 (= u_in[5]; semantically: forward when used on y_pos)"
  y5 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 690, "x2": 1100, "y2": 790, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 6 (= u_in[6]; semantically: sideways when used on y_pos)"
  y6 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 850, "x2": 1100, "y2": 950, "rot": 0}
      },
      "tags": []
    }
  }
relations
  y1 = u_in[1]
  y2 = u_in[2]
  y3 = u_in[3]
  y4 = u_in[4]
  y5 = u_in[5]
  y6 = u_in[6]
end
Flattened Source
dyad
"""
Split a 6-element vector into six scalar outputs. Used in
`ControlledRotorCraft` to expose the six elements of `RotorCraft.y_pos`
([alt, roll, pitch, yaw, forward, sideways]) as labelled scalar ports.
"""
component Demux6
  "6-element input vector"
  u_in = [RealInput() for i in 1:6] {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -100, "y1": 450, "x2": 0, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 1 (= u_in[1]; semantically: altitude when used on y_pos)"
  y1 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 50, "x2": 1100, "y2": 150, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 2 (= u_in[2]; semantically: roll when used on y_pos)"
  y2 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 210, "x2": 1100, "y2": 310, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 3 (= u_in[3]; semantically: pitch when used on y_pos)"
  y3 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 370, "x2": 1100, "y2": 470, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 4 (= u_in[4]; semantically: yaw when used on y_pos)"
  y4 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 530, "x2": 1100, "y2": 630, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 5 (= u_in[5]; semantically: forward when used on y_pos)"
  y5 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 690, "x2": 1100, "y2": 790, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 6 (= u_in[6]; semantically: sideways when used on y_pos)"
  y6 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 850, "x2": 1100, "y2": 950, "rot": 0}
      },
      "tags": []
    }
  }
relations
  y1 = u_in[1]
  y2 = u_in[2]
  y3 = u_in[3]
  y4 = u_in[4]
  y5 = u_in[5]
  y6 = u_in[6]
metadata {}
end


Test Cases

No test cases defined.

  • Examples

  • Experiments

  • Analyses