Coder Social home page Coder Social logo

ntia / p528 Goto Github PK

View Code? Open in Web Editor NEW
23.0 6.0 13.0 667 KB

U.S. reference implementation of Recommendation ITU-R P.528 providing propagation path loss predictions for aeronautical mobile and radionavigation services using the VHF, UHF, and SHF bands

License: Other

C++ 84.47% C 3.88% C# 11.65%
propagation itu cpp csharp

p528's Introduction

Recommendation ITU-R P.528-5 - U.S. Reference Implementation

Persistent Identifier: DOI

This code repository contains the U.S. Reference Software Implementation of Recommendation ITU-R P.528. This Recommendation contains a method for predicting basic transmission loss in the frequency range 100-30 000 MHz for aeronautical services. The software implements Annex 2 of Rec P.528, the Step-by-Step method to computing propagation loss for air-to-ground paths.

Companion software (p528-gui) provides a Graphical User Interface (GUI) that can be used with this software implementation.

Inputs

Variable Type Units Limits Description
d__km double km 0 <= d__km Great circle path distance between terminals
h_1__meter double meter 1.5 <= h_1__meter <= 20 000 Height of the low terminal
h_2__meter double meter 1.5 <= h_2__meter <= 20 000 Height of the high terminal
f__mhz double MHz 100 <= f__mhz <= 30 000 Frequency
T_pol int Polarization
  • 0 = Horizontal
  • 1 = Vertical
time double 1 <= time <= 99 Time percentage

Outputs

Outputs to P.528 are contained within a defined Results structure.

Variable Type Units Description
d__km double km Great circle path distance. Could be slightly different than specified in input variable if within LOS region
A__db double dB Basic transmission loss
A_fs__db double dB Free space basic transmission loss
A_a__db double dB Median atmospheric absorption loss
theta_h1__rad double rad Elevation angle of the ray at the low terminal
propagation_mode int Mode of propagation
  • 1 = Line of Sight
  • 2 = Diffraction
  • 3 = Troposcatter
warnings int Warning flags

Error Codes and Warning Flags

P.528 supports a defined list of error codes and warning flags. A complete list can be found here.

Example Values

The below table includes a select set of example inputs and outputs for testing purposes. The P.528 CSV data files contain an extensive set of validation example values.

d__km h_1__meter h_2__meter f__mhz T_pol time A__db
15 10 1 000 500 0 50 110.0
100 100 15 000 3 600 0 90 151.6
1 500 15 10 000 5 700 0 10 293.4
30 8 20 000 22 000 1 50 151.1

Notes on Code Style

  • In general, variables follow the naming convention in which a single underscore denotes a subscript (pseudo-LaTeX format), where a double underscore is followed by the units, i.e. h_1__meter.
  • Variables are named to match their corresponding mathematical variables in the underlying Recommendation text.
  • Wherever possible, equation numbers are provided. It is assumed that a user reviewing this source code would have a copy of the Recommendation's text available as a primary reference.

Configure and Build

C++ Software

The software is designed to be built into a DLL (or corresponding library for non-Windows systems). The source code can be built for any OS that supports the standard C++ libraries. A Visual Studio 2019 project file is provided for Windows users to support the build process and configuration.

C#/.NET Wrapper Software

The .NET support of P.528 consists of a simple pass-through wrapper around the native DLL. It is compiled to target .NET Framework 4.8. Distribution and updates are provided through the published NuGet package.

References

Contact

For questions, contact Billy Kozma, [email protected]

p528's People

Contributors

lsegrentia avatar wkozmantia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

p528's Issues

Relax upper height limit

The in-force version of Rec P.528 has an upper terminal height limit of 20km. The software implements this as a hard limit and will not execute outside of this bounds (it returns an error). However, various activities are performing work where it would be useful to allow P.528 to operate above 20km with appropriate disclaimers to the user.

Action: relax the upper terminal limit, such that the user gets a warning if they enter a value above 20km stating that they are operating outside the bounds of the Recommendation. However, still allow the software to compute and return a result.

dotnet core support

.NET support is currently provided via .NET Framework v4.8. Support for .NET Core, and in particular cross-platform .NET support, would be useful. With the completion of #16 such cross-platform .NET Core should be possible.

Add .NET wrapper code

Develop a fully supported .NET wrapper that can be built and offered via NuGet packages.

Add cmake support

Currently, although the software is written without any platform specific requirements, the repo doesn't contain any build/compile support for non-Windows platforms. Only a Visual Studio project file is included. The addition of a cmake file, with corresponding build instructions, would expand support to other platforms, such as Linux.

NakagamiRice.cpp

double VF_i = LinearInterpolation(data::NR_Data[i - 1][K_INDEX], data::NR_Data[i - i][j - 1 + 1], data::NR_Data[i][0], data::NR_Data[i][j - 1 + 1], K);

ReShaper C++ is showing a potential issue ("Both sides of operator are equivalent [misc-redundant-expression]") with this line:

data::NR_Data[i - i]

I think this is a typo and it should read i-1

But the more I look at this code the more I think there is a general issue (could be wrong)

Looking at a test input of

Result res{};
Main(1, 1.5, 1000, 1200, 0.01, &res);

and putting a breakpoint on the NakagamiRice function I think there are cases when the index goes negative (j == 0 so data::P[j - 1] is an issue)

You can better trap this by converting to use std::array or std::vector and running in debug and the debugger traps the issue

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.