new type: TxRxArray
This commit is contained in:
parent
416f5043b5
commit
ce569124d8
2 changed files with 17 additions and 1 deletions
10
src/ISM.jl
10
src/ISM.jl
|
@ -1,5 +1,15 @@
|
|||
export ISM
|
||||
|
||||
function ISM(
|
||||
array::TxRxArray,
|
||||
tx::TxRx,
|
||||
room::Room,
|
||||
config::ISMConfig;
|
||||
)
|
||||
Pn, o, B = array.p, array.origin, array.B
|
||||
[ISM(TxRx(B*p.position+o, B*p.B, p.directivity), tx, room, config) for p in Pn]
|
||||
end
|
||||
|
||||
|
||||
"""
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ export Omnidirectional,
|
|||
Hypercardioid,
|
||||
Bidirectional
|
||||
|
||||
export TxRx
|
||||
export TxRx, TxRxArray
|
||||
|
||||
export Room, RectangularRoom
|
||||
export RIRConfig, ISMConfig
|
||||
|
@ -40,6 +40,12 @@ function TxRx(position, B=SMatrix{3,3}(1.0I), d=Omnidirectional)
|
|||
TxRx(position |> SVector{3}, B, d)
|
||||
end
|
||||
|
||||
struct TxRxArray{T<:Real} <: AbstractTxRx
|
||||
p::Vector{<:TxRx{T}} # list of TxRxes in the local frame
|
||||
origin::SVector{3, T} # Position of the local origin in reference to the global origin
|
||||
B::SMatrix{3, 3, T} # Orientation of the array (local -> global)
|
||||
end
|
||||
|
||||
|
||||
abstract type Room end
|
||||
|
||||
|
|
Loading…
Reference in a new issue