Coverage Predictions
Calculate coverage
Coverage calculations are controlled by the interface IRadioCoverage in IMariaRadioPlanLayer.RadioCoverage
To create a coverage file, we need to define some parameters. The most important is the selection of propagation model.
The list of propagation models can be found like this:
_propagationModels = new ReadOnlyCollection<string>(_radioPlanLayer.RadioCoverage.RadioPropagationModelRepository.PropagationModels.Select(m => m.Name).ToList());
Settings for Coverage calculation used is defined by
record CoverageCalculationSettings(int resolution, int size, AreaShape calculationAreaShape, string propagationModel, RxHeight rxHeight, PartsOfCalculation partsToCalculate)
which is set either
- RadioNet.CoverageCalculationSettings
or
- RadioPlanSettings.CoverageCalculationSettings
Which one to use is controlled by enum RadioPlanSettings.CoverageCalculationSettingsSource
public enum CoverageCalculationSettingsSource
{
RadioPlanSettings, // As defined in radio plan layer Settings
RadioNet, // Use Coverage calculation settings from the radio's radio net if defined
}
Coverage calculation is started with
Result<Guid> jobId = await _radioPlanLayer.RadioCoverage.StartCoverageCalculationForRadioAsync(radio);
If successful, jobId returns a Guid to identify the job. Otherwise, the result returns an error message. Progress can be checked by subscribing to the event RadioCoverage.CovDataUpdateProgress.
_radioPlanLayer.RadioCoverage.CovDataUpdateProgress += CoverageDataUpdateProgress;
...
private void CoverageDataUpdateProgress(object sender, CalculationJobStatus calculationJobStatus)
{
if (calculationJobStatus.IsCompleted)
{
ProgressValue = 0; // the clients progress indicator
}
else
{
ProgressValue = calculationJobStatus.TotalPercentCompleted;
}
}
The calculation can be aborted like this:
_radioPlanLayer.RadioCoverage.RequestAbortCoverageDataJob(jobId);
Automatic update
Changes to radio may affect validity to coverage data. This may be changes like:
- site position of radio
- offset position of radio
- frequency
- height of antenna
When such changes are detected, the current coverage data is invalidated. If a coverage plot is rendered, it will disappear for radios affected of such changes.
if RadioPlanSettings.AutomaticCoverageCalculation is set, a new calculation of valid coverage data will start. Progress can be detected in the RadioCoverage.CovDataUpdateProgress event.
When calculation is finsihed, the plot will reappear if it was visible before the invalidating change.