当前位置:   article > 正文

无人机测绘航线生成算法_正射影像航线规划算法

正射影像航线规划算法

1无人机测绘航线设计的基本概念

1.1像元

像元为相机感光元件的最小感光面,无人机航测遥感系统搭载的数码相机的像元大小为:

a=L/R
式中:L ——传感器长边(短边)大小(mm);R ——长边(短边)像元个数(mm)。

1.2地面分辨率

照片单个像元所代表的地面尺寸。相同相机和镜头情况下,航高越大,地面分辨率越小;反之,航高越小,地面分辨率越大。

1.3航高

航高是指无人机相机镜头到地面的垂直距离,其大小直接影响无人机航测时实现的地面分辨率。无人机航测遥感系统中航高的确定跟成图比例尺、像元大小、地面分辨率有关,其相互关系为:
H=f*GSD/a
式中:摄影航高H,单位为米(m); 镜头焦距f,单位为毫米(mm);
             像元尺寸a,单位为毫米(mm); 地面分辨率GSD,单位为米(m)。

一般来说,航测任务需要根据测区面积、特征、地形、精度等因素,来确定最佳的航高范围。航高设置合理,能够保证像片质量,提高地图准确度。

1.4航向重叠度和旁向重叠度

航向重叠度是指同一航线方向上的相邻照片所摄地面区域之间的重叠度,航向重叠度一般设置为60%-80%,最小不低于53%。

旁向重叠度则是相邻航线之间重叠地面区域的重叠度,旁向重叠度一般设置为15%-60%,最小不低于8%。

假设 qx、px 分别表示航向和旁向重叠部分的像片长度,L表示像幅长度,px、py 分别表示航向和旁向的重叠度,则:

在这里插入图片描述

1.5基线长度

基线长度是同航线上连续两张曝光像片像主点之间的距离,其计算公式如下:

B=(1-P)*L

式中:基线长度B,单位为米(m); 航向重叠率P; 纵向像幅地面尺寸,单位为米(m)。

1.6主航线方向

一般将测区第一条航测航线的飞行方向设为主航线方向。

无人机航测技术出现之前,面状区域型的航空摄影一般是以东西飞行为主,也可根据测区的范围特点采用南北飞行,例如测区的南北长度大于东西长度。对于道路、铁路、电力选线等工作时可以采用自由航线。现阶段,无人机航测的航线一般可根据当天天气风向、测区形状、无人机留空时间等等因素自由设计。

2代码实现

2.1基本类型定义

定义了基本的点、线、方向数据类型。

  1. /DataDefinition//
  2. //平面坐标点
  3. function GPoint(x, y)
  4. {
  5. return {
  6. x: x,
  7. y: y
  8. }
  9. }
  10. //经纬度点
  11. function PointLatLng(Lng, Lat) {
  12. return {
  13. Lng: Lng,
  14. Lat: Lat
  15. }
  16. }
  17. //多边形方向枚举,顺时针、逆时针
  18. const ClockDirection=
  19. {
  20. Counterclockwise : 0,
  21. Clockwise : 1,
  22. None : 2
  23. }
  24. //线段定义(经纬度)
  25. function LineSegement()
  26. {
  27. this.number = 0;
  28. this.startPoint = new PointLatLng();
  29. this.endPoint = new PointLatLng();
  30. }
  31. //旋转点
  32. class RotatePoint
  33. {
  34. constructor()
  35. {
  36. this.number = 0;
  37. this.point = new PointLatLng();
  38. this.rotatepoint = new PointLatLng();
  39. }
  40. }
  41. //测区包围盒
  42. class EnvelopeRect
  43. {
  44. constructor()
  45. {
  46. this.LeftUpPoint = new PointLatLng();
  47. this.LeftDownPoint = new PointLatLng();
  48. this.RightUpPoint = new PointLatLng();
  49. this.RightDownPoint = new PointLatLng();
  50. this.LeftUpRotatePoint = new PointLatLng();
  51. this.LeftDownRotatePoint = new PointLatLng();
  52. this.RightUpRotatePoint = new PointLatLng();
  53. this.RightDownRotatePoint = new PointLatLng();
  54. }
  55. }

