先用坐標表示兩段航向
建立坐標系並寫出兩段航向
船的航向修正角,就是修正前、後兩個行進方向向量的夾角。
以甲港口為原點 $O(0,0)$,正東方為 $x$ 軸正向、正北方為 $y$ 軸正向,建立平面直角坐標系。則船的初始位置為 $A(27, 8)$,航標位置為 $B(2, 3)$。
船原本由 $A$ 駛向 $B$,行進方向向量為
$$\overset{\large\rightharpoonup}{AB} = (2-27,\ 3-8) = (-25, -5)$$
可取方向向量 $\overset{\large\rightharpoonup}{u} = (-5, -1)$。
到達 $B$ 點後,船轉向駛入港口 $O$,此時的行進方向向量為
$$\overset{\large\rightharpoonup}{BO} = (0-2,\ 0-3) = (-2, -3)$$
再計算兩方向的夾角
求兩方向的夾角
設航向修正的左轉角度為 $\theta$,即向量 $\overset{\large\rightharpoonup}{u}$ 與 $\overset{\large\rightharpoonup}{BO}$ 的夾角:
$$\cos \theta = \dfrac{\overset{\large\rightharpoonup}{u} \cdot \overset{\large\rightharpoonup}{BO}}{\left|\overset{\large\rightharpoonup}{u}\right| \left|\overset{\large\rightharpoonup}{BO}\right|} = \dfrac{(-5)(-2) + (-1)(-3)}{\sqrt{(-5)^2 + (-1)^2}\sqrt{(-2)^2 + (-3)^2}} = \dfrac{13}{\sqrt{26}\sqrt{13}} = \dfrac{1}{\sqrt{2}}$$
因為 $\cos \theta = \frac{1}{\sqrt{2}}$ 且 $\theta$ 為銳角,故 $\theta = 45^\circ$。
所以船在航標處的航向修正應向左轉 $45^\circ$。