ArduIMU 1.8.1 Posted

I posted an update to the ArduIMU. If someone else is working on this, please feel free to email me happy@happykillmore.com.

http://code.google.com/p/ardu-imu/downloads/detail?name=ArduIMU_1_8_1.zip&can=2&q=

Fixes in this post:

1) NMEA protocol now works (typos in update function and missing PMTK in init function)

2) Magnetometer works (typo in setup where it said MAGNETOMETER == 1 where it should have said USE_MAGNETOMETER == 1, AP_Compass must be changed to APM_Compass, Buffer mapping differs from AP2.7 and older code in AP_Compass.cpp)

3) Added blinking lights function to GPS parsing routine (blinks when there is no lock but valid message from GPS unit)

4) Added #define GPS_CONNECTION 0 // 0 for GPS pins, 1 for programming pins (this allows the user to select where the GPS is connected)

Please note that this isn't considered an "official" release and it may well get deleted... I didn't check with anyone before making these changes and posting this :)

Known issues with this version:

1) When selecting BINARY output, GPS light will not blink (#3 above). Simple fix: Add if (GPS.fix >= 1) to a new line 129 of output.pde

2) Removing/disconnecting GPS will not disable GPS lock light.

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Yves, they show that on the ArduPilot Mega wiki but not on the Arducopter Wiki... not sure why

    http://code.google.com/p/ardupilot-mega/wiki/Magnetometer
    http://code.google.com/p/ardupilot-mega/wiki/Airspeed
  • Wow, how did you find that?

    http://code.google.com/p/arducopter/source/detail?r=670

    I did try to download the "whole directory" since right clicking on the APM_Compass folder and selecting anything didn't seem to re-download the contents.
  • Hello, would it not also interesting to show the mounting of the magnetometer and the pressure sensor in Wiki?
  • Developer
    there does seem to be something wrong with downloading file for APM_Compass library. I think you may have accidentally created a file called "*.*". That causes troubles at least for me when trying to download the library.

    http://code.google.com/p/arducopter/source/detail?r=670

    I'll look for other issues as well.
  • To recap my changes to the blinky lights:

    Blue light off: GPS is not connected, is not sending messages, the wrong baud rate or protocol has been selected.
    Blue light blinking: Valid messages are being received but no GPS lock yet. Blink rate is close to 1/2 the Hz of the GPS messages. Any messages sent faster than 8Hz will have a possibly negative effect on the parsing routines. Chances are good they will overflow the input buffers and more messages will be lost because of it.
    Blue light solid: GPS Lock

    Additionally, when the GPS messages are not received for a 1/2 second the blue light will turn off.
  • I'm having a number of problems. Some of which are my inexperience with SVN.

    1) I cannot get my APM_Compass folder to "SVN Update." I've tried running the clean up on the folder but it just bombs. So instead I've just gone into the trunk and viewed the raw file and copied and pasted.

    2) When I posted this I was going round and round with problems getting the code I had working earlier this evening to work with my changes to the GPS.h and GPS.cpp files. Turns out my code worked fine. It is #3 that's the problem.

    3) rmachay's changes to APM_Compass.cpp and APM_Compass.h are completely incompatible with anything...as near as I can tell. Simply "including" the .cpp file causes my ArduIMU to crash right around the Analog_Init function call. I haven't had time to try and go back to the original 1.8 source and add his APM_Compass files to see if it's a conflict with my code changes or not.

    So at this point, #1 I'm not all that worried about. #2 is mostly a non-issue. #3 I've got to get some sleep so I can't debug this issue.

    I have Committed my changes to the GPS files and I've sent my updated arduimu.pde to Doug....
    Not.so: Scam, fraud and hoax information portal.
    A list of high quality sites dealing with scams, spam, hoaxes, fraud and misinformation.
  • 3D Robotics
    Happy: Are you getting SVN errors or something else?
  • I'm still working on the missing code for "lost connection" with the GPS. Trying to add it to the GPS.cpp without success....
  • Developer
    HK, thanks for the bug fixes. Can you please add them to the repository trunk code. Looks like they are only in the download .zip.
  • This is great. The two things I found most confusing when working with this code was how to set the flags and why we have to divide and multiply things like the altitude and ground speed by 100. HappyK's emulator makes it incredibly easy to debug, however, because you can see the gps strings that are going into the IMU and then watch what values come out.
This reply was deleted.