Module: ISO_1996::Withdrawn::Part_2_2007
- Includes:
- Constants
- Defined in:
- lib/iso_1996/withdrawn/part_2_2007.rb
Overview
ISO 1996-2:2007 Determination of Sound Pressure Levels
Module implementing calculations defined in ISO 1996-2:2007: “Acoustics - Description, measurement and assessment of environmental noise - Part 2: Determination of sound pressure levels”
Defined Under Namespace
Modules: Constants
Class Method Summary collapse
-
.atmospheric_absorption_correction(attenuation_coefficient, propagation_distance) ⇒ Float
Calculate atmospheric absorption correction (A_atm) as defined in Section 7.3 and Annex A.
-
.background_noise_correction(l_total, l_background) ⇒ Float
Calculate background noise correction (K₁) as defined in Section 6.3 and Annex D.
-
.measurement_uncertainty(uncertainty_components) ⇒ Float
Calculate combined measurement uncertainty as defined in Section 9.
Class Method Details
.atmospheric_absorption_correction(attenuation_coefficient, propagation_distance) ⇒ Float
Calculate atmospheric absorption correction (A_atm) as defined in Section 7.3 and Annex A
69 70 71 |
# File 'lib/iso_1996/withdrawn/part_2_2007.rb', line 69 def self.atmospheric_absorption_correction(attenuation_coefficient, propagation_distance) attenuation_coefficient * propagation_distance end |
.background_noise_correction(l_total, l_background) ⇒ Float
Calculate background noise correction (K₁) as defined in Section 6.3 and Annex D
where @math \Delta L = L_\mathrm{total} - L_\mathrm{background}
48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/iso_1996/withdrawn/part_2_2007.rb', line 48 def self.background_noise_correction(l_total, l_background) delta_l = l_total - l_background if delta_l <= Constants::MIN_BACKGROUND_LEVEL_DIFFERENCE raise ArgumentError, "Measurement uncertain: ΔL ≤ #{Constants::MIN_BACKGROUND_LEVEL_DIFFERENCE} dB" elsif delta_l >= Constants::BACKGROUND_CORRECTION_THRESHOLD 0.0 else -10 * Math.log10(1 - 10 ** (-0.1 * delta_l)) end end |
.measurement_uncertainty(uncertainty_components) ⇒ Float
Calculate combined measurement uncertainty as defined in Section 9
84 85 86 |
# File 'lib/iso_1996/withdrawn/part_2_2007.rb', line 84 def self.measurement_uncertainty(uncertainty_components) Math.sqrt(uncertainty_components.sum { |c| c ** 2 }) end |