RadioPlan Settings: Difference between revisions

From Maria GDK Wiki
Jump to navigation Jump to search
Trm (talk | contribs)
mNo edit summary
Abh (talk | contribs)
Added RadioPlanClient Configuration
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Radio plan settings is available from '''[http://codedocs.maria.teleplanglobe.com/develop_gdk5/managed/class_t_p_g_1_1_g_d_k_1_1_common_core_1_1_radio_plan_1_1_settings_1_1_radio_plan_settings.html IMariaRadioPlanLayer.Settings]'''
Radio plan settings is available from '''[http://codedocs.maria.teleplanglobe.com/develop_gdk5/managed/class_t_p_g_1_1_g_d_k_1_1_common_core_1_1_radio_plan_1_1_settings_1_1_radio_plan_settings.html IMariaRadioPlanLayer.Settings]'''


=== Colour Schema Store ===
=== Color Schema Store ===
Colour schemas for different plots can be read and updated with '''IMariaRadioPlanLayer.Settings.ColourSchemaStore'''
Color schemas for different plots can be read and updated with '''IMariaRadioPlanLayer.Settings.ColorSchemaStore'''


Get the [http://codedocs.maria.teleplanglobe.com/develop_gdk5/managed/class_t_p_g_1_1_g_d_k_1_1_common_core_1_1_radio_plan_1_1_renderer_1_1_colour_schema_store.html ColourSchema] for a [http://codedocs.maria.teleplanglobe.com/develop_gdk5/managed/namespace_t_p_g_1_1_g_d_k_1_1_common_core_1_1_radio_plan_1_1_renderer.html#a5e6c89ccda280801a358a41beca7eafe PlotType]:<syntaxhighlight lang="c#">
Get the [http://codedocs.maria.teleplanglobe.com/develop_gdk5/managed/class_t_p_g_1_1_g_d_k_1_1_common_core_1_1_radio_plan_1_1_renderer_1_1_color_schema_store.html ColorSchema] for a [http://codedocs.maria.teleplanglobe.com/develop_gdk5/managed/namespace_t_p_g_1_1_g_d_k_1_1_common_core_1_1_radio_plan_1_1_renderer.html#a5e6c89ccda280801a358a41beca7eafe PlotType]:<syntaxhighlight lang="c#">
var colourSchema = Settings.ColourSchemaStore.GetRenderColourSchema(PlotType.SignalLevelDbm);
var colorSchema = Settings.ColorSchemaStore.GetRenderColorSchema(PlotType.SignalLevelDbm);
</syntaxhighlight>Replace the ColourSchema for a PlotType:<syntaxhighlight lang="c#">
</syntaxhighlight>Replace the ColorSchema for a PlotType:<syntaxhighlight lang="c#">
var newSchema = new RenderColourSchema(
var newSchema = new RenderColorSchema(
[
[
     new RenderColourSchemaItem(-105, Colors.Red, "weak coverage"),
     new RenderColorSchemaItem(-105, Colors.Red, "weak coverage"),
     new RenderColourSchemaItem(-80, Colors.Green, "good coverage"),
     new RenderColorSchemaItem(-80, Colors.Green, "good coverage"),
], CompareOperators.GreaterThan, "dBm", 100, -105);
], CompareOperators.GreaterThan, "dBm", 100, -105);


Settings.ColourSchemaStore.SetColorSchema(PlotType.SignalLevelDbm, newSchema);
Settings.ColorSchemaStore.SetColorSchema(PlotType.SignalLevelDbm, newSchema);
</syntaxhighlight>
</syntaxhighlight>


=== Coverage Calculation Settings ===
=== Coverage Calculation Settings ===
Coverage Calculation settings can be get/set from '''[http://codedocs.maria.teleplanglobe.com/develop_gdk5/managed/namespace_t_p_g_1_1_g_d_k_1_1_common_core_1_1_radio_plan_1_1_settings.html#a3b941e44aacfaeb4443c73d64050b96e IMariaRadioPlanLayer.Settings.CoverageCalculationSettings]:'''<syntaxhighlight lang="c#">
Coverage Calculation settings can be get/set from '''[http://codedocs.maria.teleplanglobe.com/develop_gdk5/managed/namespace_t_p_g_1_1_g_d_k_1_1_common_core_1_1_radio_plan_1_1_settings.html#a3b941e44aacfaeb4443c73d64050b96e IMariaRadioPlanLayer.Settings.CoverageCalculationSettings]:'''<syntaxhighlight lang="c#">
public record CoverageCalculationSettings(int Resolution, int Size, AreaShape CalculationAreaShape, string PropagationModel, RxHeight RxHeight);
public record CoverageCalculationSettings(int resolution, int size, AreaShape calculationAreaShape, string? propagationModel, RxHeight rxHeight, PartsOfCalculation partsToCalculate)
</syntaxhighlight>
</syntaxhighlight>
{| class="wikitable"
{| class="wikitable"
Line 45: Line 46:
|RxHeight
|RxHeight
|Receiver Antenna Height [m] and mode, Above Ground Level (AGL) or Above Sea Level (ASL)
|Receiver Antenna Height [m] and mode, Above Ground Level (AGL) or Above Sea Level (ASL)
|-
|SectorAngle
|d
|Sector angle [degrees]
|-
|PartsToCalculate
|PartsOfCalculation
|Control types of calculation to optimize speed and data size
|}
<syntaxhighlight lang="c#">
public record PartsOfCalculation(bool PathLoss, bool LineOfSight, bool FreeSightHeight);
</syntaxhighlight>
= RadioPlan Client Configuration =
This section describes what an external application must configure to use the Maria GDK RadioPlan API. The API uses a RadioPropagationService for calculations and an AntennaService for antenna types and radiation patterns.
<code>TPG.GDK.CommonCore.RadioPlan.Settings.RadioPlanConfiguration</code> is the configuration contract for the RadioPlan layer. The client can construct it directly or bind it from its own configuration system. <code>ClientServiceConfiguration.json</code> and the section named <code>RadioPlanConfiguration</code> are conventions used by MariaApplication, not files or names that the API loads automatically.
=== Configure the client ===
# Choose whether your host constructs <code>RadioPlanConfiguration</code> directly or binds it from configuration. If binding, load the configuration in your host and supply the resulting object to the API.
# Provide the model-repository location, both service addresses, and client storage paths described below.
# Replace the sample paths and service addresses for your environment. Use absolute paths and escape Windows backslashes in JSON.
# Ensure the model files are readable and the client data and prediction directories are writable by the application user.
# Create the required API components with these settings. Configuration changes do not automatically recreate an existing layer or its service clients; your host must manage reinitialization.
If your host uses JSON configuration, the following is an example section. Load and bind it explicitly; preserve unrelated settings when merging it into an existing top-level JSON object. The addresses describe a local deployment, not required service locations:
<code>{
  "RadioPlanConfiguration": {
    "ModelRepositorySettings": {
      "DirectoryPath": "C:\\ProgramData\\TeleplanGlobe\\MariaGDK\\RadioPlanning\\Models",
      "ModelListFileName": "models.lst"
    },
    "RadioPlanPathSettings": {
      "SendPropagationFilePathToServer": false,
      "PropagationFilePath": "C:\\ProgramData\\TeleplanGlobe\\MariaGDK\\RadioPlanning\\Predictions",
      "DataPath": "C:\\ProgramData\\TeleplanGlobe\\MariaGDK\\RadioPlanning"
    },
    "RadioPropagationServiceSettings": {
      "Uri": "<nowiki>https://localhost:5100</nowiki>"
    },
    "AntennaServiceSettings": {
      "Uri": "<nowiki>https://localhost:16089</nowiki>"
    }
  }
}</code>
=== Settings reference ===
Keys below are relative to <code>RadioPlanConfiguration</code>.
{| class="wikitable"
!Setting
!What to provide
|-
|<code>ModelRepositorySettings:DirectoryPath</code>
|Client-local directory containing the model list and its referenced model XML files. The client reads selected model XML and includes it in standard calculation requests.
|-
|<code>ModelRepositorySettings:ModelListFileName</code>
|Name of the model list inside <code>DirectoryPath</code>, normally <code>models.lst</code>. There is no configured default for these model-repository settings.
|-
|<code>RadioPlanPathSettings:DataPath</code>
|Writable client RadioPlan data directory. The coverage repository stores <code>coveragepredictions.sqlite</code> here. If omitted or null, defaults to <code>TeleplanGlobe\MariaGDK\RadioPlanning</code> under the operating system's common application-data directory (<code>ProgramData</code> on Windows).
|-
|<code>RadioPlanPathSettings:PropagationFilePath</code>
|Writable client destination for downloaded coverage files and temporary downloads. If omitted or null, defaults to <code>TeleplanGlobe\MariaGDK\RadioPlanning\Predictions</code> under common application data, independently of <code>DataPath</code>.
|-
|<code>RadioPlanPathSettings:SendPropagationFilePathToServer</code>
|Defaults to <code>false</code>. Controls whether standard (Radix) calculation jobs include the client prediction directory as <code>Job.Folder</code>. See coverage-file delivery below.
|-
|<code>RadioPropagationServiceSettings:Uri</code>
|Absolute gRPC base URI for RadioPropagationService, used for standard, groundwave, and skywave clients. Use the actual scheme, host, port, and any configured service-hosting prefix.
|-
|<code>AntennaServiceSettings:Uri</code>
|Absolute gRPC base URI for the client's antenna-type and radiation-pattern requests. Supply this setting: although the configuration record allows null, the current antenna client constructs a URI immediately and has no usable missing-address fallback.
|}
The RadioPlan layer reads these service URIs directly from <code>RadioPlanConfiguration</code>. MariaApplication's top-level <code>baseuri</code>, <code>binding</code>, and <code>endpoints</code> settings do not configure these two clients; do not use <code>[baseuri]</code> placeholders in their <code>Uri</code> values.
Changing only <code>DataPath</code> does not relocate <code>PropagationFilePath</code>. Set both when moving all client RadioPlan storage. Keep prediction files and their database records together when backing up or restoring client coverage data.
=== Coverage-file delivery in the RadioPlan layer ===
This section describes the layer's standard coverage workflow. Direct service-client users must implement the corresponding request and result handling in their own host.
==== Recommended: server-owned output (<code>false</code>) ====
With <code>SendPropagationFilePathToServer</code> set to <code>false</code>, standard jobs omit <code>Job.Folder</code>. The server manages its prediction output; the client's <code>PropagationFilePath</code> is the local download destination. The server does not need access to the client's local disk path for these jobs.
==== Shared output directory (<code>true</code>) ====
With the flag set to <code>true</code>, standard jobs send <code>PropagationFilePath</code> as <code>Job.Folder</code>. The server must be able to resolve and write that path using its own process identity. A client-local drive path is not automatically a shared directory when client and server run on different machines.
== Check the configuration and troubleshoot ==
After initializing your client (or reinitializing it with changed settings):
# Confirm that the model list is populated and the selected model XML can be read.
# Confirm that antenna types and the required antenna patterns can be loaded.
# Run a small coverage calculation and verify that progress completes and the result can be retrieved. With the RadioPlan layer, also verify that the prediction is saved under the client <code>PropagationFilePath</code> and coverage is displayed.
# For remote services, check their configured <code>/health</code> and <code>/ready</code> URLs as described in the service documentation. These checks do not replace a gRPC calculation/download test.
{| class="wikitable"
!Symptom
!Check
|-
|Host configuration cannot be loaded or bound
|The host's configuration source, section selection, binding, and required values; for JSON, also check file presence and syntax.
|-
|No propagation models or model-not-found error
|<code>DirectoryPath</code>, <code>ModelListFileName</code>, referenced XML files, read permissions, and selected model name.
|-
|Antenna initialization fails or antenna types/patterns are unavailable
|An explicit valid <code>AntennaServiceSettings:Uri</code>, network reachability, and antenna data. Also check the server's own AntennaService settings.
|-
|RPC unavailable or TLS failure
|Correct gRPC listener and path prefix, HTTP/2 proxy support, firewall, hostname matching, and certificate trust. <code>localhost</code> refers to the machine running the client.
|-
|Calculation completes but coverage is not loaded
|Empty or failed download, local directory permissions, available disk space, deserialization errors, or a job that was cancelled/replaced before publication.
|-
|Coverage is recalculated after changing receiver height
|The automatic cache lookup requires both the requested height and above-ground/above-sea reference datum; a prediction for a different height is not a valid hit.
|-
|Shared-folder calculation cannot write output
|Server-side path resolution and the service account's permissions; use server-owned output when a shared folder is not required.
|}
|}
Inspect your host's configured logs along with the service logs. A successfully constructed layer or service client does not prove that the endpoints are reachable; verify with actual service requests.
[[Category:RadioPlan]]
[[Category:RadioPlan]]

Latest revision as of 07:57, 3 November 2026

Radio plan settings is available from IMariaRadioPlanLayer.Settings

Color Schema Store

Color schemas for different plots can be read and updated with IMariaRadioPlanLayer.Settings.ColorSchemaStore

Get the ColorSchema for a PlotType:

var colorSchema = Settings.ColorSchemaStore.GetRenderColorSchema(PlotType.SignalLevelDbm);

Replace the ColorSchema for a PlotType:

var newSchema = new RenderColorSchema(
[
    new RenderColorSchemaItem(-105, Colors.Red, "weak coverage"),
    new RenderColorSchemaItem(-80, Colors.Green, "good coverage"),
], CompareOperators.GreaterThan, "dBm", 100, -105);

Settings.ColorSchemaStore.SetColorSchema(PlotType.SignalLevelDbm, newSchema);


Coverage Calculation Settings

Coverage Calculation settings can be get/set from IMariaRadioPlanLayer.Settings.CoverageCalculationSettings:

public record CoverageCalculationSettings(int resolution, int size, AreaShape calculationAreaShape, string? propagationModel, RxHeight rxHeight, PartsOfCalculation partsToCalculate)
Property Type Description
Resolution m Raster resolution in pixel size
Size m Size of calculation width (and height) for Rectangle, or diameter for Circle
CalculationAreaShape AreaShape Shape of calculation area, Circle or Rectangle
PropagationModel string Propagation model name
RxHeight RxHeight Receiver Antenna Height [m] and mode, Above Ground Level (AGL) or Above Sea Level (ASL)
SectorAngle d Sector angle [degrees]
PartsToCalculate PartsOfCalculation Control types of calculation to optimize speed and data size
public record PartsOfCalculation(bool PathLoss, bool LineOfSight, bool FreeSightHeight);

RadioPlan Client Configuration

This section describes what an external application must configure to use the Maria GDK RadioPlan API. The API uses a RadioPropagationService for calculations and an AntennaService for antenna types and radiation patterns.

TPG.GDK.CommonCore.RadioPlan.Settings.RadioPlanConfiguration is the configuration contract for the RadioPlan layer. The client can construct it directly or bind it from its own configuration system. ClientServiceConfiguration.json and the section named RadioPlanConfiguration are conventions used by MariaApplication, not files or names that the API loads automatically.

Configure the client

  1. Choose whether your host constructs RadioPlanConfiguration directly or binds it from configuration. If binding, load the configuration in your host and supply the resulting object to the API.
  2. Provide the model-repository location, both service addresses, and client storage paths described below.
  3. Replace the sample paths and service addresses for your environment. Use absolute paths and escape Windows backslashes in JSON.
  4. Ensure the model files are readable and the client data and prediction directories are writable by the application user.
  5. Create the required API components with these settings. Configuration changes do not automatically recreate an existing layer or its service clients; your host must manage reinitialization.

If your host uses JSON configuration, the following is an example section. Load and bind it explicitly; preserve unrelated settings when merging it into an existing top-level JSON object. The addresses describe a local deployment, not required service locations:

{
  "RadioPlanConfiguration": {
    "ModelRepositorySettings": {
      "DirectoryPath": "C:\\ProgramData\\TeleplanGlobe\\MariaGDK\\RadioPlanning\\Models",
      "ModelListFileName": "models.lst"
    },
    "RadioPlanPathSettings": {
      "SendPropagationFilePathToServer": false,
      "PropagationFilePath": "C:\\ProgramData\\TeleplanGlobe\\MariaGDK\\RadioPlanning\\Predictions",
      "DataPath": "C:\\ProgramData\\TeleplanGlobe\\MariaGDK\\RadioPlanning"
    },
    "RadioPropagationServiceSettings": {
      "Uri": "https://localhost:5100"
    },
    "AntennaServiceSettings": {
      "Uri": "https://localhost:16089"
    }
  }
}

Settings reference

Keys below are relative to RadioPlanConfiguration.

Setting What to provide
ModelRepositorySettings:DirectoryPath Client-local directory containing the model list and its referenced model XML files. The client reads selected model XML and includes it in standard calculation requests.
ModelRepositorySettings:ModelListFileName Name of the model list inside DirectoryPath, normally models.lst. There is no configured default for these model-repository settings.
RadioPlanPathSettings:DataPath Writable client RadioPlan data directory. The coverage repository stores coveragepredictions.sqlite here. If omitted or null, defaults to TeleplanGlobe\MariaGDK\RadioPlanning under the operating system's common application-data directory (ProgramData on Windows).
RadioPlanPathSettings:PropagationFilePath Writable client destination for downloaded coverage files and temporary downloads. If omitted or null, defaults to TeleplanGlobe\MariaGDK\RadioPlanning\Predictions under common application data, independently of DataPath.
RadioPlanPathSettings:SendPropagationFilePathToServer Defaults to false. Controls whether standard (Radix) calculation jobs include the client prediction directory as Job.Folder. See coverage-file delivery below.
RadioPropagationServiceSettings:Uri Absolute gRPC base URI for RadioPropagationService, used for standard, groundwave, and skywave clients. Use the actual scheme, host, port, and any configured service-hosting prefix.
AntennaServiceSettings:Uri Absolute gRPC base URI for the client's antenna-type and radiation-pattern requests. Supply this setting: although the configuration record allows null, the current antenna client constructs a URI immediately and has no usable missing-address fallback.

The RadioPlan layer reads these service URIs directly from RadioPlanConfiguration. MariaApplication's top-level baseuri, binding, and endpoints settings do not configure these two clients; do not use [baseuri] placeholders in their Uri values.

Changing only DataPath does not relocate PropagationFilePath. Set both when moving all client RadioPlan storage. Keep prediction files and their database records together when backing up or restoring client coverage data.

Coverage-file delivery in the RadioPlan layer

This section describes the layer's standard coverage workflow. Direct service-client users must implement the corresponding request and result handling in their own host.

Recommended: server-owned output (false)

With SendPropagationFilePathToServer set to false, standard jobs omit Job.Folder. The server manages its prediction output; the client's PropagationFilePath is the local download destination. The server does not need access to the client's local disk path for these jobs.

Shared output directory (true)

With the flag set to true, standard jobs send PropagationFilePath as Job.Folder. The server must be able to resolve and write that path using its own process identity. A client-local drive path is not automatically a shared directory when client and server run on different machines.

Check the configuration and troubleshoot

After initializing your client (or reinitializing it with changed settings):

  1. Confirm that the model list is populated and the selected model XML can be read.
  2. Confirm that antenna types and the required antenna patterns can be loaded.
  3. Run a small coverage calculation and verify that progress completes and the result can be retrieved. With the RadioPlan layer, also verify that the prediction is saved under the client PropagationFilePath and coverage is displayed.
  4. For remote services, check their configured /health and /ready URLs as described in the service documentation. These checks do not replace a gRPC calculation/download test.
Symptom Check
Host configuration cannot be loaded or bound The host's configuration source, section selection, binding, and required values; for JSON, also check file presence and syntax.
No propagation models or model-not-found error DirectoryPath, ModelListFileName, referenced XML files, read permissions, and selected model name.
Antenna initialization fails or antenna types/patterns are unavailable An explicit valid AntennaServiceSettings:Uri, network reachability, and antenna data. Also check the server's own AntennaService settings.
RPC unavailable or TLS failure Correct gRPC listener and path prefix, HTTP/2 proxy support, firewall, hostname matching, and certificate trust. localhost refers to the machine running the client.
Calculation completes but coverage is not loaded Empty or failed download, local directory permissions, available disk space, deserialization errors, or a job that was cancelled/replaced before publication.
Coverage is recalculated after changing receiver height The automatic cache lookup requires both the requested height and above-ground/above-sea reference datum; a prediction for a different height is not a valid hit.
Shared-folder calculation cannot write output Server-side path resolution and the service account's permissions; use server-owned output when a shared folder is not required.

Inspect your host's configured logs along with the service logs. A successfully constructed layer or service client does not prove that the endpoints are reachable; verify with actual service requests.