Calculation of distance to Ionosphere of Radio Signal

urbancamo

New member
Joined
Jan 10, 2022
Messages
8
Hi, I write software that visualizes radio propagation signals. I would like to know how to calculate the distance to a layer in the ionosphere for a radio signal radiated at a specific angle from the tangent (i.e. an angle above the horizon).

Assumptions: Earth is a sphere diameter radius (?) 6,386 km
Inputs:
  • 'a': angle of radiation above the tangent at the station location.
  • 'h': Height of ionospheric layer above the Earth's surface, e.g. 400km
Outputs:
  • 'd': distance to ionosphere layer of height 'h' of a radiated signal at angle 'a'.
This is my first question so please be kind! I can calculate angles for a single sphere but this has me flummoxed.

Many thanks, Mark.

Screenshot_20220110_205509.png
 
Last edited by a moderator:
Hi, I write software that visualizes radio propagation signals. I would like to know how to calculate the distance to a layer in the ionosphere for a radio signal radiated at a specific angle from the tangent (i.e. an angle above the horizon).

Assumptions: Earth is a sphere diameter 6,386 km
Inputs:
  • 'a': angle of radiation above the tangent at the station location.
  • 'h': Height of ionospheric layer above the Earth's surface, e.g. 400km
Outputs:
  • 'd': distance to ionosphere layer of height 'h' of a radiated signal at angle 'a'.
This is my first question so please be kind! I can calculate angles for a single sphere but this has me flummoxed.

Many thanks, Mark.

View attachment 30591
1641853374142.png
Please show us what you have tried and exactly where you are stuck.

Please follow the rules of posting in this forum, as enunciated at:


Please share your work/thoughts about this problem.
 
Hi, I write software that visualizes radio propagation signals. I would like to know how to calculate the distance to a layer in the ionosphere for a radio signal radiated at a specific angle from the tangent (i.e. an angle above the horizon).

Assumptions: Earth is a sphere diameter 6,386 km
Inputs:
  • 'a': angle of radiation above the tangent at the station location.
  • 'h': Height of ionospheric layer above the Earth's surface, e.g. 400km
Outputs:
  • 'd': distance to ionosphere layer of height 'h' of a radiated signal at angle 'a'.
This is my first question so please be kind! I can calculate angles for a single sphere but this has me flummoxed.

Many thanks, Mark.

View attachment 30591
As you (hopefully) know, our goal is to help you work things out yourself, based on what you know best.

My guess is that you may be least challenged by using coordinates. Write equations for two circles (the earth with radius R, and the ionosphere with radius R+h), and for the straight line whose slope is tan(a). through the point at the top of the inner circle. Find the intersection with the outer circle, and use the distance formula to find d.

You may well see a different approach; use whatever makes most sense to you, and we can help. That may mean showing what you've already tried; note that the problem really only involves a single sphere/circle.
 
My preference is to apply the law of cosines. ....... Fixed typo
 
Last edited by a moderator:
OK thank you for the answers. I did make some progress last night, and the law of cosines is the conclusion I came too.
I apologize for the dimensional inaccuracy too. I should know better at my age.

So we have the following representation of the problem that shows that we have a triangle to solve for one side knowing two sides and an angle. I have represented that in the second image with the sides and angles relabeled as per the cosine rule.

Screenshot_20220111_083051.png
We know that angle B is formed from a right angle and the elevation angle.
Side b is the radius of the Earth plus the height of the Ionosphere above the ground.
Side c is the radius of the Earth. So I need to solve for a which is the distance to the Ionosphere from the radiation source when fired at elevation angle.

Thanks for the help, Mark.
Screenshot_20220111_083032.png
 
Last edited:
Do I need to use substitution here from: [math]a^2 = b^2 + c^2[/math]
 
Last edited:
OK thank you for the answers. I did make some progress last night, and the law of cosines is the conclusion I came too.
I apologize for the dimensional inaccuracy too. I should know better at my age.

So we have the following representation of the problem that shows that we have a triangle to solve for one side knowing two sides and an angle. I have represented that in the second image with the sides and angles relabeled as per the cosine rule.

View attachment 30608
We know that angle B is formed from a right angle and the elevation angle.
Side b is the radius of the Earth plus the height of the Ionosphere above the ground.
Side c is the radius of the Earth. So I need to solve for a which is the distance to the Ionosphere from the radiation source when fired at elevation angle.

Thanks for the help, Mark.
View attachment 30607
This is definitely the better way; I made my suggestion only in case you were not willing to use much trig!

Your equation
1641907689660.png
is a quadratic equation in a, so use the quadratic formula.

