First off, I'll apologize for writing a dull and tedious-looking article. But now I have, let's get started.
We're going to imagine we have a drone of unspecified range - possibly enough to go half way around the world. To do that we will need to know several things.
- The altitude we will fly at - will it be a fixed altitude or a variable altitude?
- Where we left from.
- Where we're going.
- Any waypoints along the route.
- We can use radar to tell the distance from the ground - good stuff but radar can be picked up by hostiles and used for target aquisition.
- We can use sonar - this is how the cruise missile used to do it. It works pretty well - send a wide sweep of sound and listen for the time difference between sending and receiving the pings. This does reduce maximum speed somewhat as the ping has to get back in order to judge altittude.
- Lazer - not a bad method though most lazer rangefinders seem to be very limited in range. There's also the question as to how it'd work over water.
Formula: θ = atan2( sin Δλ ⋅ cos φ2 , cos φ1 ⋅ sin φ2 − sin φ1 ⋅ cos φ2 ⋅ cos Δλ )where φ1,λ1 is the start point, φ2,λ2 the end point (Δλ is the difference in longitude)
I'll leave it there because your mind is probably reeling right now. At some future point I'll talk about Kalman equations needed to turn an acelerometer from a gaming toy to a serious device that helps a drone fly level.