public class RainAttenuationModelItuRP838Version3 extends SignalPropagationModel
ITU-R P.838 version 3 rain attenuation model. This model uses the ITU-R P.838 rain attenuation model to compute the specific attenuation (dB/km) for the propagated signal due to rain, then determines the total attenuation by multiplying by the path length of the link.
The atmospheric conditions can be configured in two different ways. When using
RainHeight
(get
/ set
) and RainRate
(get
/ set
), the link is divided into two sub-segments:
the portion below the rain height, where the given rain rate applies, and the portion above the rain height, where no rain exists.
This geometric arrangement is simple to configure, but is best suited to geometries where the link is primarily vertical.
Alternatively, configure CustomLinkSubdivision
(get
/ set
), which determines how the link should be subdivided,
and CustomAtmosphericModel
(get
/ set
), which determines the rain rate at the midpoint of each sub-segment.
Sub-segments can be regularly or irregularly spaced. The rain rate is assumed constant over each sub-segment.
This configuration is more complex, but can represent geometries where the link is primarily horizontal
and the signal might pass through multiple distinct weather cells.
The tau angle, which is defined as the polarization tilt angle relative to the horizontal, is computed using the transmitted
signal's polarization axes and is measured using the surface normal computed at the grazing location of the propagation link.
If the transmitted signal does not contain a Polarization
instance, the value returned by the
DefaultTauAngle
(get
/ set
) property is used as the tau angle. If the transmitted signal contains an instance of
LeftHandCircularPolarization
or RightHandCircularPolarization
,
the tau angle defaults to 45 degrees per the P.838 recommendation.
Modifier | Constructor and Description |
---|---|
|
RainAttenuationModelItuRP838Version3()
Constructs version 3 of the ITU-R P.838 model
|
protected |
RainAttenuationModelItuRP838Version3(RainAttenuationModelItuRP838Version3 existingInstance,
CopyContext context)
Initializes a new instance as a copy of an existing instance.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkForSameDefinition(RainAttenuationModelItuRP838Version3 other)
Checks to determine if another instance has the same definition as this instance and
returns
true if it does. |
protected boolean |
checkForSameDefinition(SignalPropagationModel other)
Checks to determine if another instance has the same definition as this instance and
returns
true if it does. |
Object |
clone(CopyContext context)
Clones this object using the specified context.
|
protected int |
computeCurrentDefinitionHashCode()
Computes a hash code based on the current properties of this object.
|
void |
enumerateDependencies(DependencyEnumerator enumerator)
Enumerates the dependencies of this object by calling
DependencyEnumerator#enumerate(T) for each object that this object directly depends upon. |
CentralBody |
getCentralBody()
Gets the model's central body.
|
ItuRP838AtmosphericModel |
getCustomAtmosphericModel()
Gets or sets a custom atmospheric model to use when computing attenuation.
|
LinkSubdivision |
getCustomLinkSubdivision()
|
double |
getDefaultTauAngle()
Gets the default tau angle.
|
ScalarDependentOnServiceProvider |
getRainHeight()
Gets or sets a value for the rain height, in meters.
|
ScalarDependentOnServiceProvider |
getRainRate()
Gets or sets a custom value for the rain rate, in m/s.
|
SignalPropagator |
getSignalPropagator(EvaluatorGroup group,
IServiceProvider link)
Get a propagator which can propagate a set of input signals.
|
void |
setCustomAtmosphericModel(ItuRP838AtmosphericModel value)
Gets or sets a custom atmospheric model to use when computing attenuation.
|
void |
setCustomLinkSubdivision(LinkSubdivision value)
|
void |
setDefaultTauAngle(double value)
Sets the default tau angle.
|
void |
setRainHeight(ScalarDependentOnServiceProvider value)
Gets or sets a value for the rain height, in meters.
|
void |
setRainRate(ScalarDependentOnServiceProvider value)
Gets or sets a custom value for the rain rate, in m/s.
|
checkForSameDefinition
areSameDefinition, areSameDefinition, areSameDefinition, areSameDefinition, areSameDefinition, collectionItemsAreSameDefinition, collectionItemsAreSameDefinition, collectionItemsAreSameDefinition, dictionaryItemsAreSameDefinition, freeze, freezeAggregatedObjects, getCollectionHashCode, getCollectionHashCode, getCollectionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDictionaryHashCode, getIsFrozen, isSameDefinition, throwIfFrozen
public RainAttenuationModelItuRP838Version3()
protected RainAttenuationModelItuRP838Version3(@Nonnull RainAttenuationModelItuRP838Version3 existingInstance, @Nonnull CopyContext context)
See ICloneWithContext.clone(CopyContext)
for more information about how to implement this constructor
in a derived class.
existingInstance
- The existing instance to copy.context
- A CopyContext
that controls the depth of the copy.ArgumentNullException
- Thrown when existingInstance
or context
is null
.public Object clone(CopyContext context)
This method should be implemented to call a copy constructor on the class of the
object being cloned. The copy constructor should take the CopyContext
as a parameter
in addition to the existing instance to copy. The copy constructor should first call
CopyContext.addObjectMapping(T, T)
to identify the newly constructed instance
as a copy of the existing instance. It should then copy all fields, using
CopyContext.updateReference(T)
to copy any reference fields.
A typical implementation of ICloneWithContext
:
public static class MyClass implements ICloneWithContext {
public MyClass(MyClass existingInstance, CopyContext context) {
context.addObjectMapping(existingInstance, this);
someReference = context.updateReference(existingInstance.someReference);
}
@Override
public final Object clone(CopyContext context) {
return new MyClass(this, context);
}
private Object someReference;
}
In general, all fields that are reference types should be copied with a call to
CopyContext.updateReference(T)
. There are a couple of exceptions:
If one of these exceptions applies, the CopyContext
should be given an opportunity
to update the reference before the reference is copied explicitly. Use
CopyContext.updateReference(T)
to update the reference. If CopyContext.updateReference(T)
returns
the original object, indicating that the context does not have a replacement registered,
then copy the object manually by invoking a Clone method, a copy constructor, or by manually
constructing a new instance and copying the values.
alwaysCopy = context.updateReference(existingInstance.alwaysCopy);
if (existingInstance.alwaysCopy != null && alwaysCopy == existingInstance.alwaysCopy) {
alwaysCopy = (AlwaysCopy) existingInstance.alwaysCopy.clone(context);
}
If you are implementing an evaluator (a class that implements IEvaluator
), the
IEvaluator.updateEvaluatorReferences(agi.foundation.infrastructure.CopyContext)
method shares some responsibilities with the
copy context constructor. Code duplication can be avoided by doing the following:
CopyContext.updateReference(T)
. You should still call CopyContext.updateReference(T)
on any references to
non-evaluators.
IEvaluator.updateEvaluatorReferences(agi.foundation.infrastructure.CopyContext)
as the last line in the constructor and pass it the
same CopyContext
passed to the constructor.
IEvaluator.updateEvaluatorReferences(agi.foundation.infrastructure.CopyContext)
as normal. See the reference documentation for
IEvaluator.updateEvaluatorReferences(agi.foundation.infrastructure.CopyContext)
for more information on implementing that method.
public MyClass(MyClass existingInstance, CopyContext context) {
super(existingInstance, context);
someReference = context.updateReference(existingInstance.someReference);
evaluatorReference = existingInstance.evaluatorReference;
updateEvaluatorReferences(context);
}
@Override
public void updateEvaluatorReferences(CopyContext context) {
evaluatorReference = context.updateReference(evaluatorReference);
}
@Override
public Object clone(CopyContext context) {
return new MyClass(this, context);
}
private Object someReference;
private IEvaluator evaluatorReference;
clone
in interface ICloneWithContext
clone
in class DefinitionalObject
context
- The context to use to perform the copy.protected final boolean checkForSameDefinition(SignalPropagationModel other)
true
if it does. Derived classes MUST override this method and check
all new fields introduced by the derived class for definitional equivalence. It is NOT necessary
to check base class fields because the base class will already have done that. When overriding this method,
you should NOT call the base implementation because it will return false
for all derived-class instances.
Derived classes should check the type of other
to preserve the symmetric nature of IEquatableDefinition.isSameDefinition(java.lang.Object)
.checkForSameDefinition
in class SignalPropagationModel
other
- The other instance to compare to this one.true
if the two objects are defined equivalently; otherwise false
.protected boolean checkForSameDefinition(RainAttenuationModelItuRP838Version3 other)
true
if it does. Derived classes MUST override this method and check
all new fields introduced by the derived class for definitional equivalence. It is NOT necessary
to check base class fields because the base class will already have done that. When overriding this method,
you should NOT call the base implementation because it will return false
for all derived-class instances.
Derived classes should check the type of other
to preserve the symmetric nature of IEquatableDefinition.isSameDefinition(java.lang.Object)
.other
- The other instance to compare to this one.true
if the two objects are defined equivalently; otherwise false
.protected int computeCurrentDefinitionHashCode()
RainAttenuationModelItuRP838Version3.checkForSameDefinition(agi.foundation.communications.signalpropagation.SignalPropagationModel)
method.computeCurrentDefinitionHashCode
in class SignalPropagationModel
public void enumerateDependencies(DependencyEnumerator enumerator)
DependencyEnumerator#enumerate(T)
for each object that this object directly depends upon.
Derived classes which contain additional dependencies MUST override this method, call the base
implementation, and enumerate dependencies introduced by the derived class.enumerateDependencies
in interface IEnumerateDependencies
enumerateDependencies
in class DefinitionalObject
enumerator
- The enumerator that is informed of the dependencies of this object.@Nonnull public final CentralBody getCentralBody()
This property will always return the Earth CentralBody
(get
) returned from the
CentralBodiesFacet.getFromContext()
method and can not be overridden.
The ITU-R P.838 model is a model of the Earth's atmosphere.
public final LinkSubdivision getCustomLinkSubdivision()
Gets or sets a custom object which will be used to
subdivide the link into sub-segments, which will then define the sample locations
where the CustomAtmosphericModel
(get
/ set
) will be asked to obtain atmospheric data.
Atmospheric conditions are assumed constant over each sub-segment.
Note that this property is mutually exclusive with RainHeight
(get
/ set
)
and configuring this property will replace any configured RainHeight
(get
/ set
) value.
public final void setCustomLinkSubdivision(LinkSubdivision value)
Gets or sets a custom object which will be used to
subdivide the link into sub-segments, which will then define the sample locations
where the CustomAtmosphericModel
(get
/ set
) will be asked to obtain atmospheric data.
Atmospheric conditions are assumed constant over each sub-segment.
Note that this property is mutually exclusive with RainHeight
(get
/ set
)
and configuring this property will replace any configured RainHeight
(get
/ set
) value.
public final ScalarDependentOnServiceProvider getRainHeight()
Gets or sets a value for the rain height, in meters.
This scalar will be provided with a service provider providing ILinkService
.
Note that this property is mutually exclusive with CustomLinkSubdivision
(get
/ set
),
and this property cannot be used if a CustomLinkSubdivision
(get
/ set
) is configured.
During evaluation, a PropertyInvalidException
is thrown if the rain height is less than zero or greater than 20,000 meters.
IllegalStateException
- Thrown when a CustomLinkSubdivision
(get
/ set
) has been configured.public final void setRainHeight(ScalarDependentOnServiceProvider value)
Gets or sets a value for the rain height, in meters.
This scalar will be provided with a service provider providing ILinkService
.
Note that this property is mutually exclusive with CustomLinkSubdivision
(get
/ set
),
and this property cannot be used if a CustomLinkSubdivision
(get
/ set
) is configured.
During evaluation, a PropertyInvalidException
is thrown if the rain height is less than zero or greater than 20,000 meters.
IllegalStateException
- Thrown when a CustomLinkSubdivision
(get
/ set
) has been configured.public final ItuRP838AtmosphericModel getCustomAtmosphericModel()
Gets or sets a custom atmospheric model to use when computing attenuation.
Note that this property is mutually exclusive with RainRate
(get
/ set
)
and configuring this property will replace any configured RainRate
(get
/ set
) value.
During evaluation, a PropertyInvalidException
is thrown if the rain rate is less than zero or greater than 6.944e-5 m/s.
public final void setCustomAtmosphericModel(ItuRP838AtmosphericModel value)
Gets or sets a custom atmospheric model to use when computing attenuation.
Note that this property is mutually exclusive with RainRate
(get
/ set
)
and configuring this property will replace any configured RainRate
(get
/ set
) value.
During evaluation, a PropertyInvalidException
is thrown if the rain rate is less than zero or greater than 6.944e-5 m/s.
public final ScalarDependentOnServiceProvider getRainRate()
Gets or sets a custom value for the rain rate, in m/s.
This scalar will be provided with a service provider providing ILinkService
.
Note that this property is mutually exclusive with CustomAtmosphericModel
(get
/ set
),
and this property cannot be used if a CustomAtmosphericModel
(get
/ set
) is configured.
During evaluation, a PropertyInvalidException
is thrown if the rain rate is less than zero or greater than 6.944e-5 m/s.
IllegalStateException
- Thrown when a CustomAtmosphericModel
(get
/ set
) has been configured.public final void setRainRate(ScalarDependentOnServiceProvider value)
Gets or sets a custom value for the rain rate, in m/s.
This scalar will be provided with a service provider providing ILinkService
.
Note that this property is mutually exclusive with CustomAtmosphericModel
(get
/ set
),
and this property cannot be used if a CustomAtmosphericModel
(get
/ set
) is configured.
During evaluation, a PropertyInvalidException
is thrown if the rain rate is less than zero or greater than 6.944e-5 m/s.
IllegalStateException
- Thrown when a CustomAtmosphericModel
(get
/ set
) has been configured.public final double getDefaultTauAngle()
public final void setDefaultTauAngle(double value)
public SignalPropagator getSignalPropagator(EvaluatorGroup group, IServiceProvider link)
getSignalPropagator
in class SignalPropagationModel
group
- The evaluator group in which to create the evaluator.link
- The link over which to propagate the signals.ArgumentNullException
- Thrown when group
or link
is null
.IllegalStateException
- Thrown when neither CustomAtmosphericModel
(get
/ set
) nor RainRate
(get
/ set
) are configured,
or when neither CustomLinkSubdivision
(get
/ set
) nor RainHeight
(get
/ set
) are configured.ServiceNotAvailableException
- Thrown when link
does not provide ILinkService
,
or when the link transmitter does not provide ILocationPointService
or IOrientationAxesService
,
or when the link receiver does not provide ILocationPointService
,
or when CustomLinkSubdivision
(get
/ set
) does not provide ILinkSubdivisionService
.