Coverage Predictions

From Maria GDK Wiki
Revision as of 23:55, 16 May 2026 by Oaa (talk | contribs) ()
Jump to navigation Jump to search

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 RadioPlanSettings.CoverageCalculationSettingsSource


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 text string 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);