Getting distance from the base station

Discussions and questions about the Crazyradio
Post Reply
amathuri
Beginner
Posts: 6
Joined: Thu Nov 26, 2020 9:49 am

Getting distance from the base station

Post by amathuri »

Is there a way to compute how far is Crazyfile from its base station? And, a way to navigate back to the station?
kimberly
Bitcraze
Posts: 700
Joined: Fri Jul 06, 2018 11:13 am

Re: Getting distance from the base station

Post by kimberly »

I guess you could subtract the lighthouse geometry (in lighthouse_core.c) from the current state estimate? Or do you want to do a more direct measurement based on the sweepangles of the basestation?
amathuri
Beginner
Posts: 6
Joined: Thu Nov 26, 2020 9:49 am

Re: Getting distance from the base station

Post by amathuri »

Does it need a particular type of deck for it to work?
I want to see if I can write an algorithm for Crazyfile to navigate back to a fixed location.
kristoffer
Bitcraze
Posts: 369
Joined: Tue Jun 30, 2015 7:47 am

Re: Getting distance from the base station

Post by kristoffer »

If you are using the lighthouse system you need a lighthouse deck (https://store.bitcraze.io/collections/d ... oning-deck) and preferably 2 lighthouse base stations.
In this case you would know the position all the time and returning to the starting point would be as simple as a goto.
Post Reply