-
Grant Giansanti authoredGrant Giansanti authored
title: Lighthouse angle conversion
page_id: lh_angle_conversion
One way to get started with lighthouse 2 is to create a conversion from lighthouse 2 angles to lighthouse 1 angles, and use the functionality that has already been implemented for lighthouse 1. Even though it is an easy way to get started, the main drawback is that we need both sweeps for the conversion. Lighthouse 1 angles are also easier to understand and can be a useful debugging tool.
Lighthouse 1 to lighthouse 2
Start from the measurement model for the kalman filter.
For a point
where
this leads to
or
where
Lighthouse 2 to lighthouse 1
The strategy when creating an equation to convert from lighthouse 2 sweep angles to lighthouse 1, is to find the intersection line between the two light planes. From the intersection line we can easily calculate the lighthouse 1 sweep angles.
The following calculations are all in the base station reference frame.
Assume we know the normals for the two light planes,
Normals of the light planes
Start by figuring out the normals when
The rotation matrix is
and the resulting normals
where
The intersection vector
Lighthouse 1 angles
Finally we can calculate the lighthouse 1 angles
$$ \begin{cases} \alpha^{lh1}_1 = \tan^{-1}(\frac{-\sin{(t)}\cos{(t)}(\sin{(\alpha^{lh2}_1)} + \sin{(\alpha^{lh2}_2)})}{-\sin{(t)}\cos{(t)}(\cos{(\alpha^{lh2}_1)} + \cos{(\alpha^{lh2}_2)})})\
\alpha^{lh1}_2 = \tan^{-1}(\frac{\cos^2{(t)}(\sin{(\alpha^{lh2}_1)}\cos{(\alpha^{lh2}_2)}-\cos{(\alpha^{lh2}_1)}\sin{(\alpha^{lh2}_2)})}{-\sin{(t)}\cos{(t)}(\cos{(\alpha^{lh2}_1)} + \cos{(\alpha^{lh2}_2)})}) \end{cases} $$
$$ \begin{cases} \alpha^{lh1}_1 = \frac{\alpha^{lh2}_1 + \alpha^{lh2}_2}{2}\
\alpha^{lh1}_2 = \tan^{-1}(\frac{\sin{(\alpha^{lh2}_2 - \alpha^{lh2}_1)}}{\tan{(t)} (\cos{(\alpha^{lh2}_1)} + \cos{(\alpha^{lh2}_2)})})\end{cases} $$