ITU-R-Study-Group-3/ITU-R-HF

Possible calculation error: Circuit Reliability

Opened this issue · 1 comments

On line 593 & 606 in CircuitReliability.c the p'tick value is calculated as:
ptick = 2.0R0(sin(psi)/cos(delta - psi));
But checking with the formula from the recommendation it seems that it should be delta + psi in the cosine term?
This would then also check out with ptick in other parts of the program.

The command grep -R -n "\<psi\>" shows the following:
P533/Src/P533/CircuitReliability.c:560: double psi; // Half hop angle P533/Src/P533/CircuitReliability.c:591: psi = dh/(2.0*R0); P533/Src/P533/CircuitReliability.c:592: ptick = 2.0*R0*(sin(psi)/cos(delta + /*-*/ psi)); P533/Src/P533/CircuitReliability.c:604: psi = dh/(2.0*R0); P533/Src/P533/CircuitReliability.c:605: ptick = 2.0*R0*(sin(psi)/cos(delta + /*-*/ psi)); P533/Src/P533/MedianSkywaveFieldStrengthLong.c:95: double psi; P533/Src/P533/MedianSkywaveFieldStrengthLong.c:250: psi = dM/(2.0*R0); P533/Src/P533/MedianSkywaveFieldStrengthLong.c:251: path->ptick = fabs(2.0*R0*(sin(psi)/cos(deltaM + psi)))*(nM+1.0); P533/Src/P533/MedianSkywaveFieldStrengthLong.c:315: printf( "P533 MSFSL: Virtual slant range angle using fM parameters (psi) %f\n", psi); P533/Src/P533/MedianSkywaveFieldStrengthShort.c:71: double psi; // Hop half angle P533/Src/P533/MedianSkywaveFieldStrengthShort.c:157: psi = dh/(2.0*R0); P533/Src/P533/MedianSkywaveFieldStrengthShort.c:159: path->ptick = fabs(2.0*R0*((sin(psi)/cos(delta + psi))))*(n+1.0); P533/Src/P533/MedianSkywaveFieldStrengthShort.c:248: printf("MSFSS: Hop angle (d/2R0) \t\t%f\n", psi*R2D); P533/Src/P533/MedianSkywaveFieldStrengthShort.c:295: psi = dh/(2.0*R0); P533/Src/P533/MedianSkywaveFieldStrengthShort.c:298: path->ptick = fabs(2.0*R0*((sin(psi)/cos(delta + psi))))*(n+1.0); P533/Src/P533/MedianSkywaveFieldStrengthShort.c:420: printf("MSFSS: hop angle (deg) (d/2R0) \t\t%f\n", psi*R2D); P533/Src/P533/MUFBasic.c:56: double psi; // The angle associated with the hop length d, d = R*psi. P533/Src/P533/MUFBasic.c:225: // First, find the angle associated with the half-hop distance, psi. P533/Src/P533/MUFBasic.c:226: psi = dh/(2.0*R0);
There are only two cases where "- psi" should be replaced by "+ psi"