Skip to content

Commit

Permalink
fix: bug fix for handling gains
Browse files Browse the repository at this point in the history
  • Loading branch information
mchitre committed Jun 20, 2024
1 parent 79554fa commit d939580
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sim.jl
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,11 @@ function transmit(sim::Simulation, node::Node, t, x)
rxnodes = filter(n -> n != node, sim.nodes)
rx = mapreduce(n -> [AcousticReceiver((n.pos .+ p)...) for p n.relpos], vcat, rxnodes)
arr = [arrivals(sim.model, tx1, rx1) for tx1 tx, rx1 rx]
sf = 10 ^ ((sim.txref + sim.ogain) / 20)
sf = 10 ^ ((sim.txref + node.ogain) / 20)
y = UnderwaterAcoustics.Recorder(nothing, tx, rx, arr)(sf * x; fs, reltime=false)
j = 1
sf = 10 ^ ((sim.rxref + sim.igain) / 20)
for node rxnodes
sf = 10 ^ ((sim.rxref + node.igain) / 20)
for tape node.tapes
push!(tape, t, sf * y[:,j])
j += 1
Expand Down

2 comments on commit d939580

@mchitre
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/109448

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.2.1 -m "<description of version>" d939580392b4a2203dab92c7478d1ff523eb7395
git push origin v0.2.1

Please sign in to comment.