寻找移动起点后绘制圆弧的公式

Finding a formula for drawing an Arc after moving the starting point

我正在尝试编写一个公式来计算绘制圆弧时的新角度。如果我用图说明就更好了

上面是我在 google 地球上画的图片。

目前我有一个函数可以在给定 (x,y) 轴心点、方位角和半径距离的情况下绘制圆弧

在图上画完这条弧线(离原点最远的弧线)后,我需要移动原点,例如。如果方位角为 170 度,则左侧线将从 170-90 开始,右侧线将从 170+90

开始

我无法找出较小同心圆中的角度(或方位角)的公式。我想提前感谢任何人提供的任何帮助。

这是我计算和绘制圆弧的公式

def drawArc(lat1,lon1,lbearing,rbearing,hr): #draw Arc given lat/lon piviot point with the right and left bearing to draw the path and distance
    arcstr=""
    if rbearing < lbearing: #if the left bearing is already bigger than the right bearing, switch places. Test Case not proven yet! with winds coming from the east
        lbearing,rbearing = rbearing,lbearing
    while lbearing < rbearing:
        arc1,arc2 = getEndpoint(lat1,lon1,lbearing,hr) #arc1 and arc2 are lat and lon respectively 
        arcCoord = "%f,%f,0\n"%(arc2,arc1)
        arcstr+=arcCoord
        lbearing+=1 #count
    #attach the last remaining point which is the end point at the right bearing
    arc1,arc2 = getEndpoint(lat1,lon1,rbearing,hr) #arc1 and arc2 are lat and lon respectively 
    arcCoord = "%f,%f,0\n"%(arc2,arc1)
    arcstr+=arcCoord
    return arcstr

要绘制三个圆弧,这里是调用函​​数的地方:

arc3=drawArc(latitude,longitude,leBearing,reBearing,arc3hr)
arc2=drawArc(latitude,longitude,leBearing-(SOME FORMULA TO GIVE ME THE EXTRA ANGLE/BEARING TO INTERSECT WITH THE OUTER LINE),reBearing+(SAME FORMULA HERE),arc2hr) 
arc1=drawArc(latitude,longitude,leBearing-(SOME FORMULA TO GIVE ME THE EXTRA ANGLE/BEARING TO INTERSECT WITH THE OUTER LINE),reBearing+(SAME FORMULA HERE),arc1hr) 

这张图片的已知点:

  1. 原点在lat/lon

  2. 每条线的距离和方位

  3. 原点内圆半径为 10 海里,外圆为 20 海里

这是一张简化的图片,我相信角度 theta 就是我要找的东西

这是必要的几何图形,假设我正确地解释了你的描述和图片。下图(和 linked)显示了您的图片以及我们需要求解 theta 的变量。

现在,数学。这利用了sines/cosines.

的规律

余弦定律给我们:

所以我们必须求解h、g和f,然后取反余弦结果得到theta。

根据正弦定律...

我们可以用余弦定律立即求解:

要计算线段 x_1 和 x_2 的长度,我们需要角度 theta_1,2,3...

使用这些角度和更多的正弦定律可以得到 x_1 和 x_2...

把这些放在一起你就得到了

根据您对 d(或 DIST)的选择,将 替换为适当的值后,只需取 这个烂摊子。这里就不写了。