LIBRARY
Demux4
Split a 4-element vector into four scalar outputs. Used inside RotorCraft to route the array-typed thrust-command input u to each thruster's scalar thrust input through a labelled port.
Usage
MultibodyComponents.Demux4()
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)
Behavior
Source
dyad
"""
Split a 4-element vector into four scalar outputs. Used inside `RotorCraft`
to route the array-typed thrust-command input `u` to each thruster's scalar
`thrust` input through a labelled port.
"""
component Demux4
"4-element input vector"
u_in = [RealInput() for i in 1:4] {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": -100, "y1": 450, "x2": 0, "y2": 550, "rot": 0}
},
"tags": []
}
}
"Scalar output 1 (= u_in[1])"
y1 = RealOutput() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 1000, "y1": 80, "x2": 1100, "y2": 180, "rot": 0}
},
"tags": []
}
}
"Scalar output 2 (= u_in[2])"
y2 = RealOutput() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 1000, "y1": 340, "x2": 1100, "y2": 440, "rot": 0}
},
"tags": []
}
}
"Scalar output 3 (= u_in[3])"
y3 = RealOutput() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 1000, "y1": 570, "x2": 1100, "y2": 670, "rot": 0}
},
"tags": []
}
}
"Scalar output 4 (= u_in[4])"
y4 = RealOutput() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 1000, "y1": 800, "x2": 1100, "y2": 900, "rot": 0}
},
"tags": []
}
}
relations
y1 = u_in[1]
y2 = u_in[2]
y3 = u_in[3]
y4 = u_in[4]
endFlattened Source
dyad
"""
Split a 4-element vector into four scalar outputs. Used inside `RotorCraft`
to route the array-typed thrust-command input `u` to each thruster's scalar
`thrust` input through a labelled port.
"""
component Demux4
"4-element input vector"
u_in = [RealInput() for i in 1:4] {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": -100, "y1": 450, "x2": 0, "y2": 550, "rot": 0}
},
"tags": []
}
}
"Scalar output 1 (= u_in[1])"
y1 = RealOutput() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 1000, "y1": 80, "x2": 1100, "y2": 180, "rot": 0}
},
"tags": []
}
}
"Scalar output 2 (= u_in[2])"
y2 = RealOutput() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 1000, "y1": 340, "x2": 1100, "y2": 440, "rot": 0}
},
"tags": []
}
}
"Scalar output 3 (= u_in[3])"
y3 = RealOutput() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 1000, "y1": 570, "x2": 1100, "y2": 670, "rot": 0}
},
"tags": []
}
}
"Scalar output 4 (= u_in[4])"
y4 = RealOutput() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 1000, "y1": 800, "x2": 1100, "y2": 900, "rot": 0}
},
"tags": []
}
}
relations
y1 = u_in[1]
y2 = u_in[2]
y3 = u_in[3]
y4 = u_in[4]
metadata {}
endTest Cases
No test cases defined.
Related
Examples
Experiments
Analyses