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!

最新文章

  1. UE4新手引导之下载和安装虚幻4游戏引擎
  2. 《徐徐道来话Java》(2):泛型和数组,以及Java是如何实现泛型的
  3. Codeforces Round #254 (Div. 2) A DZY Loves Chessboard
  4. VB.net中Ajaxpro的使用
  5. javascript原型prototype浅识
  6. C#.NET 大型通用信息化系统集成快速开发平台 4.0 版本 - 组织机构的名称编号是否允许重复?
  7. KMP算法 --- 深入理解next数组
  8. oracle安装分析
  9. tee 解决readonly 文件无法修改
  10. 深度学习caffe:Ubuntu16.04安装指南(1)
  11. Java多线程高并发学习笔记(二)——深入理解ReentrantLock与Condition
  12. Executor, ExecutorService 和 Executors 间的区别与联系
  13. VB控件间的拖放
  14. docker 安装 zookeeper
  15. 力扣算法题—060第K个排列
  16. mvc core2.1 Identity.EntityFramework Core ROle和用户绑定查看 (八)完成
  17. Adapter 适配器模式 MD
  18. EasyMock set方法报错: java.lang.AssertionError
  19. tomcat使用Eclipse进行远程调试(线上调试)
  20. 微信小程序 - 开发工具之编译模式

热门文章

  1. 用Python实现多站点运维监控
  2. 3.0 zookeeper的集群介绍、搭建、环境、安装
  3. JDBC及DBUtils
  4. [leetcode-914-X of a Kind in a Deck of Cards]
  5. Unicode和UTF-8
  6. 关于C语言的问卷调查!!!!!!!!!!
  7. HttpCookie Class
  8. 程序员必看电影:Java 4-ever
  9. oracle impdp导入时 提示“ORA-39002: 操作无效 ORA-39070: 无法打开日志文件 ”
  10. Fn+F1-F12,避免使用FN+