Example 6 Given that the center of a hyperbola is at the origin, and its foci are on the $x$-axis. A line passing through the right focus of the hyperbola with a slope of $\sqrt{\frac{3}{5}}$ intersects the hyperbola at points $P$ and $Q$. If $O P \perp O Q$, and $|P Q|=4$, find the equation of the hyperbola.
(1991 National College Entrance Examination for Science)
Let the equation of the hyperbola be $\frac{x^{2}}{a^{2}}-\frac{y^{2}}{b^{2}}=1$, and the equation of the line be $y=\sqrt{\frac{3}{5}}(x-c)$, where $c=\sqrt{a^{2}+b^{2}}$. By combining the equations of the line and the hyperbola and eliminating $y, x$ respectively, we get
$$
\begin{array}{l}
g(x)=x^{2}+\frac{6 a^{2} c}{5 b^{2}-3 a^{2}} x-\frac{3 a^{2} c^{2}+5 a^{2} b^{2}}{5 b^{2}-3 a^{2}}=0 . \\
h(y)=y^{2}+\frac{2 \sqrt{15} b^{2} c}{5 b^{2}-3 a^{2}} y+\frac{3 b^{4}}{5 b^{2}-3 a^{2}}=0 .
\end{array}
$$

By property 7, the equation of the circle with diameter $P Q$ is $g(x)+h(y)=0$.
Since $O P \perp O Q$, the circle passes through the origin, so $g(0)+h(0)=0$, which means $3 a^{2} c^{2}+5 a^{2} b^{2}-3 b^{4}=0$. Solving this, we get $b^{2}=3 a^{2}$.

Let $P\left(x_{1}, y_{1}\right), Q\left(x_{2}, y_{2}\right)$, then the midpoint of $P Q$ is $M\left(\frac{x_{1}+x_{2}}{2}, \frac{y_{1}+y_{2}}{2}\right)$. By the given condition, $|O M|=$ $\frac{1}{2}|P Q|=2$, i.e., $\left(x_{1}+x_{2}\right)^{2}+\left(y_{1}+y_{2}\right)^{2}=16$.
And $x_{1}+x_{2}=-\frac{6 a^{2} c}{5 b^{2}-3 a^{2}}=-\frac{1}{2} c, y_{1}+y_{2}=-\frac{2 \sqrt{15} b^{2} c}{5 b^{2}-3 a^{2}}=-\frac{\sqrt{15}}{2} c$.
Substituting these into (*) gives $\frac{c^{2}}{4}+\frac{15 c^{2}}{4}=16$, solving this yields $c^{2}=4$. Therefore, $a^{2}=1, b^{2}=3$. Hence, the equation of the hyperbola is $x^{2}-\frac{y^{2}}{3}=1$.