Overlaying GPS Coordinates for Camera Crosshairs

Hey Guys!
I am working on a project to allow us to implement GPS coordinates for the location of the crosshairs of a PTZ camera, other wise known as Geo-pointing. This will essentially give us the LAT/LONG of what we are looking at.
I have found several methods to do this, but I'm looking for the simplest way but accurate as possible. I am fairly new to modifying APM and to MAVLink so instruction and suggestions are very welcome! Here is what I have in mind:
In order to get this:
LAT/LON: Self explanatory
BRG: Bearing
SRG: Slant Range (Range from Aircraft to location)
GRG: Ground Range (Range from coordinate to coordinate)
I have a formula to triangulate the position of where the crosshairs are pointing relative to the aircraft by using trigonometry. Here is the example:


The system will incorporate 1x APM 2.5 w/ GPS, 3DR Telemetry radios, 1x IMU w/ compass for camera gimbal, 2x MinimOSD boards, 2 cameras, 1x video TX with two-way camera switcher.
Method:
Application extracts altitude from APM and camera angle from Camera IMU and finds the tangent and cosine of the angle and finds the missing sides. This will give us the ground distance and slant range respectively.
TAN(CAng)*Alt = GndDist COS(CAng)*Alt = Slant
At this point the slant and ground range can be transmitted to the video feed.
Next, we use the aircraft's GPS coordinates from the APM and the ground distance to find what coordinate we are looking at on the ground:
aL-aircraft Latitude
aO-aircraft Longitude
cL-crosshair Latitude
cO-crosshair Longitude
A-aircraft Altitude
D-ground Distance
B-Bearing from Gimbal Compass
cL =ASIN(SIN(aL*PI()/180)*COS((D=TAN(A*PI()/180)/6378.137) + COS(aL*PI()/180)*SIN((D=TAN(A*PI()/180)/6378.137)*COS(B*PI()/180))*180/PI()
cO =((aO*PI()/180) + ATAN2(COS((D=TAN(A*PI()/180)/6378.137)-SIN(aL*PI()/180)*SIN(cL*PI()/180), SIN(B*PI()/180)*SIN((D=TAN(A*PI()/180)/6378.137)*COS(aL*PI()/180)))*180/PI()
These formulas are in excel format since it is what I used to test these.
This should give us the coordinate under the crosshair.
Next, I would like for this information to be sent to the second OSD for the gimbal camera.
Now my question is, how do I implement this?
I would assume that I can attach the IMU and compass via analog sensor input, however, I have no idea how to write code for it.
I also do not know how to write the code for the calculations to the APM in order for the APM to do all the formulas. Can the APM handle it or do I need a separate processor?
How do I create a MAVLink message for the new coordinates and inject into the data stream?
How do I write the code to the MinimOSD to retrieve the new coordinates and display it?
These might sound like noob questions, but I come from a radio frequency engineer background and just now getting into programming. I would love to learn how to do this stuff but there is very little out there on what I'm wanting to do exactly. Sure, I can make an LED blink, and I know that's the basic skills, but I need to know how exactly to interface this with the APM and sensors.
Once again, all of your help is greatly appreciated and I very much welcome discussion and suggestions on a better way to do this!
Overlaying GPS Coordinates for Camera Crosshairs的更多相关文章
- mwc config.h 中文注释
#ifndef CONFIG_H_ #define CONFIG_H_ /*************************************************************** ...
- ARVE: Augmented Reality Applications in Vehicle to Edge Networks
ARVE:车辆到边缘网中的增强现实应用 本文为SIGCOMM 2018 Workshop (Mobile Edge Communications, MECOMM)论文. 笔者翻译了该论文.由于时间仓促 ...
- Mobile Computing: the Next Decade论文 cloudlet薄云
1 Introduction “Information at your fingertips anywhere, anytime” has been the driving vision of mob ...
- 获取图片的metaData
获取图片的metaData 获取简易的metaData较为容易,以下是测试图: 以下是本人提供的源码: UIImage+MetaData.h // // UIImage+MetaData.h // P ...
- How To Start Building Spatially Aware Apps With Google’s Project Tango
How To Start Building Spatially Aware Apps With Google’s Project Tango “Tango can enable a whole new ...
- UniMelb Comp30022 IT Project (Capstone) - 2.Vuforia in Unity
2 Vuforia in Unity Tutorial: https://www.youtube.com/watch?v=X6djed8e4n0&t=213s Preparation: Dow ...
- Resource Access Based on Multiple Credentials
A collection of multiple user credentials each associated with one of multiple different users is ob ...
- Xamarin.Forms介绍
On May 28, 2014, Xamarin introduced Xamarin.Forms, which allows you to write user-interface code tha ...
- [Unity2D]实现背景的移动
在游戏中通常会实现的效果是玩家主角移动的时候,背景也可以跟着移动,要实现这种效果其实就是获取主角的位置,然后再改变摄像机的位置就可以了,这就需要通过脚本来实现.这个脚本添加到摄像机的GameObjec ...
随机推荐
- TW实习日记:第九天
这两天有点忙,要改前端网页和加需求上去.所以昨天说的Vue缓存机制也没看,所以打算现在列个挖了的坑的清单: Vue缓存机制.生命周期和钩子函数 使用项目组自用组件来重写静态页面 SSM框架搭建.整合流 ...
- 特征点检测--基于CNN:TILDE: A Temporally Invariant Learned DEtector
TILDE: A Temporally Invariant Learned DEtector Yannick Verdie1,∗ Kwang Moo Yi1,∗ Pascal Fua1 Vincent ...
- 华为笔试——C++的int型数字位排序
题目:int型数字位排序 题目介绍:输入int 型整数,按照从右至左的顺序,返回不含重复数字的新整数. 例: 输入: 99824270 输出: 072489 分析:乍一看很简单,但是很容易忽略int ...
- Scrum立会报告+燃尽图(十月二十八日总第十九次)
此作业要求参见:https://edu.cnblogs.com/campus/nenu/2018fall/homework/2288 项目地址:https://git.coding.net/zhang ...
- ipv6问题
1)百度搜索:针对苹果最新审核要求为应用兼容IPv6 2) ipV6测试网址:http://test-ipv6.com/ http://ipv6.jmu.edu.cn/ http://ipv6test ...
- Nodejs学习笔记(二)--- 操作MongoDB数据库
最近看了一些关于mongodb的文章,然后就想知道nodeJS是怎么连接的所以我就尝试去了解了一波(这个菜鸟驿站这个网站还不错,虽然知识文档不是最新的,但是还是蛮好的: 顺便官网地址是这个哦:http ...
- CA如何吊销签署过的证书
1: 客户端获取要吊销证书的serial(在使用证书上的主机执行) openssl x509 -in httpd.crt -noout -serial -subject 2:拿到证书的编号后,通过 ...
- ajax跨域问题(三种解决方案)
为什么会出现跨域 跨域问题来源于JavaScript的同源策略,即只有 协议+主机名+端口号 (如存在)相同,则允许相互访问.也就是说JavaScript只能访问和操作自己域下的资源,不能访问和操作其 ...
- chrome调试selenium。其实我是无聊了
from selenium import webdriverdriver = webdriver.Chrome()driver.get("http://www.baidu.com" ...
- SpringMVC Ajax两种传参方式
1.采用@RequestParam或Request对象获取参数的方法 注:contentType必须指定为:application/x-www-form-urlencoded @ResponseBod ...