Coverage Predictions

From Maria GDK Wiki
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 RadioNet setting:

  • RadioNet.CoverageCalculationSettings

or as a general setting:

  • 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 for a Radio 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;
    }
}

Abort Coverage Calculations

Coverage calculations can be aborted for a specific job by RequestAbortCoverageDataJob(jobId),

or as a general abort request by RequestAbortCalculationJobsAsync()

Automatic Update

Changes to the Site or the Radio may invalidate the coverage data. This will apply to changes like:

  • Site position
  • PositionOffset of the Antenna
  • Frequency
  • Height of the Antenna

When such changes are detected, the current coverage data is invalidated. If a coverage plot for a Radio is visible, it will disappear if any of these properties are changes.

If RadioPlanSettings.AutomaticCoverageCalculation is true, a new coverage calculation will start automatically to create that valid coverage data. Progress can be detected by the RadioCoverage.CovDataUpdateProgress event.

When calculation is finsihed, the plot will reappear if it was visible before the invalidating change.

Other changes to a Radio that affects the coverage area will not cause invalidation of the coverage data, but will cause a rescale of the coverage area on-the-fly. Examples are:

  • TxPower
  • Loss
  • Antenna
  • Antenna Direction
  • Antenna Tilt