Module: ISO_1996::Withdrawn::Part_1_2003
- Includes:
- Constants
- Defined in:
- lib/iso_1996/withdrawn/part_1_2003.rb
Overview
ISO 1996-1:2003 Basic Quantities and Assessment Procedures
Module implementing calculations defined in ISO 1996-1:2003: “Acoustics - Description, measurement and assessment of environmental noise - Part 1: Basic quantities and assessment procedures”
- Author
-
Maciej Ciemborowicz
- Date
-
July 11, 2025
Defined Under Namespace
Modules: Constants
Constant Summary
Constants included from Constants
Constants::REFERENCE_SOUND_PRESSURE, Constants::REFERENCE_TIME
Class Method Summary collapse
-
.a_weighted_sound_pressure_level(p_a, measurement_time: 1.0) ⇒ Float
Calculate A-weighted sound pressure level (L_A) as defined in Section 3.2.
-
.equivalent_continuous_sound_level(levels, measurement_time) ⇒ Float
Calculate equivalent continuous sound level (L_Aeq,T) as defined in Section 3.7.
-
.peak_sound_pressure_level(p_c_max) ⇒ Float
Calculate C-weighted peak sound pressure level (L_Cpeak) as defined in Section 3.10.
-
.sound_exposure_level(p_a) ⇒ Float
Calculate sound exposure level (L_AE) as defined in Section 3.9.
-
.sound_pressure_level(p) ⇒ Float
Calculate sound pressure level (L_p) as defined in Section 3.2.
Class Method Details
.a_weighted_sound_pressure_level(p_a, measurement_time: 1.0) ⇒ Float
Calculate A-weighted sound pressure level (L_A) as defined in Section 3.2
L_A = 10 * log10( (1/T) * ∫(p_A²(t)/p₀²) dt ) dB
59 60 61 |
# File 'lib/iso_1996/withdrawn/part_1_2003.rb', line 59 def self.a_weighted_sound_pressure_level(p_a, measurement_time: 1.0) 10 * Math.log10((1.0 / measurement_time) * (p_a ** 2) / (Constants::REFERENCE_SOUND_PRESSURE ** 2)) end |
.equivalent_continuous_sound_level(levels, measurement_time) ⇒ Float
Calculate equivalent continuous sound level (L_Aeq,T) as defined in Section 3.7
L_Aeq,T = 10 * log10( (1/T) * Σ(10^(0.1*L_i)) ) dB
Example:
levels = [65.0, 67.0, 63.0]
Basic.equivalent_continuous_sound_level(levels, 3.0) # => ~65.1 dB
88 89 90 91 92 93 94 95 |
# File 'lib/iso_1996/withdrawn/part_1_2003.rb', line 88 def self.equivalent_continuous_sound_level(levels, measurement_time) raise ArgumentError, "Measurement time must be positive" if measurement_time <= 0 return -Float::INFINITY if levels.empty? energy_sum = levels.sum { |l| 10 ** (l / 10.0) } 10 * Math.log10(energy_sum / measurement_time) end |
.peak_sound_pressure_level(p_c_max) ⇒ Float
Calculate C-weighted peak sound pressure level (L_Cpeak) as defined in Section 3.10
L_Cpeak = 20 * log10(p_Cmax / p₀) dB
105 106 107 |
# File 'lib/iso_1996/withdrawn/part_1_2003.rb', line 105 def self.peak_sound_pressure_level(p_c_max) 20 * Math.log10(p_c_max / Constants::REFERENCE_SOUND_PRESSURE) end |
.sound_exposure_level(p_a) ⇒ Float
Calculate sound exposure level (L_AE) as defined in Section 3.9
L_AE = 10 * log10( (1/t₀) * ∫(p_A²(t)/p₀²) dt ) dB
71 72 73 |
# File 'lib/iso_1996/withdrawn/part_1_2003.rb', line 71 def self.sound_exposure_level(p_a) 10 * Math.log10((1.0 / Constants::REFERENCE_TIME) * (p_a ** 2) / (Constants::REFERENCE_SOUND_PRESSURE ** 2)) end |
.sound_pressure_level(p) ⇒ Float
Calculate sound pressure level (L_p) as defined in Section 3.2
L_p = 10 * log10(p² / p₀²) dB
Example:
Basic.sound_pressure_level(0.1) # => 74.0 dB
46 47 48 |
# File 'lib/iso_1996/withdrawn/part_1_2003.rb', line 46 def self.sound_pressure_level(p) 10 * Math.log10((p ** 2) / (Constants::REFERENCE_SOUND_PRESSURE ** 2)) end |