Decoding Incoming Data Using Python

Topics related to the Lighthouse positioning system, configuration and use
Post Reply
Posts: 7
Joined: Wed May 27, 2020 7:25 pm

Decoding Incoming Data Using Python

Post by barismetin »

My goal is calculate 3D confidante of the lighthouse deck using python script. I do not have crazyflie drone and I would like to just use lighthouse deck and lighthouse v2 base stations ( I have 2 of them ). I know crazyflie does this function using IMU and Kalman filter but at this point I am just interested X , Y , and Z Cartesian system coordinates.

There are useful python scripts under the tool section which allows to process incoming data from lighthouse deck.

such as, decodev2_cf and , I understand output where output of the sensors are

I have a idea about print frame it prints sensors azimuth and evaluation angles,
I am not sure about output decodev2 output and decodev2_cf my question is

What is the output of the decodev2 and

How can I find the cartesian coordinates of the lighthouse deck using decodev2 and python script
How important decodev2 and during the process of finding Cartesian coordinates
Any tips or help is really appreciated
Posts: 322
Joined: Tue Jun 30, 2015 7:47 am

Re: Decoding Incoming Data Using Python

Post by kristoffer »

I'm not sure the decoding scripts are fully functional, but it should not be too far away. I don't remember what the output is (they were changed around a few times), but you probably have to dig in to them and find a good place to print the actual sweep angles.

Lighthouse 2 uses two light planes that are tilted by 30 degrees, both sweeping horizontally. To convert from lighthouse 2 angles to lighthouse 1 angles (vertical/horizontal angles) you can look at the function ... #L219-L225

When you have horizontal/vertical angles (lighthouse 1 style) you can calculate the line that is defined by the two angles, in relation to the basestation.
Use the ... c#L63-L102 function to calculate the intersection point (or closest point) of the lines from two basestations.
Post Reply