Cf2 sets anchor address in TDOA3 mode

Discussions about all things Bitcraze
Post Reply
skeletonSir
Beginner
Posts: 19
Joined: Thu Mar 22, 2018 6:34 am

Cf2 sets anchor address in TDOA3 mode

Post by skeletonSir »

I find that the code in crazyflie firmware, the TDOA3 schema code that does not write anchor XYZ, can only be written with python clients??? :?:
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Cf2 sets anchor address in TDOA3 mode

Post by arnaud »

The anchor position is set using LPP packets. The Crazyflie act as an LPP bridge: there is a CRTP packet that can be used to send LPP packet to the system, the packets are generated on python side and sent by the Crazyflie. There is a documentation of the LPP protocol on the wiki: https://wiki.bitcraze.io/doc:lps:lpp#ma ... _protocols.
skeletonSir
Beginner
Posts: 19
Joined: Thu Mar 22, 2018 6:34 am

Re: Cf2 sets anchor address in TDOA3 mode

Post by skeletonSir »

So TDOA3 can't write static XYZ in your code, it can only write through a python client. Right?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Cf2 sets anchor address in TDOA3 mode

Post by arnaud »

TDoA3 is designed to get the anchor position from the anchor and not from a static list so you need to have the anchor position written in the anchor and that is done by sending LPP packets to the anchors. Though it would not be very hard to modify the TDoA3 algorithm to get the anchors position from a static list instead of using the information from the anchor packet.
skeletonSir
Beginner
Posts: 19
Joined: Thu Mar 22, 2018 6:34 am

Re: Cf2 sets anchor address in TDOA3 mode

Post by skeletonSir »

Can the current anchor position be written to the anchor point while burning the anchor point program?I want to skip the python client :lol:
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Cf2 sets anchor address in TDOA3 mode

Post by arnaud »

Not in the current state, it would not be so hard to add to the anchor serial port configuration menu but it has not been done yet. If you are interested about implementing it I can give you some pointers of where to look.
skeletonSir
Beginner
Posts: 19
Joined: Thu Mar 22, 2018 6:34 am

Re: Cf2 sets anchor address in TDOA3 mode

Post by skeletonSir »

Thank you, please show me how to configure anchor coordinates with serial menu.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Cf2 sets anchor address in TDOA3 mode

Post by arnaud »

To implement a new menu, I think the code should be very similar to setting the id: https://github.com/bitcraze/lps-node-fi ... ain.c#L234 and https://github.com/bitcraze/lps-node-fi ... ain.c#L315.

One difference is that you will need to add states for X,Y,Z and you will need to add a new fonction to main.c to write the position in the EEPROM. There is already code for that in lpp.c: https://github.com/bitcraze/lps-node-fi ... .c#L54-L61.
Post Reply