An alternative is to use the Law of Sines to find angle C, then find angle A, and then use the Law of Cosines to directly find side a.

Either way, there will be two solutions (one going to the left in the picture), but you want the positive length and the acute angle.
 
the equation above: [math]a^2 - 2ar \cdot cos(\frac{π}{2}+ θ ) + r^2 -(r+h)^2 = 0[/math]using [math]x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}[/math]where [imath]a = 1, b = 2r \cdot cos(\frac{π}{2}+ θ ), c = r^2 -(r+h)^2[/imath]

the quadratic formula applied
[math]x = \frac{-2r \cdot cos(\frac{π}{2}+ θ )\pm\sqrt{2r \cdot cos(\frac{π}{2}+ θ )^2-4(r^2 -(r+h)^2})}{2}[/math]taking the positive solution only
[math]x = \frac{-2r \cdot cos(\frac{π}{2}+ θ )+\sqrt{2r \cdot cos(\frac{π}{2}+ θ )^2-4r^2 -4(r+h)^2}}{2}[/math]
expanding:
[math]4(r+h)^2 = 4r^2 + 4h^2 + 4rh[/math]
gives:
[math]x = \frac{-2r \cdot cos(\frac{π}{2}+ θ )+\sqrt{2r \cdot cos(\frac{π}{2}+ θ )^2-8r^2 -4h^2 - 4rh}}{2}[/math]
I'm not sure if there is any additional simplification? I can code this equation up as is and check the results however.
 
the equation above: [math]a^2 - 2ar \cdot cos(\frac{π}{2}+ θ ) + r^2 -(r+h)^2 = 0[/math]using [math]x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}[/math]where [imath]a = 1, b = 2r \cdot cos(\frac{π}{2}+ θ ), c = r^2 -(r+h)^2[/imath]

the quadratic formula applied
[math]x = \frac{-2r \cdot cos(\frac{π}{2}+ θ )\pm\sqrt{2r \cdot cos(\frac{π}{2}+ θ )^2-4(r^2 -(r+h)^2})}{2}[/math]taking the positive solution only
[math]x = \frac{-2r \cdot cos(\frac{π}{2}+ θ )+\sqrt{2r \cdot cos(\frac{π}{2}+ θ )^2-4r^2 -4(r+h)^2}}{2}[/math]
expanding:
[math]4(r+h)^2 = 4r^2 + 4h^2 + 4rh[/math]
gives:
[math]x = \frac{-2r \cdot cos(\frac{π}{2}+ θ )+\sqrt{2r \cdot cos(\frac{π}{2}+ θ )^2-8r^2 -4h^2 - 4rh}}{2}[/math]
I'm not sure if there is any additional simplification? I can code this equation up as is and check the results however.
I'm not sure why it took me until now to see your reply.

You seem to have failed to square all of "b", and you also got a sign wrong inside the radical (bad distribution). When you fix this, you'll be able to factor out a 4, and cancel a 2 everywhere.

Also, [imath]\cos(\frac{\pi}{2}+\theta)=-\sin(\theta)[/imath].
 
OK hopefully I have been more careful this time!

Using
[math]x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}[/math]
Substituting [imath]a=1,b=2r⋅cos(\frac{π}{2}+θ),c=r^2−(r+h)^2[/imath]

[math]x=\frac{-2r⋅cos(π2+θ)\pm\sqrt{(2r⋅cos(\frac{π}{2}+θ))^2-4(r^2−(r+h)^2)}}{2}[/math]
Substituting [imath]cos(\frac{π}{2}+θ)[/imath] with [imath]-sin θ[/imath]

[math]x=\frac{2r⋅sin θ \pm \sqrt{(-2r⋅sin θ)^2 - 4(r^2 - (r + h)^2)}}{2}[/math]
Expand [imath](r+h)^2[/imath]

[math]x=\frac{2r⋅sin θ \pm \sqrt{(-2r⋅sin θ)^2 - 4(r^2 - (r^2 + h^2+ rh))}}{2}[/math]
[math]x=\frac{2r⋅sin θ \pm \sqrt{(-2r⋅sin θ)^2 - 4(r^2 - r^2 - h^2- rh)}}{2}[/math]
[math]x=\frac{2r⋅sin θ \pm \sqrt{(-2r⋅sin θ)^2 - 4(- h^2- rh)}}{2}[/math]
[math]x=\frac{2r⋅sin θ \pm \sqrt{(-2r⋅sin θ)^2 + 4h^2 + 4rh}}{2}[/math]
Factoring out the 2 (unsure whether this is valid):

[math]x=r⋅sin θ \pm \sqrt{(-r⋅sin θ)^2 + 2h^2 + 2rh}[/math]
 
