Hey guys, Ive been thinking... I want to mount a camera on a PT mount underneath my skywalker. I have 0 experience in programing, but I was wondering if it was possible to have the APM 2.5 calculate the angular difference from its pwm input on the servos(pan/tilt), then translate that to a distance and direction from its current gps location and Magnometer direction and altitude using some trigonometry to determine the ground distance from the plane to the center of view point and then display the location of the center view of the camera on the OSD? Is this feasable, or does it already exist?
You need to be a member of diydrones to add comments!
Replies
Yes, this should be possible, but it would only ever be a rough guide because - a) you would have to assume the ground you are looking at nearly the same elevation as the ground you are currently over, so if you are pointing at a hill or valley, it will be out by a bit. b) there is also quite a bit of sloppiness in the servo movement for most servos and the precision of the sensors in APM in general. If you are not after a precise reading (ie. you are not doing aerial mapping), you could get an estimate of where you are looking. You would also need to tune it for your setup, much like roll and tilt stabilisation today.
There is a "point camera here" function in mission planner, which is kind of the reverse of what you want, but the code could be used as a starting point for this. I'm not sure if it would fit within MinimOSD's remaining memory bounds, which are already being pushed!
What you want for this is the haversine formula (an approximation will probably do). Have a look at http://www.movable-type.co.uk/scripts/latlong.html
Cheers
James