Class SceneWithAttenuation

java.lang.Object
org.noise_planet.noisemodelling.pathfinder.path.Scene
org.noise_planet.noisemodelling.propagation.SceneWithAttenuation
Direct Known Subclasses:
SceneWithEmission

public class SceneWithAttenuation extends Scene
Scene is used by ProfileBuilder to construct profiles with only taking account of geometry information. This scene is adding information about attenuation and source power
  • Field Details

    • DEFAULT_GS

      public static final double DEFAULT_GS
      See Also:
    • directionAttributes

      public Map<Integer, DirectivitySphere> directionAttributes
      Attenuation and other attributes relative to direction on sphere
    • sourceEmissionAttenuation

      public Map<Long,Integer> sourceEmissionAttenuation
      Link between sources PK and DirectivitySphere specified in linked with directionAttributes
    • sourceGs

      public Map<Long,Double> sourceGs
      Link between sources PK and gs ground factor of the source area
    • sourceHRail

      public Map<Long,Double> sourceHRail
      Link between sources PK and hRail (rail platform height). Used in body barrier calculation for train noise propagation.
    • sourceCref

      public Map<Long,Double> sourceCref
      Link between sources PK and Cref (vehicle body reflection coefficient). 0 = no body barrier (road sources or open freight), 1 = fully reflecting body. Used in body barrier calculation.
    • bodyBarrierMaxReflectionOrder

      public int bodyBarrierMaxReflectionOrder
      Maximum number of reflections between train body and barrier (body barrier interaction). Default is 3 as recommended by NMPB guide. Set to higher values (e.g. 10) for convergence studies.
    • HRAIL_DATABASE_FIELD

      public static final String HRAIL_DATABASE_FIELD
      See Also:
    • CREF_DATABASE_FIELD

      public static final String CREF_DATABASE_FIELD
      See Also:
    • defaultCnossosParameters

      public AttenuationParameters defaultCnossosParameters
      If cnossosParametersPerPeriod is empty, attenuation visitor will use this default settings and output empty period
    • cnossosParametersPerPeriod

      public Map<String, AttenuationParameters> cnossosParametersPerPeriod
      Define attenuation settings to apply for each period
    • periodSet

      public Set<String> periodSet
      Keep a known set of all periods of the simulation This set is used to output a default value when there is no sound source found for a specific period
  • Constructor Details

    • SceneWithAttenuation

      public SceneWithAttenuation(ProfileBuilder profileBuilder)
    • SceneWithAttenuation

      public SceneWithAttenuation()
  • Method Details

    • getSourceGs

      public double getSourceGs(int srcIndex)
      Retrieves the ground speed of the noise source at the specified index.
      Parameters:
      srcIndex - Source index
      Returns:
      the ground speed of the noise source at the specified index.
    • getSourceGs

      public double getSourceGs(long srcPrimaryKey)
      Retrieves the ground speed of the noise source at the specified index.
      Parameters:
      srcPrimaryKey - Source primary key
      Returns:
      the ground speed of the noise source at the specified index.
    • addSource

      public void addSource(Long pk, org.locationtech.jts.geom.Geometry geom, Double gs)
      Add geometry with additional attributes
      Parameters:
      pk - Unique source identifier
      geom - Source geometry
      gs - Additional attributes
    • setDirectionAttributes

      public void setDirectionAttributes(Map<Integer, DirectivitySphere> directionAttributes)
      Sets the direction attributes for the receiver.
      Parameters:
      directionAttributes -
    • addSource

      public void addSource(Long pk, org.locationtech.jts.geom.Geometry geom, org.h2gis.utilities.SpatialResultSet rs, Map<String,Integer> sourceFieldNames) throws SQLException
      Add geometry with additional attributes
      Parameters:
      pk - Unique source identifier
      geom - Source geometry
      rs - Additional attributes fetched from database
      Throws:
      SQLException
    • isOmnidirectional

      public boolean isOmnidirectional(int srcIndex)
      Checks if the noise source at the specified index is omnidirectional.
      Parameters:
      srcIndex - Source index in the list sourceGeometries
      Returns:
      True if the source is omnidirectional and so does not have orientation dependant attenuation, false otherwise.
    • getSourceAttenuation

      public double[] getSourceAttenuation(int srcIndex, double[] frequencies, double phi, double theta)
      Parameters:
      srcIndex - Source index in the list sourceGeometries
      frequencies - Frequency in Hertz
      phi - (0 2π) 0 is front
      theta - (-π/2 π/2) 0 is horizontal π is top
      Returns:
    • clearSources

      public void clearSources()
      Overrides:
      clearSources in class Scene