Calibration Function

By yangsub_song , 22 July 2011

hi forum, I`m migrating MotionApps library to a 8051 MCU. Which function should I use for calibration of the IMU3000?
MLLoadCal_V1
MLLoadCal_V2
MLLoadCal_V3
MLLoadCal_V4
MLLoadCal_V5

I`m using IAR Embedded Workbench for 8051 that supports 32 bit data types, hence our long long data type is 32 bit. How could I do with the 64-bit constants defined in the library?

Any help is welcome, thanks

andreas_muelller

14 years 8 months ago

Hello macfarli,
i'm also try to adapt the MPL for 8051. I intend to use the double type for long long calculation. BTW the version 8.20 of IAR support the long long type but the update from V 7.50 is much expensive.
But at the moment, my major problem is the code size...

BR
AD1170

phpbb Post ID
17565

yangsub_song

14 years 8 months ago

thanks ad1170 for your response.

Could somebody give me some guides or help of how to do? Such as: sequence, etc.

Did somebody can compile this library on 8051 MCU? thanks

phpbb Post ID
17568

andreas_muelller

14 years 8 months ago

I have compiled the MPL with IAR for 8051 (V7.50A). After replacing the long long with double and constants with nnnnnnn.00 instead of LL (can lead to lose of precision and take more calculation time). Furthermore i have assigned the huge automatic arrays (which can not placed on stack) to an global buffer (not sure if this work due to possible nested calls and reuse of the buffer). With this changes i can compile but the resulting code is much more than 64 kb and therefore it is not suitable for the controller (32 kb flash).
Currently i try to extract the parts of code that are necessary to initialize the library, but this is a very hard job...

BR
Bernd

phpbb Post ID
17571

safi_hafasha

14 years 7 months ago

How does the ML_BIAS_FROM_NO_MOTION work?

Gyro does drift in horizontal plane due to lack of useful accelerometer data in that plane (and due to lack of magnetometer support). I was wondering, if the gyro could be biased by tilting the device 90 degrees and to use this calibration for biasing only this degree of freedom. So is it possible to use previous known gyro bias for horizontal plane?

phpbb Post ID
17574

do_seoung

14 years 5 months ago

This may work for a no motion case, but as soon as motion occurs error will accumulate on the horizontal plane due to the the random walk of the gyro. If you initiate another no motion calibration this will correct the random walk error again.

phpbb Post ID
17577
phpbb Topic ID
13386