Ciao to everybody, just want you to know that today I finally made my EM406, ArduIMU and Ardupilot work together with a simple trick. From http://seniord.ece.iastate.edu/dec0803/manuals/EM-406%20Product_Guide1.pdf we see that the output baud rate of the infamous EM406 is 4800 bps. Adjusting the code for arduIMU, ardupilot to work at 4800 everything works very fast, ever without the "first time" GPS locking procedure. All right.The only problem is that one might desire a higher than 4800 output rate. Argh, I am a very newbie to arduino and I am still searching for the solution.
UPDATE!
So, with the help of Hopslink, I finally got it all working.
This made my arduIMU connect with the so-hatred EM406 module without using the NMEA protocol.
If you make arduPilot communicate with arduIMU @ 38400 bps you're really done. That's it.
Comments
hopslink, I will go through my configuration once more when I get home, I will report back tonight.
If you are still having issues post your configuration settings.
All the best!
There are some changes required, depending on what the development team view as the best way forward.
The issue is the latest IMU 1.7 code never initialises the EM406 to binary mode (that I can see, and if it does it sets it to 57k where the IMU/AP combination is set for 38k). Code to do the setup is there but it doesn't seem to be called.
The fix supplied changes the EM406 initialisation code to set it to 38k when used with the IMU, and calls that code during IMU setup. This seems the logical way forward since it is transparent to the user, requiring no extra user settings for various data rates in the IMU/AP code. That is based on the assumption that the 57k EM406 rate is a legacy setting from old AP versions and not an absolute requirement (but it seems to be working ok).
Provided these changes do not break anything for Ublox users I would look to include them, or some better solution, in the IMU code. Obviously that is a choice for the development team.
TimL's suggestion about changing the ArduPilot EM406 rate to match seems a good idea too as it saves users having to change telemetry settings for anything other than NMEA GPS types.
It is also tricky to keep switching the baud rate of the xbee when using em406 on the ardupilot or via the imu.
So to my mind two things would make the confusion go away and also make life easier
1) Auto set the 406 baud rate in the imu 406 code
2) Alter the 406/serial code in the ardupilot to use the same speed as the imu (regardless of using thermopiles or imu)
This means that switching between 406/imu and 406/ardupilot is just a matter of altering the published imu/ardupilot code settings + upload
Thanks