These packages are available as a package collection, usable in Xcode or SwiftPM.
Swift package: estimate train horn sound pressure level vs distance (inverse-square, ISO 9613-1 absorption, IEC 61672-1 A-weighting)
1 package.