Let $\pi:E\to M$ be a smooth real vector bundle of rank $r$ over a smooth manifold $M$, and let $h$ be a smooth bundle metric on $E$. Let $\operatorname{Fr}(E)\to M$ denote the frame bundle whose fibre over $x\in M$ consists of all linear isomorphisms $p:\mathbb{R}^r\to E_x$, with right action of $GL(r,\mathbb{R})$ given by $p\cdot A:=p\circ A$. Define
paragraph
admin
\begin{align*}
\operatorname{Fr}_O(E,h):=\{p\in \operatorname{Fr}(E): h_x(p(a),p(b))=a\cdot b \text{ for all } a,b\in \mathbb{R}^r\}.
\end{align*}
latex_env
admin
Then $\operatorname{Fr}_O(E,h)\to M$ is a smooth principal $O(r)$-subbundle of $\operatorname{Fr}(E)\to M$.