remove magnetometer and barometer, position ok?

All discussions related to the Loco Positioning system
Post Reply
justinleeyang
Expert
Posts: 186
Joined: Mon Dec 28, 2015 5:07 am

remove magnetometer and barometer, position ok?

Post by justinleeyang »

hi,

If we remove the magnetometer and barometer, only with acc, gyro and LPS's distance data, we can get the crazyflie2's position ?
I see that the mag and baro is optional, the following code:

Code: Select all

#define SENSORS_ENABLE_PRESSURE_LPS25H
#define SENSORS_ENABLE_MAG_AK8963
if I remove the two lines code, maybe affect the position's result ?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: remove magnetometer and barometer, position ok?

Post by arnaud »

Hi Justin,

The pressure sensor and magnetometer are not used by default by the Kalman filter. The pressure sensor could help but is a bit noisy and the magnetometer is more questionable indoor (it will be affected a lot by external magnetic fields).

So the answer is YES, you get a position without magnetometer and pressure sensor, it is the position you have been getting with the Kalman filter in its default configuration.

/Arnaud
justinleeyang
Expert
Posts: 186
Joined: Mon Dec 28, 2015 5:07 am

Re: remove magnetometer and barometer, position ok?

Post by justinleeyang »

hi, arnaud:

Got it, thanks!

In addition, default need 6 anchors, if I use 4 anchors, do crazyflie2 get the 3D position ? I know that the convex hull will be small, but I want to
get the position with as few anchors as possible, the minimum anchors is 4 ?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: remove magnetometer and barometer, position ok?

Post by arnaud »

For TWR (ToA) the minimum is 3, for TDoA the minimum is indeed 4, however in TDoA case you will get very bad positioning outside the convex hull. Depending on how you place your anchors you might be able to optimize the system to get good 2D estimates (a bit like gps: with overhead satelites/anchors we get good X/Y position and worse Z position).
justinleeyang
Expert
Posts: 186
Joined: Mon Dec 28, 2015 5:07 am

Re: remove magnetometer and barometer, position ok?

Post by justinleeyang »

Got it, thanks!
justinleeyang
Expert
Posts: 186
Joined: Mon Dec 28, 2015 5:07 am

Re: remove magnetometer and barometer, position ok?

Post by justinleeyang »

hi, arnaud:

another question, do you test the positioning accuracy with lps, acc and gyro throught EKF ?
maybe <=5cm ?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: remove magnetometer and barometer, position ok?

Post by arnaud »

Hi Justin,

I think some test has been done with a Kalman filter that indicates about +/-10cm accuracy in X/Y and a bit more in Z. Though I do not have the data available so I am not completely sure of it, but it a reachable ballpark. With some calibration and more anchor better accuracy might be reachable.

/Arnaud
justinleeyang
Expert
Posts: 186
Joined: Mon Dec 28, 2015 5:07 am

Re: remove magnetometer and barometer, position ok?

Post by justinleeyang »

hi, arnaud:

about +/-10cm accuracy in X/Y and a bit more in Z, is the LPS's position method TWR or TDoA ?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: remove magnetometer and barometer, position ok?

Post by arnaud »

With TWR uising 6 anchors with no further calibration, there has been no formal measurement of TDoA yet.
Post Reply