Skip to content

Commit

Permalink
Started new idea on prototyping sonar equation forms
Browse files Browse the repository at this point in the history
  • Loading branch information
kapple19 committed Aug 14, 2024
1 parent 6d93c1b commit 570171d
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions prototyping/sonar_equations.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
## Generic Form
abstract type EmissionType end

struct NoiseOnly <: EmissionType end
Expand Down Expand Up @@ -78,3 +79,26 @@ struct SonarEquation
new(SL, TL, TS, NL, RL, AG, SNR, DT, SE, POD)
end
end

## Equation Form
abstract type Sonar end

abstract type Passive <: Sonar end
abstract type Active <: Sonar end

abstract type Narrowband <: Passive end
abstract type Broadband <: Passive end
abstract type Intercept <: Passive end

abstract type CombinedInterference <: Active end
abstract type ReverberationLimited <: Active end
abstract type AmbientNoiseLimited <: Active end

sonar_equation(::Sonar) = (SL, PLa, PLb, TS, NL, RL, AG, DT) -> SL - PLa + Ts - PLb + ((NL - AG) RL) - DT
sonar_equation(::Passive) = (SL, PL, NL, AG, DT) -> SL - PL - NL + AG - DT
sonar_equation(::Narrowband) = () -> NaN
sonar_equation(::Broadband) = () -> NaN
sonar_equation(::Intercept) = () -> NaN
sonar_equation(::CombinedInterference) = () -> NaN
sonar_equation(::ReverberationLimited) = () -> NaN
sonar_equation(::AmbientNoiseLimited) = () -> NaN

0 comments on commit 570171d

Please sign in to comment.