Radio Propagation Service: Difference between revisions
No edit summary |
No edit summary |
||
| Line 111: | Line 111: | ||
For Maria service-hoster deployments, the release package should include <code>maria-service-manifest.json</code>. | For Maria service-hoster deployments, the release package should include <code>maria-service-manifest.json</code>. | ||
=== Deployment strategies === | |||
=== | Choose where the client application and radio plan services will run. All four options need access to map data, an AntennaService, and writable prediction-file storage. | ||
# '''Everything on one computer.''' Run the client and services locally. This is the simplest option for a workstation or test installation. | |||
#:[[File:Deploy.Scenario.1.png|thumb|none|300px|Client and services running on one computer]] | |||
# '''Services on a separate server.''' The client connects to the services over the network. Configure reachable service addresses and HTTPS certificates for the names the client uses. | |||
#:[[File:Deploy.Scenario.2.png|thumb|none|300px|Client connecting to services on a separate server]] | |||
# '''GDK service hoster.''' Install the services as hosted external processes. The hoster starts them and provides the configured proxy endpoints; setup details are below. | |||
#:[[File:Deploy.Scenario.3.png|thumb|none|300px|Services managed by the GDK service hoster]] | |||
# '''Containers.''' Run the services in containers, with persistent storage for prediction files and access to map and skywave data. Configure the container network or proxy so the client can reach the services. | |||
#:[[File:Deploy.Scenario.4.png|thumb|none|300px|Services running in containers]] | |||
==== Coverage files when the client and services are separate ==== | |||
RadioPropagationService stores generated coverage files in its prediction directory. Its SQLite database, <code>coveragepredictions.sqlite</code>, indexes those files so the service can find a matching prediction for a radio. '''The database is an index, not a replacement for the coverage files.''' | |||
When the client runs on another computer, give the service and client their own writable coverage-file storage. The client can call <code>GetCoveragePredictionFile</code> before requesting a new calculation: the service returns the existing file if it is indexed and still present, or <code>NotFound</code> if it is unavailable. The client can then request a calculation when needed. Downloaded files must also be available locally to the client for responsive GDK radio plan use; a path on the service's computer is not a client-local file. | |||
==== Setting up the GDK service hoster on Windows ==== | |||
The following is an '''example configuration''' for hosting both AntennaService and RadioPropagationService. Keep your existing settings and add or adjust the sections shown here; do not replace entire configuration files with these excerpts. | |||
'''1. Install the service packages.''' Place each complete release package, including its <code>maria-service-manifest.json</code>, in its own subfolder under: | |||
<pre> | |||
< | |||
C:\ProgramData\TeleplanGlobe\MariaServiceHoster\HostedExternalServices | C:\ProgramData\TeleplanGlobe\MariaServiceHoster\HostedExternalServices | ||
</code> | </pre> | ||
In this example, the subfolders are named <code>AntennaService</code> and <code>RadioPropagationService</code>. Their names must match the <code>RelativePath</code> entries below. | |||
'''2. Register the external processes.''' In the hoster's <code>appsettings.ExternalProcesses.Local.json</code>, configure the service folders and manifests: | |||
<pre> | <pre> | ||
{ | { | ||
| Line 156: | Line 163: | ||
</pre> | </pre> | ||
appSettings.Local.json | '''3. Configure endpoints and proxy paths.''' In the hoster's <code>appSettings.Local.json</code>, set the ports and routes it should provide: | ||
<pre> | <pre> | ||
{ | { | ||
| Line 163: | Line 171: | ||
"RadioPropagationServiceDisabled": false | "RadioPropagationServiceDisabled": false | ||
}, | }, | ||
"HostedServices": { | "HostedServices": { | ||
"AntennaService": { | "AntennaService": { | ||
| Line 189: | Line 196: | ||
</pre> | </pre> | ||
appSettings.ServiceSettings.Local.json | You can choose different <code>Endpoints</code>, <code>ProxyPath</code>, or <code>GrpcPostfix</code> values, but update the corresponding client and service addresses as well. Do not confuse a service's internal endpoint ports with the hoster's externally exposed proxy ports. | ||
'''4. Pass hosted-service settings.''' In the hoster's <code>appSettings.ServiceSettings.Local.json</code>, configure the settings passed to each process: | |||
<pre> | <pre> | ||
{ | { | ||
| Line 214: | Line 224: | ||
</pre> | </pre> | ||
'''5. Point RadioPropagationService at AntennaService.''' In the deployed RadioPropagationService <code>appsettings.json</code> or <code>appsettings.Production.json</code>, set the AntennaService addresses to the '''actual web and gRPC proxy URLs''' exposed by your hoster. For example, if it exposes them on ports 5110 and 5111: | |||
<pre> | <pre> | ||
{ | |||
"Services": { | "Services": { | ||
"MariaGdkDataFolder": "C:\\MariaGeoData", | "MariaGdkDataFolder": "C:\\MariaGeoData", | ||
"AntennaServiceAddressWeb": "http://localhost:5110/antservice_web/", | "AntennaServiceAddressWeb": "http://localhost:5110/antservice_web/", | ||
"AntennaServiceAddressGrpc": "http://localhost:5111/antservice_web_grpc" | "AntennaServiceAddressGrpc": "http://localhost:5111/antservice_web_grpc/" | ||
} | } | ||
} | |||
</pre> | </pre> | ||
Also configure RadioPropagationService's prediction directory and any required HTTPS certificate and skywave data as described elsewhere on this page. After starting the hoster, check the services through the '''URLs it actually exposes'''. If a service does not start or is not ready, check the hoster and service logs, manifest paths, proxy routes, and permissions on data directories. | |||
[[Category:RadioPlan]] | [[Category:RadioPlan]] | ||
Revision as of 12:34, 16 October 2026
Radio Propagation Service
RadioPropagationService is a .NET gRPC service for radio-propagation calculations. It provides direct profile and area predictions, HF groundwave using LFMF algorithms, HF skywave frequency scans and area coverage, and queued coverage-file calculations. Map data can come from local MariaGDK files or a GeoServer. Native dependencies include ITM for terrestrial calculations and the ITU-R P.533/P.372 reference engine for skywave predictions.
Installing and running the service
Before you start
Have these ready:
- A release package for your operating system and architecture. Keep the entire extracted folder, including configuration files and native libraries.
- Access to map data: a local MariaGDK data folder (preferred for performance) or a reachable GeoServer.
- The web and gRPC addresses of a reachable AntennaService. These can be different addresses.
- A writable location for prediction files and logs.
- An HTTPS certificate for the hostname clients will use, unless a trusted proxy terminates TLS.
- For HF skywave predictions, separately obtained ITU ionospheric and radio-noise data (about 135 MB). This data is not included in a release.
Install and configure
- Extract the whole release package to its intended application directory.
- Open
appsettings.jsonand, if present,appsettings.Production.jsonin the extracted folder. The Production file overrides the shared file when the environment is Production. Replace the sample machine paths, ports, and service addresses. Do not use the sample Development settings on a deployed service. - Choose a map source, configure both AntennaService addresses, and set an output directory. Use the settings reference below.
- Configure the listening addresses and HTTPS certificate as described below. The bundled Production example is for local development, not a public deployment.
- If you need skywave predictions, provide the separate ITU data files and configure their directory.
- Start the executable
TPG.RadioPropagationService.Api.exe(or use your normal Windows service/service-hoster deployment), then check/healthand/ready.
For a console start on Windows, open PowerShell in the extracted application folder and run:
.\TPG.RadioPropagationService.Api.exe
If you install it as a Windows service, ensure its service account has access to the application files, certificate private key, map data, ITU data, and writable prediction and log directories. Environment-variable settings must be available to the service process, not just your interactive terminal.
Settings reference
These are the settings most installations need to review. The paths and URLs shipped in the sample files are examples, not values to use unchanged.
| Setting | What to provide |
|---|---|
Services:MariaGdkDataFolder |
Local MariaGDK map-data directory. Used when GeoServerAddress is unset.
|
Services:GeoServerAddress |
Optional GeoServer URL; if set, selects GeoServer instead of local map files. Remote raster fetching is generally slower. |
Services:AntennaServiceAddressGrpc |
AntennaService gRPC address for antenna-pattern requests. |
Services:AntennaServiceAddressWeb |
AntennaService web base address used for its /health and /ready checks.
|
RadioPropagationSettings:PredictionFilesDirectory |
Writable directory for predictions and coveragepredictions.sqlite. Preserve and back up this directory when upgrading.
|
RadioPropagationSettings:Skywave:DataDirectory |
Directory containing the separate ITU data files; see "Skywave data" below. |
Kestrel:EndPoints |
HTTP/HTTPS listening URLs and the HTTPS endpoint certificate; see "HTTPS certificates" below. |
Serilog:WriteTo |
Console/file logging. Change the sample file-log path if needed and ensure it is writable. |
MaxReceiveMessageSize |
Maximum incoming gRPC message size in bytes; the shared sample uses 8 MiB (8388608).
|
Settings:PathBase |
Optional URL prefix supplied by a service hoster. Health URLs then become <path-base>/health and <path-base>/ready.
|
Other RadioPropagationSettings values control the calculation workload and output: NumberOfThreads (nonpositive selects available cores, capped at six for terrestrial calculations), MaxPixelCount, cache size and expiration, CircularPredictionArea, PathLossThreshold, Precision, ParentTileZoomLevels, GeneratePngTiles, CoverageFileVersion, and groundwave ReverseSubsample (at least 1). The sample uses coverage-file version v13; choose a version supported by your clients.
RadioPropagationSettings:TimedConsumeCoverageCalculationServiceSettings:LoopWaitTime is the background job polling interval in milliseconds and must be positive. Geopackage selects GeoPackage output. AllowedHosts controls accepted host names; the shared sample permits all hosts. The sample ErrorUrl is present but is not a substitute for checking startup logs.
Configuration keys can be overridden through environment variables by replacing : with __; for example, Services__AntennaServiceAddressGrpc. Use a protected deployment secret mechanism for passwords rather than storing them in appsettings files.
HTTPS certificates
The sample appsettings.Production.json listens on localhost and selects a localhost certificate from the Windows LocalMachine store with AllowInvalid: true. Replace this for deployment. Use a valid certificate matching the hostname clients connect to, remove AllowInvalid, and ensure clients trust its issuing CA. localhost-only listeners are not reachable from other machines.
For a PFX certificate, replace the HTTPS endpoint's Certificate section in the deployed Production configuration (do not merely add a path to the shared file while the Production certificate settings remain). For example:
{
"Kestrel": {
"EndPoints": {
"Http": { "Url": "http://localhost:26080" },
"Https": {
"Url": "https://rps.example.com:26443",
"Certificate": { "Path": "C:\\certs\\rps.pfx" }
}
}
}
}
Configure ASPNETCORE_Kestrel__EndPoints__Https__Certificate__Password using your deployment's protected secret mechanism in the service process environment. Do not put the password, PFX, or private key in source control or a release archive. The service account needs permission to read the PFX.
Alternatively, select a certificate already installed in the Windows LocalMachine certificate store:
"Certificate": {
"Subject": "rps.example.com",
"Location": "LocalMachine"
}
Ensure the certificate has a private key accessible to the service account. If a reverse proxy terminates TLS instead, configure the proxy certificate and maintain gRPC-compatible HTTP/2 connectivity between the client and service. Do not disable certificate validation on clients. The ASP.NET Core development certificate is for local testing, not a deployed service.
Skywave data
HF skywave calculations use ITU-R P.533/P.372 data files, which are not included with the binaries. Obtain the required maps and radio-noise files separately from the ITU-R Study Group 3 sources, place them in a readable directory, and set RadioPropagationSettings:Skywave:DataDirectory to its path. Missing files are reported when first used.
Check the service and upgrade safely
Visit https://rps.example.com:26443/health and https://rps.example.com:26443/ready, substituting your configured host and port. Add the configured path base if your service hoster supplies one. /health checks the service and dependencies; /ready checks downstream readiness. Calculations require a gRPC client; visiting / is not a calculation test.
If startup or readiness fails, check the console or configured Serilog file for details. Common causes include an unreadable certificate or private key, a hostname or CA trust mismatch, missing map or ITU data, a wrong AntennaService address, or an unwritable prediction or log directory.
Before installing an updated release, back up the persistent prediction directory (including coveragepredictions.sqlite) and your environment-specific settings. Replace the application package as a whole, not individual binaries, and keep secrets outside the package.
For Maria service-hoster deployments, the release package should include maria-service-manifest.json.
Deployment strategies
Choose where the client application and radio plan services will run. All four options need access to map data, an AntennaService, and writable prediction-file storage.
- Everything on one computer. Run the client and services locally. This is the simplest option for a workstation or test installation.
- Services on a separate server. The client connects to the services over the network. Configure reachable service addresses and HTTPS certificates for the names the client uses.
- GDK service hoster. Install the services as hosted external processes. The hoster starts them and provides the configured proxy endpoints; setup details are below.
- Containers. Run the services in containers, with persistent storage for prediction files and access to map and skywave data. Configure the container network or proxy so the client can reach the services.
Coverage files when the client and services are separate
RadioPropagationService stores generated coverage files in its prediction directory. Its SQLite database, coveragepredictions.sqlite, indexes those files so the service can find a matching prediction for a radio. The database is an index, not a replacement for the coverage files.
When the client runs on another computer, give the service and client their own writable coverage-file storage. The client can call GetCoveragePredictionFile before requesting a new calculation: the service returns the existing file if it is indexed and still present, or NotFound if it is unavailable. The client can then request a calculation when needed. Downloaded files must also be available locally to the client for responsive GDK radio plan use; a path on the service's computer is not a client-local file.
Setting up the GDK service hoster on Windows
The following is an example configuration for hosting both AntennaService and RadioPropagationService. Keep your existing settings and add or adjust the sections shown here; do not replace entire configuration files with these excerpts.
1. Install the service packages. Place each complete release package, including its maria-service-manifest.json, in its own subfolder under:
C:\ProgramData\TeleplanGlobe\MariaServiceHoster\HostedExternalServices
In this example, the subfolders are named AntennaService and RadioPropagationService. Their names must match the RelativePath entries below.
2. Register the external processes. In the hoster's appsettings.ExternalProcesses.Local.json, configure the service folders and manifests:
{
"HostedExternalProcesses": {
"Services": {
"AntennaService": {
"RelativePath": "AntennaService",
"Manifest": "maria-service-manifest.json",
"HostedService": "AntennaService"
},
"RadioPropagationService": {
"RelativePath": "RadioPropagationService",
"Manifest": "maria-service-manifest.json",
"HostedService": "RadioPropagationService"
}
}
}
}
3. Configure endpoints and proxy paths. In the hoster's appSettings.Local.json, set the ports and routes it should provide:
{
"GlobalDefinitions": {
"AntennaServiceDisabled": false,
"RadioPropagationServiceDisabled": false
},
"HostedServices": {
"AntennaService": {
"ExecutionMode": "Process",
"EndpointHandling": "AutoEndpoints",
"AutoEndpoints": {
"Endpoints": [ "Http:28081", "Grpc:28080" ],
"AutoProxy": true,
"ProxyPath": "/antservice_web",
"GrpcPostfix": "_grpc"
}
},
"RadioPropagationService": {
"ExecutionMode": "Process",
"EndpointHandling": "AutoEndpoints",
"AutoEndpoints": {
"Endpoints": [ "Http:25081", "Grpc:25080" ],
"AutoProxy": true,
"ProxyPath": "/rpsservice_web",
"GrpcPostfix": "_grpc"
}
}
}
}
You can choose different Endpoints, ProxyPath, or GrpcPostfix values, but update the corresponding client and service addresses as well. Do not confuse a service's internal endpoint ports with the hoster's externally exposed proxy ports.
4. Pass hosted-service settings. In the hoster's appSettings.ServiceSettings.Local.json, configure the settings passed to each process:
{
"HostedServices": {
"AntennaService": {
"Settings": {
"KestrelCertificateHandling": "[KestrelCertificateHandling]",
"UseSwagger": false,
"Disabled": "[AntennaServiceDisabled]",
"PathBase": "/antennaservice",
"service_tag": "antennaservice"
}
},
"RadioPropagationService": {
"Settings": {
"KestrelCertificateHandling": "[KestrelCertificateHandling]",
"UseSwagger": false,
"Disabled": "[RadioPropagationServiceDisabled]",
"PathBase": "/radiopropagationservices"
}
}
}
}
5. Point RadioPropagationService at AntennaService. In the deployed RadioPropagationService appsettings.json or appsettings.Production.json, set the AntennaService addresses to the actual web and gRPC proxy URLs exposed by your hoster. For example, if it exposes them on ports 5110 and 5111:
{
"Services": {
"MariaGdkDataFolder": "C:\\MariaGeoData",
"AntennaServiceAddressWeb": "http://localhost:5110/antservice_web/",
"AntennaServiceAddressGrpc": "http://localhost:5111/antservice_web_grpc/"
}
}
Also configure RadioPropagationService's prediction directory and any required HTTPS certificate and skywave data as described elsewhere on this page. After starting the hoster, check the services through the URLs it actually exposes. If a service does not start or is not ready, check the hoster and service logs, manifest paths, proxy routes, and permissions on data directories.



