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”

Author

Maciej Ciemborowicz

Date

July 11, 2025

Defined Under Namespace

Modules: Constants

Constant Summary

Constants included from Constants

Constants::BACKGROUND_CORRECTION_THRESHOLD, Constants::MIN_BACKGROUND_LEVEL_DIFFERENCE

Class Method Summary collapse

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

A_atm = α * d dB



67
68
69
# File 'lib/iso_1996/withdrawn/part_2_2007.rb', line 67

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

K₁ = -10 * log10(1 - 10^(-0.1 * ΔL)) dB where ΔL = L_total - L_background

Example:

EnvironmentalNoise.background_noise_correction(65, 60) # => 1.7 dB

Raises:

  • (ArgumentError)

    if ΔL ≤ 3 dB (measurement uncertain)



46
47
48
49
50
51
52
53
54
55
56
# File 'lib/iso_1996/withdrawn/part_2_2007.rb', line 46

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

u_total = √(Σ(u_i²)) dB

Example:

EnvironmentalNoise.measurement_uncertainty([0.5, 1.0, 0.7]) # => 1.28 dB


82
83
84
# File 'lib/iso_1996/withdrawn/part_2_2007.rb', line 82

def self.measurement_uncertainty(uncertainty_components)
  Math.sqrt(uncertainty_components.sum { |c| c ** 2 })
end