2.2空间计算类

实现复杂坐标计算所必须的集中空间计算方法,包括:基本的角度转换、方位角计算、两点距离计算、时针方向计算、未知点位计算等等。

  1. MapMethod/
  2. class MapMethod
  3. {
  4. static EARTH_RADIUS = 6378.137;//地球半径,km
  5. static EARTH_ARC = 111.199;//地球弧长,km
  6. static rad(d)
  7. {
  8. return d * Math.PI / 180.0;
  9. }
  10. static RadiansToDegrees(radians)
  11. {
  12. return radians * 180.0 / Math.PI;
  13. }
  14. static Azimuth(lat1, lng1, lat2, lng2)
  15. {
  16. let latitude1 = this.rad(lat1);
  17. let longitude1 = this.rad(lng1);
  18. let latitude2 = this.rad(lat2);
  19. let longitude2 = this.rad(lng2);
  20. let x = Math.cos(latitude1) * Math.sin(latitude2) - Math.sin(latitude1) * Math.cos(latitude2) * Math.cos(longitude2 - longitude1);
  21. return this.RadiansToDegrees(Math.atan2(Math.sin(longitude2 - longitude1) * Math.cos(latitude2), x) % (Math.PI * 2.0));
  22. }
  23. //已知一点经纬度A,和与另一点B的距离和方位角,求B的经纬度
  24. //@param ptStart A的经纬度
  25. //@param distance AB距离(单位:千米)
  26. //@param angel AB方位角
  27. //@return B的经纬度
  28. static ConvertDistanceToLatLng(ptStart, distance, angel)
  29. {
  30. let azimuth = this.rad(angel);
  31. // 将距离转换成经度的计算公式
  32. let lng = ptStart.Lng + (distance * Math.sin(azimuth)) / (this.EARTH_ARC * Math.cos(this.rad(ptStart.Lat)));
  33. // 将距离转换成纬度的计算公式
  34. let lat = ptStart.Lat + (distance * Math.cos(azimuth)) / this.EARTH_ARC;
  35. return new PointLatLng(lng, lat);
  36. }
  37. //计算多边形时钟方向(经纬度点集)
  38. static CalculateClockDirection(points, isYAxixToDown=false)
  39. {
  40. let i = 0, j = 0, k = 0;
  41. let count = 0;
  42. let z = 0.0;
  43. let yTrans = isYAxixToDown ? (-1) : (1);
  44. if(points == null || points.length < 3)
  45. {
  46. return (ClockDirection.None);
  47. }
  48. let n = points.length;
  49. for(i = 0; i < n; i++)
  50. {
  51. j = (i + 1) % n;
  52. k = (i + 2) % n;
  53. z = (points[j].Lng - points[i].Lng) * (points[k].Lat * yTrans - points[j].Lat * yTrans);
  54. z -= (points[j].Lat * yTrans - points[i].Lat * yTrans) * (points[k].Lng - points[j].Lng);
  55. if (z < 0)
  56. {
  57. count--;
  58. }
  59. else if (z > 0)
  60. {
  61. count++;
  62. }
  63. }
  64. if (count > 0)
  65. {
  66. return (ClockDirection.Counterclockwise);
  67. }
  68. else if (count < 0)
  69. {
  70. return (ClockDirection.Clockwise);
  71. }
  72. else
  73. {
  74. return (ClockDirection.None);
  75. }
  76. }
  77. //计算两点距离(经纬度),米
  78. static GetDistance(startpoint,endpoint)
  79. {
  80. let latitude1 = this.rad(startpoint.Lat);
  81. let longitude1 = this.rad(startpoint.Lng);
  82. let latitude2 = this.rad(endpoint.Lat);
  83. let longitude2 = this.rad(endpoint.Lng);
  84. let num = Math.pow(Math.sin((latitude1 - latitude2) / 2.0), 2.0);
  85. let num2 = Math.pow(Math.sin((longitude1 - longitude2) / 2.0),
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/煮酒与君饮/article/detail/927090
推荐阅读
相关标签
  

闽ICP备14008679号