Of course. Well, this is all good practice with LaTeX math and thank you for the continued help!

Using
[math]x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}[/math]
Substituting [imath]a=1,b=-2r⋅cos(\frac{π}{2}+θ),c=r^2−(r+h)^2[/imath]

[math]x=\frac{2r⋅cos(π2+θ)\pm\sqrt{(-2r⋅cos(\frac{π}{2}+θ))^2-4(r^2−(r+h)^2)}}{2}[/math]
Substituting [imath]cos(\frac{π}{2}+θ)[/imath] with [imath]-sin θ[/imath]

[math]x=\frac{-2r⋅sin θ \pm \sqrt{(2r⋅sin θ)^2 - 4(r^2 - (r + h)^2)}}{2}[/math]
Expand [imath](r+h)^2[/imath]

[math]x=\frac{-2r⋅sin θ \pm \sqrt{(2r⋅sin θ)^2 - 4(r^2 - (r^2 + h^2+ rh))}}{2}[/math]
[math]x=\frac{-2r⋅sin θ \pm \sqrt{(2r⋅sin θ)^2 - 4(r^2 - r^2 - h^2- rh)}}{2}[/math]
[math]x=\frac{-2r⋅sin θ \pm \sqrt{(2r⋅sin θ)^2 - 4(- h^2- rh)}}{2}[/math]
[math]x=\frac{-2r⋅sin θ \pm \sqrt{(2r⋅sin θ)^2 + 4h^2 + 4rh}}{2}[/math]
Factoring out the 2 (unsure whether this is valid):

[math]x=-r⋅sin θ \pm \sqrt{(r⋅sin θ)^2 + 2h^2 + 2rh}[/math]
 
Expand [imath](r+h)^2[/imath]

[math]x=\frac{-2r⋅sin θ \pm \sqrt{(2r⋅sin θ)^2 - 4(r^2 - (r^2 + h^2+ rh))}}{2}[/math]

Something I didn't catch before. When you expanding [imath](r+h)^2=r^2+h^2+2rh[/imath]
Also, there were no x in your original equation. It's fine to name it x to avoid the confusion between the 'a' in your original and the 'a' in the quadratic formula. Should change x to a, once you got your solution.
 
Last edited:
You've missed several other algebra issues. I'll just make the rest of the corrections for you:

Using
[math]x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}[/math]
Substituting [imath]a=1,b=-2r⋅\cos(\frac{π}{2}+θ),c=r^2−(r+h)^2[/imath]

[math]x=\frac{2r⋅\cos(\frac{π}{2}+θ)\pm\sqrt{(-2r⋅\cos(\frac{π}{2}+θ))^2-4(r^2−(r+h)^2)}}{2}[/math]
Substituting [imath]\cos(\frac{π}{2}+θ)[/imath] with [imath]-\sin θ[/imath]

[math]x=\frac{-2r⋅\sin θ \pm \sqrt{(2r⋅\sin θ)^2 - 4(r^2 - (r + h)^2)}}{2}[/math]
Expand [imath](r+h)^2[/imath] and [imath](2r⋅\sin θ)^2[/imath]

[math]x=\frac{-2r⋅\sin θ \pm \sqrt{4r^2\sin^2 θ - 4(r^2 - (r^2 + h^2+ 2rh))}}{2}[/math]
[math]x=\frac{-2r⋅\sin θ \pm \sqrt{4r^2\sin^2 θ - 4(r^2 - r^2 - h^2- 2rh)}}{2}[/math]
[math]x=\frac{-2r⋅\sin θ \pm \sqrt{4r^2\sin^2 θ - 4(- h^2- 2rh)}}{2}[/math]
[math]x=\frac{-2r⋅\sin θ \pm \sqrt{4r^2\sin^2 θ + 4h^2 + 8rh}}{2}[/math]
[math]x=\frac{-2r⋅\sin θ \pm \sqrt{4(r^2\sin^2 θ + h^2 + 2rh)}}{2}[/math]
[math]x=\frac{-2r⋅\sin θ \pm \sqrt{4}\sqrt{r^2\sin^2 θ + h^2 + 2rh}}{2}[/math]
Canceling the 2:

[math]x=-r⋅\sin θ \pm \sqrt{r^2\sin^2 θ + h^2 + 2rh}[/math]
Take only the positive solution:
[math]d=-r⋅\sin θ + \sqrt{r^2\sin^2 θ + h^2 + 2rh}[/math]
Probably someone will find another error I've missed!
 
Thanks for the help, I coded up a quick algorithm and it worked, I have another problem that I think I can solve but if you don't mind I'll tack it on the end to confirm it is correct. Many thanks.
 
Top