Not everything went well so far. Not getting ICM-20948 to work with Flig so far was the greatest disappointment so far. First mistake I've done was to bury it inside - over strong, metal cased servos (with strong magnets in motors). Original idea was to use the sensor's compass for absolute orientation. Compass is inherently very slow and noisy sensor input, but if needed to tell us general 90º orientations it could work well. With VL53L5CX doing fine refinements within couple of degrees of a wall Flig looks at, ICM-20948 was supposed to give rough orientation - tell us which wall it was looking at. But, results of reading compass in room full of electromagnetic emissions and in place I've just described didn't work.
Compass would return some very strangely imprecise results - almost like it would fold in itself or some parts of the rotations having very little effect on it and some strangely large. And results weren't repeatable. All in all I had to abandon that idea as running out of time.
Next problem was reading gyroscope. Gyroscope is supposed to be quite precise and relatively stable input of data. Main downside is that at intervals I can read it (15-30Hz), without extra calibration and temperature compensations it could drift. And would drift a lot. Still, drifting should appear over time and having at least one relatively stable input of position (again VL53L5CX looking at a wall) that drift could be brought to control and fixed.
But, something went wrong - in code, calculation of 'mid-point' (collecting data over couple of seconds) or somewhere else - I wouldn't know. Reading from gyro would always go relatively quickly to one direction. Or another. No matter how long time interval I picked for collecting mid-point while Flig was patiently waiting still it would drift quite significantly. It ended up being unusable and I have abandoned it as well.
Now, it ended up being project on its own - to return back to the code and try to figure out what went wrong.
Only thing that didn't fail was accelerometer. It was still pointing duly to the ground at around 10m/s (1G) and I am hoping to use it in the future to detect one of two things: Flig falling and Flig being lifted. The former in order to bring in behaviour which would make it try to get up and the latter which would make it stop doing what it was doing.