Under the polar coordinate, the unit sphere is $$ S^2=\{(\sin\theta\cos\varphi,\sin\theta\sin\varphi,\cos\theta)\in \mathbb R^3:\theta\in[0,\pi],\varphi\in[0,2\pi] \} $$ consider a non-induced metric, for example, $$ \tilde g =\begin{pmatrix} f(\theta,\varphi) &0 \\ 0 & h(\theta,\varphi) \end{pmatrix} $$ And a curve on $S^2$ $$ r(t)=(\cos t,\sin t \cos K, \sin t \sin K), t\in[0,\pi] $$ then how to calculate the length of $r(t)$? The $K>0$ is constant.
What I try: Let $$ r(\theta,\varphi)= (\sin\theta\cos\varphi,\sin\theta\sin\varphi,\cos\theta) $$ then, $$ \langle r_{\theta},r_{\theta}\rangle = f(\theta,\varphi) \\ \langle r_{\varphi},r_{\varphi}\rangle = h(\theta,\varphi) $$ Besides, I have $$ r'(t)=(-\sin t, \cos t \cos K, \cos t\sin K) $$ But I don't know how to use $r_\theta,r_\varphi$ to present $r'(t)$. Therefore, I can't calculate the $|r'(t)|_{\tilde g}$.