ITS.Propagation.LFMF 1.1
Part of the NTIA/ITS Propagation Library
Loading...
Searching...
No Matches
Airy.cpp File Reference

Implements a function to calculate Airy functions and their derivatives. More...

Functions

std::complex< double > ITS::Propagation::LFMF::Airy (const std::complex< double > Z, const AiryKind kind, const AiryScaling scaling)
 Finds the functions and their derivatives for Airy functions of the first, second, and third (following Hufford) kind.
 

Detailed Description

Implements a function to calculate Airy functions and their derivatives.

Function Documentation

◆ Airy()

std::complex< double > ITS::Propagation::LFMF::Airy ( const std::complex< double > Z,
const AiryKind kind,
const AiryScaling scaling )

Finds the functions and their derivatives for Airy functions of the first, second, and third (following Hufford) kind.

The function accepts a complex input argument and computes the result from a shifted Taylor series or by asymptotic approximation depending of the location of the input argument.

This routine determines the so-called "Airy Functions of the third kind" \( Wi(1) \) and \( Wi(2) \) that are found in equation 38 of NTIA Report 87-219 "A General Theory of Radio Propagation through a Stratified Atmosphere", George Hufford, July 1987.

The Airy function that appeared in the original FORTRAN GWINT and GWRES implementations had the switches all mangled from what George Hufford had in mind. This routine has the corrected switches. Please see the Airy function code that appears in the appendix of OT/ITS RR 11 "A Wave Hop Propagation Program for an Anisotropic Ionosphere" L. A. Berry and J. E. Herman, April 1971.

Parameters
[in]ZComplex input argument
[in]kindThe type of Airy function to solve
[in]scalingType of scaling to use (HUFFORD or WAIT) when solving Airy functions of the third kind. This parameter is ignored for AIRY, AIRYD, BAIRY, and BAIRYD values of kind.
Returns
The desired Airy function calculated at Z
Exceptions
std::invalid_argumentIf the values provided for kind or scaling are not valid for this function. This includes when scaling NONE is provided for Airy functions of the third kind.
std::range_errorIf the calculation requires expansion data outside the range of what is known by this program.
Note
The following is a note on scaling the output from this program.

There is a definitional problem with the Airy function which is inevitable relative to how it was defined in the original LFMF code originated with the Hufford's AIRY subroutine.

Using the scaling equal to HUFFORD in this program follows the definitions of \( \mathrm{Wi}^{(1)} \) and \( \mathrm{Wi}^{(2)} \) as defined by Hufford (87-219).

Using the scaling equal to WAIT in this program uses the definitions of \( W_1 \) and \( W_2 \) defined in DeMinco (99-368) and in the original LFMF code following Berry via Wait.

The two solutions differ by a constant. As Hufford notes concerning \( \mathrm{Wi}^{(1)} \) and \( \mathrm{Wi}^{(2)} \) in 87-219:

‍"Except for multiplicative constants they correspond to what Fock (1965) calls W1 and W2 and to what Wait (1962) calls W2 and W1.


The following are the multiplicative constants that allow for the translation between Hufford \( \mathrm{Wi}^{(1)} \) and \( \mathrm{Wi}^{(2)} \) with Wait \( w_1 \) and \( w_2 \), respectively. These are given here as a reference if this function is used for programs other than LFMF.

// Wait
complex<double> WW2 = complex<double>( sqrt(3.0*PI), sqrt(PI));
complex<double> WDW2 = complex<double>(-1.0*sqrt(3.0*PI), sqrt(PI));
complex<double> WW1 = complex<double>( sqrt(3.0*PI), -1.0*sqrt(PI));
complex<double> WDW1 = complex<double>(-1.0*sqrt(3.0*PI), -1.0*sqrt(PI));
// Hufford
complex<double> HW2 = 2.0*complex<double>(cos( PI/3.0), sin( PI/3.0));
complex<double> HDW2 = 2.0*complex<double>(cos(-PI/3.0), sin(-PI/3.0));
complex<double> HW1 = 2.0*complex<double>(cos(-PI/3.0), sin(-PI/3.0));
complex<double> HDW1 = 2.0*complex<double>(cos( PI/3.0), sin( PI/3.0));
// (Multiplicative constant) * Hufford's Wi'(1) = Wait W1'
// So the multiplicative constants are:
complex<double> uDW2 = WDW2/HDW1; // uDW2 = complex<double>(0.0, sqrt(PI))
complex<double> uW2 = WW2/HW1; // uW2 = complex<double>(0.0, sqrt(PI))
complex<double> uDW1 = WDW1/HDW2; // uDW1 = complex<double>(0.0, -sqrt(PI))
complex<double> uW1 = WW1/HW2; // uW1 = complex<double>(0.0, -sqrt(PI))

To make the solutions that are generated by this program for the Hufford Airy functions of the "3rd kind" abundantly clear please examine the following examples.

For \( z = 8.0 + 8.0i \) the Asymptotic Solution is used.

Ai( 8.0 + 8.0 i) = 6.576933e-007 + 9.312331e-006 i
Ai'(8.0 + 8.0 i) = 9.79016e-006 + -2.992170e-005 i
Bi( 8.0 + 8.0 i) = -1.605154e+003 + -4.807200e+003 i
Bi'(8.0 + 8.0 i) = 1301.23 + -16956 i
Wi(1)(8.0 + 8.0 i) = -4.807200e+003 + 1.605154e+003 i
Wi(2)(8.0 + 8.0 i) = 4.807200e+003 + -1.605154e+003 i
Ai(z) - j*Bi(z) = -4.807200e+003 + 1.605154e+003 i
Ai(z) + j*Bi(z) = 4.807200e+003 + -1.605154e+003 i

For \( z = 1.0 - 2.0i \) the Taylor series with a shifted center of expansion solution is used.

Ai( 1.0 - 2.0 i) = -2.193862e-001 + 1.753859e-001 i
Ai'(1.0 - 2.0 i) = 0.170445 + -0.387622 i
Bi( 1.0 - 2.0 i) = 4.882205e-002 + -1.332740e-001 i
Bi'(1.0 - 2.0 i) = -0.857239 + -0.495506 i
Wi(1)(1.0 - 2.0 i) = -3.526603e-001 + 1.265638e-001 i
Wi(2)(1.0 - 2.0 i) = -8.611221e-002 + 2.242079e-001 i
Ai(z) - j*Bi(z) = -3.526603e-001 + 1.265639e-001 i
Ai(z) + j*Bi(z) = -8.611221e-002 + 2.242080e-001 i
See also
ITS::Propagation::LFMF::AiryKind
ITS::Propagation::LFMF::AiryScaling
ITS::Propagation::LFMF::WiRoot
Privacy Policy FOIA Accessibility Information Quality