diff --git a/src/ISM.jl b/src/ISM.jl index 28a3ffe..41a1460 100644 --- a/src/ISM.jl +++ b/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 + """ diff --git a/src/types.jl b/src/types.jl index cf5cf5a..ff54902 100644 --- a/src/types.jl +++ b/src/types.jl @@ -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