Module: ISO_1996::Part_2_2017
- Includes:
- Constants
- Defined in:
- lib/iso_1996/part_2_2017.rb
Overview
ISO 1996-2:2017 Acoustics - Description, measurement and assessment of environmental noise - Part 2: Determination of sound pressure levels
Module implementing calculations defined in ISO 1996-2:2017
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
72 73 74 |
# File 'lib/iso_1996/part_2_2017.rb', line 72 def self.atmospheric_absorption_correction(attenuation_coefficient, propagation_distance) attenuation_coefficient * propagation_distance end |
.background_noise_correction(l_total, l_background) ⇒ Float
Correction is not applied when ΔL ≥ 10 dB
Calculate background noise correction (K₁) as defined in Section 6.3 and Annex D
where @math \Delta L = L_\mathrm{total} - L_\mathrm{background}
51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/iso_1996/part_2_2017.rb', line 51 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
87 88 89 |
# File 'lib/iso_1996/part_2_2017.rb', line 87 def self.measurement_uncertainty(uncertainty_components) Math.sqrt(uncertainty_components.sum { |c| c ** 2 }) end |