Calculating flight distance of drone without losing line of sight due to obstacles I hope everyone is off to a good star of the new year!
So I'm trying to figure out a way of calculate how far I'm able to fly my drone without losing visual sight of it when having an obstacle (a forest for example, but a house or hill or similar would also be applicable) between me and the drone. This would be helpful when planning the flight and choosing a take off site.
The problem:
Where I live we have lots of forests. There are clearings in the forests of different sizes however and I want to launch and control my drone from inside of these clearings. The problem is that I need to keep a clear visual line of sight (VLOS) to the drone, the reason for this is twofold: It's the law and the drone will lose its connection eventually if the obstacle is removing enough signal strength. Without knowing how far I'm able to fly the drone in VLOS while planning the mission I risk not being able to cover the planned area. So I need to be able to calculate the possible flight distance during planning and i figured simple trigonometry would be a logic way of doing that.
The solution:
Calculating the flight distance using simple trigonometry, using the Pythagorean theorem and Tangents, Sines, and Cosines.
How:
The illustration below shows the problem. The line i call VLOS need to be clear of any obstacle, in this case, trees. I want to know the maximum flight distance before the VLOS line hits a tree.
Assuming I know the height of the obstacle and the distance between it and where I will be standing with the remote, and also the altitude of the drone, I should be able to calculate the flying distance without losing VLOS.
As you see in this illustration I made (Flight distance illustration) if the drone goes any further the VLOS will hit the trees and thus making it impossible to see, and also weakening the signal. Assuming I'm already at maximum height (120 m) I'm unable to increase the altitude.
In this illustration (Flight distance illustration with values) I have changed the names of the lines to a,b,c etc. I have also made another triangle consisting of the distance between the RC and the bottom of the tree (b1), the height of the tree (a1) and the distance between the RC and the top of the tree. (c1).
Here are the values i will use:
a1= 36,7m
b1= 33m
c1= ?
a2= 120m
b2= ? (what I'm after)
c2= ?
v= ?
To start I would use the pythagorean theorem to get the length of c1 (distance between RC and treetop):
√(a1^2+b1^2)= c1
√36,7^2+33^2= 49,35m
The next step then would be to calculate the angle of v using arccos (degrees)
arccos(b1/c1)=v
arccos(33/49,35)=48,03°
Now the last step is to get the flight distance (b2) using Tangents
a2/Tan(v)=b2
120/Tan(48,03)=107m
So the maximum flight distance (while still being able to unhindered see the drone) is calculated to be 107m, however I have tried this exact scenario and the flight distance was instead 172m. Why is that?
The weaknesses that I have found to this method is:

*

*My math. To put i simply I'm not very good at math and I could have easily made a mistake in my equations.


*Using the wrong value for a1. This the easiest error to make here, since I don't have the exact height of the trees. Accuracy depending on method used for measuring the height. (in my case a tree height measuring application)


*Using the wrong value for b1. Also easy to make. Depends on method used to measure. (in my case I measured in QGIS on satellite imagery)
Note: The drone doesn't change its altitude and it is relative to where the RC is, so the terrain under the drone doesn't affect the result of a2, it is constant)
If I change a1 and b1 to be -5m and +5m (a1=31,7 and b1=38) I still only get 148 m of flight distance. I find it rather unlikely that I would be that much off on both of these values.
While I was out doing this test I was also able to make a test where a1=26,7m and b1=94m. The result using the same calculation as above is 422 m  flight distance (or b2). The real result however was 843 m of flight distance!
So what is going on here? Why is the calculated flight distance much lower than the real flight distance?
Am I using the equations wrong?
I look forward to any input on this, thanks in advance!
UPDATE: I will do a third test using an obstacle with known height and distance since it all points to that there is something off with the values of a1 and b1. I will post the result as soon as this is done. Thanks for all the input so far!
Best regards
Patrik Forsberg
 A: The triangles are "similar" so the ratio "c1:a1" holds for other sides too. What you found with $a2/Tan(v)=b2$ is that the horizonal distance is $107.91$ and, if that is what you want, you are correct.
$$c1=\sqrt{a1^2+b1^2}=\sqrt{36.7^2+33^3}=49.35$$
$$r1=\frac{a2}{a1}=\frac{120}{36.7}\approx 3.27$$
$$b2=r1\cdot b1 \approx 3.27 \cdot 33 = 107.91$$
$$c2=r1\cdot c1 \approx 3.27 \cdot 49.35 = 161.3745$$
$$V=\arcsin{\frac{a1}{c1}}
=\arcsin{\frac{36.7}{49.35}}\approx\arcsin{(0.7436)} \approx 0.8385 \space rad \approx 48.04^\circ$$
With the change in a,b th new $c1$ length is hardly changed
$c1=\sqrt{31.7^2+38^2}\approx 49.48$
Assuming the max altitude is the same $(120)$, we have a  greater ratio:
$$r2=\frac{120}{31.7}\approx 3.79$$
thus $$b2=r2\cdot b1=3.79\cdot 38\approx 143.85$$
I can only guess that there is a difference between the a-value(s) and the actual height of the trees.
A: I think the shortcoming in your conservative calculations are that you are treating the trees / forest as solid barriers - something that absorbs your TX signal $100 \%$. The waves will still propagate via diffraction, reflection and scatter in most vegetation, so the trees are acting more like a filter than a plug.
Take a look at this article. It may give you some insight on how to apply correction to your distance values depending on the vegetation you are working around.
My guess is your signal is attenuating around $15-20$ dB, so perhaps calculate the line of sight signal minus your attenuation to get a more accurate distance.
Cheers,
David
A: There is a similarity between triangles and
$$b_2=b_1\frac{a_2}{a_1}=107.9\,m.$$
This can't be wrong.
How did you estimate the distance to the trees, their height, and the altitude of the drone ? How does the drone determine the travelled distance ?
