- Modified ArduPilot2.6 and ArduIMU to do interprocessor communications via TWI to free up USART for full-duplex serial comm's between ArduPilot and GCS; can upload PID coefficients in flight. IPC code example: twi_stuff.zip
- Test flown in manual and stabilize modes, IMU appears to be consistently and accurately reporting attitude.
- Stabilize mode is solid with no oscillations using default PID coeff's, but need a way to trim pitch; taildragger isn't at cruise pitch attitude when IMU is initialized.
- Using SUP500 GPS module from SparkFun; altitude values off by up to 100 meters (field elevation 1800m). GPS frequently reports altitude of 1700m at pattern height (0-20m AGL). Also seeing huge intermittent (1 second duration) errors in lat,lon on the order of +/- 2 degrees. I don't think I screwed up the NMEA parser...
- Also switched to a Serial library which performs buffered transmits. This seemed to solve some problems caused by the standard library's blocking writes. HardwareSerial.zip
You need to be a member of diydrones to add comments!
Comments
Two 10 minute flights today with solid performance in stabilize and FBWA modes. GPS tracks look good when the SUP500 is locked (no fix for entire second half of first flight), but groundspeed still seems erratic. Airspeed looks good though (max 40 kts, cruise about 24, final approach at 14), so next test will be FBWB with autopilot controlling airspeed with throttle. FBWA definitely makes it easy to fly and should be great for reducing pilot workload during aerial photography.
We (NC State University Aerial Robotics) love our (modified) red 8' telemasters.
*goes back to lurking*
I also forgot to mention that there is (at least) one other change needed to use TWI. This code in setup() of Ardupilot_2_6.pde is required for initialization:
_________________________________________________________
Wire.begin(ARDUPILOT_ADDR); // join i2c bus
Wire.onReceive(twiRcvEvent); // register slave device event handler
__________________________________________________________
and of course it looks like this in arduimu.pde:
Wire.begin(ARDUIMU_ADDR); // join i2c bus
Wire.onReceive(twiRcvEvent); // register slave device event handler
Also keep in mind that while the ArduIMU to ArduPilot connection has been tested in flight, this was only using manual and stabilize modes. It will be at least a week before I begin to test FBW and higher modes.
Does anyone know why hyperlinks and file attachments don't work for me in comments? I've tried Google Chrome and Internet Explorer; links seem to appear as correct HTML but don't show up in comment.
I uploaded my HardwareSerial library (link above in last bullet). It's code written by Kiril Zyapkov (). I was able to size the TX buffer at 256 bytes since using Flash memory for print strings freed up so much RAM, but it only needs to be as large as your largest message (32 or 64 should be enough). I added a "blockingWrite" method and state variable to control whether writes block when the buffer is full. The Flash library is at . It makes declaring a flash string as simple as F("string"), but I think it also depends on the Streaming library also at Arduiniana.
--Mark
Jason
Now that you mention it, the SUP500 is much slower to achieve lock than the EM406 was.