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 Summary
Fields Modifier and Type Field Description Map<String,AttenuationParameters>
cnossosParametersPerPeriod
Define attenuation settings to apply for each periodstatic double
DEFAULT_GS
AttenuationParameters
defaultCnossosParameters
IfcnossosParametersPerPeriod
is empty, attenuation visitor will use this default settings and output empty periodMap<Integer,DirectivitySphere>
directionAttributes
Attenuation and other attributes relative to direction on sphereSet<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 periodMap<Long,Integer>
sourceEmissionAttenuation
Link between sources PK and DirectivitySphere specified in linked with directionAttributesMap<String,Integer>
sourceFieldNames
Cached source table fieldsMap<Long,Double>
sourceGs
Link between sources PK and gs ground factor of the source area-
Fields inherited from class org.noise_planet.noisemodelling.pathfinder.path.Scene
computeHorizontalDiffraction, computeVerticalDiffraction, DEFAULT_G, DEFAULT_G_BUILDING, DEFAULT_MAX_PROPAGATION_DISTANCE, DEFAULT_MAXIMUM_REF_DIST, DEFAULT_RECEIVER_DIST, defaultGroundAttenuation, DIRECTIVITY_DATABASE_FIELD, GS_DATABASE_FIELD, maxRefDist, maxSrcDist, PITCH_DATABASE_FIELD, profileBuilder, receivers, receiversPk, reflexionOrder, ROLL_DATABASE_FIELD, sourceGeometries, sourceOrientation, sourcesIndex, sourcesPk, YAW_DATABASE_FIELD
-
-
Constructor Summary
Constructors Constructor Description SceneWithAttenuation()
SceneWithAttenuation(ProfileBuilder profileBuilder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSource(Long pk, org.locationtech.jts.geom.Geometry geom, Double gs)
Add geometry with additional attributesvoid
addSource(Long pk, org.locationtech.jts.geom.Geometry geom, org.h2gis.utilities.SpatialResultSet rs)
Add geometry with additional attributesvoid
clearSources()
double[]
getSourceAttenuation(int srcIndex, double[] frequencies, double phi, double theta)
double
getSourceGs(int srcIndex)
Retrieves the ground speed of the noise source at the specified index.boolean
isOmnidirectional(int srcIndex)
Checks if the noise source at the specified index is omnidirectional.void
setDirectionAttributes(Map<Integer,DirectivitySphere> directionAttributes)
Sets the direction attributes for the receiver.-
Methods inherited from class org.noise_planet.noisemodelling.pathfinder.path.Scene
addReceiver, addReceiver, addReceiver, addSource, addSource, addSource, getReflexionOrder, isBodyBarrier, setBodyBarrier, setComputeHorizontalDiffraction, setComputeVerticalDiffraction, setDefaultGroundAttenuation, setReflexionOrder, setSources
-
-
-
-
Field Detail
-
DEFAULT_GS
public static final double DEFAULT_GS
- See Also:
- Constant Field Values
-
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
-
defaultCnossosParameters
public AttenuationParameters defaultCnossosParameters
IfcnossosParametersPerPeriod
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
-
-
Constructor Detail
-
SceneWithAttenuation
public SceneWithAttenuation(ProfileBuilder profileBuilder)
-
SceneWithAttenuation
public SceneWithAttenuation()
-
-
Method Detail
-
getSourceGs
public double getSourceGs(int srcIndex)
Retrieves the ground speed of the noise source at the specified index.- Parameters:
srcIndex
-- 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 identifiergeom
- Source geometrygs
- 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) throws SQLException
Add geometry with additional attributes- Parameters:
pk
- Unique source identifiergeom
- Source geometryrs
- 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 sourceGeometriesfrequencies
- Frequency in Hertzphi
- (0 2π) 0 is fronttheta
- (-π/2 π/2) 0 is horizontal π is top- Returns:
-
clearSources
public void clearSources()
- Overrides:
clearSources
in classScene
-
-