@cek Thankyou!
Seems I managed to confuse myself during initial testing - AHRS does report mag based heading straight off
Thankyou for pointers to relevant code & reminder.
I have code working, have created my own messages & and have completed mag calibration - very happy.
Posts made by Richard
@Li-YiFan
Regarding compass output - the IMU and AHRS code don't seem to initalise the heading from the magnetic sensor. The heading direction is set to 0.00degrees at the power on position.
I haven't yet had the chance to try - but I presume that by having a GPS attached, and some motion of the body - then the North direction would be resolved.
I notice in the code that there is an option of (algorithm.h)
// Define heading initialization reliability
#define HEADING_UNINITIALIZED 0
#define HEADING_MAG 1
#define HEADING_GNSS_LOW 2
#define HEADING_GNSS_HIGH 3
But there doesn't appear to be any code to handle the MAG case.
I presume I would need to add in some of the code from the Compass example to initialise the heading, or is there an easier way??
@Li-YiFan
I played around with the prebuilt demo code in the IMU a little
(V1.0.0 As available from developers.aceinna.com/code/apps),
and discovered that the data fields in it requires an 'endian swap'.
(& for anyone interested - the payload is sort of spec'd in "UserMessaging.c" in the zipfile you provided.)
I eventually decided that it was easier to modify the AHRS code to output 'e1' messages at my desired data rate - than persist with the Compass Code.
(I have the dev kit to do this) That is working nicely for me.
Thank you for your help!
I want to bring data into a data logger via simple serial connection, and initially just need a basic Roll/Pitch/Yaw for development, later on we might customise the IMU application.
The 'Compass' demo app from the developer website sends a 'C1' message out the serial port (SCK & MOSI pins), without needing to configure anything, whereas the AHRS and IMU don't send serial without configuration commands via the USB serial port (I think?)
I can't find a specification of the contents of the C1 message - nor can I locate the source code to look it up. I would expect the definition of the message would be in the .json file.
Could you point me to a definition of the file (data and scaling)?
also, is the example code available?
Ta!
Your Data sheets show different figures for the Mag sensor in the RI and ZA part.
RI suggests +/- 400,000nT and 30nT resolution (my guess perhaps 15/16bit ADC)
ZA suggests +/-800,000nT and 500nT resolution (My guess perhaps 12 bit ADC)
Is this correct (That the ZI has better resolution) - or does that represent 'old' hardware designs?
I'm interested in the raw performance of the Mag sensor - as I would like to make use of the mag data separately, in addition to the solution for attitude. (I will probably not use the Mag as part of the attitude computation)
Is it possible for you give me some kind of indication of Mag X/Y/Z zero offsets, and relative scale errors, (and maybe orthogonality of axes?).
R