Coverage Predictions: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
(→) |
||
| Line 9: | Line 9: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Settings for Coverage calculation used is | Settings for Coverage calculation used is defined by | ||
<syntaxhighlight lang="c#"> | <syntaxhighlight lang="c#"> | ||
record | record CoverageCalculationSettings(int resolution, int size, AreaShape calculationAreaShape, string propagationModel, RxHeight rxHeight, PartsOfCalculation partsToCalculate) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
which is set either | |||
* RadioNet.CoverageCalculationSettings | |||
or | |||
* RadioPlanSettings.CoverageCalculationSettings | |||
Which one to use is controlled by RadioPlanSettings.CoverageCalculationSettingsSource | |||
Coverage calculation is started with | Coverage calculation is started with | ||
| Line 21: | Line 32: | ||
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#"> | |||
_radioPlanLayer.RadioCoverage.CovDataUpdateProgress += CoverageDataUpdateProgress; | _radioPlanLayer.RadioCoverage.CovDataUpdateProgress += CoverageDataUpdateProgress; | ||
| Line 39: | Line 48: | ||
} | } | ||
} | } | ||
</syntaxhighlight>The calculation can be aborted like this:<syntaxhighlight lang="cs"> | |||
_radioPlanLayer.RadioCoverage.RequestAbortCoverageDataJob(jobId); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:RadioPlan]] | [[Category:RadioPlan]] | ||
Revision as of 23:55, 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());
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);