Coverage Predictions: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
| Line 16: | Line 16: | ||
Coverage calculation is started with | Coverage calculation is started with | ||
<syntaxhighlight lang="c#"> | <syntaxhighlight lang="c#"> | ||
Result<Guid> jobId = await _radioPlanLayer.RadioCoverage.StartCoverageCalculationForRadioAsync(radio); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
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. | 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. | ||
<syntaxhighlight lang="c#"> | |||
The calculation can be aborted like this:<syntaxhighlight lang="cs"> | |||
_radioPlanLayer.RadioCoverage.RequestAbortCoverageDataJob(jobId); | |||
</syntaxhighlight><syntaxhighlight lang="c#"> | |||
_radioPlanLayer.RadioCoverage.CovDataUpdateProgress += CoverageDataUpdateProgress; | _radioPlanLayer.RadioCoverage.CovDataUpdateProgress += CoverageDataUpdateProgress; | ||
Revision as of 23:07, 16 May 2026
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());
Properties for the Coverage calculation are stored in
record CoverageProperties(int Resolution, int Size, AreaShape CalculationAreaShape, string PropagationModel, RxHeight RxHeight);
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.
The calculation can be aborted like this:
_radioPlanLayer.RadioCoverage.RequestAbortCoverageDataJob(jobId);
_radioPlanLayer.RadioCoverage.CovDataUpdateProgress += CoverageDataUpdateProgress;
...
private void CoverageDataUpdateProgress(object sender, CalculationJobStatus calculationJobStatus)
{
if (calculationJobStatus.IsCompleted)
{
ProgressValue = 0; // the clients progress indicator
}
else
{
ProgressValue = calculationJobStatus.TotalPercentCompleted;
}
}