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 ...
随机推荐
- 用Python深入理解跳跃表原理及实现
最近看 Redis 的实现原理,其中讲到 Redis 中的有序数据结构是通过跳跃表来进行实现的.第一次听说跳跃表的概念,感到比较新奇,所以查了不少资料.其中,网上有部分文章是按照如下方式描述跳跃表的: ...
- NO--10今天带大家回忆回忆“闭包”吧!
对于‘闭包,我相信很多人都掉进过这个坑里,也相信很多人没能详细的理解这个问题,今天带大家再次走进闭包: 写这篇文章时的心情是十分忐忑的,因为对于我们今天的主角:闭包,很多小伙伴都写过关于它的文章,相信 ...
- Linux系统服务(daemon)(鸟哥Linux私房菜笔记)
Linux系统服务(daemon) 一.SystemV的init管理机制(脚本式启动)1.服务启动分类stand alone 独立启动模式super daemon 总管程序 2.服务的启动.关闭与观察 ...
- zabbix_agentd-install.sh (脚本部署zabbix_agentd服务)
原文发表于cu:2016-05-20 基于http://www.cnblogs.com/netonline/p/7406598.html(http://blog.chinaunix.net/uid-2 ...
- three的初步探索之表象篇
首先three.js是啥?用来干啥的?首先在谈这个之前,先说下canvas,canvas是h5新生的一个功能,可以用来画图,表达许多更绚丽的特效,然后canvas目前有个软当,就是只能2d,不支持三维 ...
- win2008 r2 开启TLS1.2
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityPr ...
- C# 未在本地计算机上注册“Microsoft.Jet.OLEDB.4.0”提供程序。
在菜单 “项目”的最下面 工程属性 菜单,选择“生成”选项卡,将目标平台由“Amy CPU”或者“*64”改成“*86”.
- linux +redis 安装 +mongo 安装
Linux 下redis安装 本教程使用的最新文档版本为 2.8.17,下载并安装: $ wget http://download.redis.io/releases/redis-2.8.17.tar ...
- GIT团队实战
项目要求 组长博客 遇到的困难及解决办法 组员1(组长):王彬 遇到的困难 在团队任务分工的时候没有充分照顾到所有人,导致队员们的工作量不均. 现场编程时间不够 解决办法 在此对组员们表示抱歉,由于 ...
- DFS(DP)---POJ 1014(Dividing)
原题目:http://poj.org/problem?id=1014 题目大意: 有分别价值为1,2,3,4,5,6的6种物品,输入6个数字,表示相应价值的物品的数量,问一下能不能将物品分成两份,是两 ...