Page 1 of 1

Cf2 sets anchor address in TDOA3 mode

Posted: Tue Nov 27, 2018 7:53 am
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??? :?:

Re: Cf2 sets anchor address in TDOA3 mode

Posted: Wed Nov 28, 2018 8:59 am
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.

Re: Cf2 sets anchor address in TDOA3 mode

Posted: Wed Nov 28, 2018 9:57 am
by skeletonSir
So TDOA3 can't write static XYZ in your code, it can only write through a python client. Right?

Re: Cf2 sets anchor address in TDOA3 mode

Posted: Wed Nov 28, 2018 10:35 am
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.

Re: Cf2 sets anchor address in TDOA3 mode

Posted: Wed Nov 28, 2018 10:55 am
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:

Re: Cf2 sets anchor address in TDOA3 mode

Posted: Wed Nov 28, 2018 2:53 pm
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.

Re: Cf2 sets anchor address in TDOA3 mode

Posted: Thu Nov 29, 2018 1:44 am
by skeletonSir
Thank you, please show me how to configure anchor coordinates with serial menu.

Re: Cf2 sets anchor address in TDOA3 mode

Posted: Thu Nov 29, 2018 6:40 am
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.