Source:

Recipe to get Crius GPS + I2C Nav board to work

This method modifies the software on the small i2c nav board, that it configures the GPS correctly at every power on. It is done with arduino 1.01. The connection is done via FTDI. There are no pins soldered to the i2c nav board, but the connector is there (6 pins in a row).
The gps exists in 2 versions:
V1. without the ability to store settings permanently (with the onboard battery lifetime of settings is typically fom hours to some days)
V2. can store settings permanently in an onboard eeprom. The rest should be identical
remark V2: some people reporting that rx/tx ifi2cmay be swapped on i2c board. If you see continously increasing i2c error or garbage data from the sensors, try to swap the two wires
Recipe for V1:
1. Download this version of firmware for i2c nav board:Download
either (Try 2a. If it does not work at every power on of copter, try version 2b, look below for reason)
2a. unmodified gps
or
2b. solder a bridge between pin 13+14 of gps board (picture included in download), set GPS_SERIAL_SPEED 38400 in I2c config.h
3. use arduino1.01to flash i2c_nav with downloaded version (use FTDI)
4. update fc multiwii 2.1 or later with activated #define I2C_GPS and your magnetic declination in config.h of multiwii round up to next full degree, but consider sign
5. connect everything
6. If GPS sends valid frames, LED on I2C nav board should blink 100ms on/1s off
7. Calibrate and switch on mag! Check that that copter orientation in the gui follows exactly the direction of the copter itself.
8. Go *outside*
9. connect battery -> after about one minute (depending on reception quality), the led on i2c board starts flashing 3 times in intervals
10. it works!***
Recipe for V2:
1. Download this version of firmware for i2c nav board:Downloadand extract it
2. Download u-center from ublox website
3. Read manual of u-center
4. Start u-center and configure your GPS (File->GPS) with "u-config-v2.txt" of my rar archive and make settings *permanent*
GPS is now set up with ublox binary protocol and 115200 baud
5. Edit config.c of my I2c nav code:
set
#define GPS_SERIAL_SPEED 115200
comment out:
//#define NEO6_NOT_CONFIGURED_AT_POWERON
6. use arduino1.01to flash i2c_nav (use FTDI)
7. update fc multiwii 2.1 or later with activated #define I2C_GPS and your magnetic declination in config.h of multiwii round up to next full degree, but consider sign
8. connect everything
9. If GPS sends valid frames, LED on I2C nav board should blink 100ms on/1s off
10. Calibrate and switch on mag! Check that that copter orientation in the gui follows exactly the direction of the copter itself.
11. Go *outside*
12. connect battery -> after about one minute (depending on reception quality), the led on i2c board starts flashing 3 times in intervals
13. it works!***
** Version 2a works, but.... some people (including me) have problems, that they have to switch power off and on again once. Doesn't work for them at first power on. I switched to version 2b. I am running this board for weeks now, no hangs at power up any more.
Extra features in this version (19.10.2012):
- configure ublox6-m to use binary mode, 5 Hz, 115200 baud, EGNOS, profile pedestrian -> changed GPS back to 5 Hz after I discovered, that it simply sends same data twice at 10 Hz.
- limit speed in Position Hold mode
- remove D term of PH rate
- inserted blink mode of LED: blink 100ms/1s indicating reception of valid frames from GPS, but still no lock
- PH and RTH were switched permanently off, when gps reception has a degration of only one measurement. Now resumes functionality, when gps signal is ok again.
- Changed default expected baud rate of gps to 9600 (GPS_SERIAL_SPEED in config.h)
Since some people including me broke off the antenna connector of the GPS, I suggest to everyone to put the GPS it in a shrink tube, works fine. No issue with reception...
Fix for bug in Multiwii 2.1+ (latest development version have now this fix):
The pids for gps navigation are transferred to i2c nav board, when this is not initialized completely. Then you are using default pids every time, changes are not recognized. You have to change the following code in GPS.ino of multiwii 2.1+ (insert lines in red).
void GPS_NewData() {
uint8_t axis;
#if defined(I2C_GPS)
static uint8_t GPS_pids_initialized;
static uint8_t _i2c_gps_status;
...
...
if (_i2c_gps_status & I2C_GPS_STATUS_NEW_DATA) { //Check about new data
if (GPS_update) { GPS_update = 0;} else { GPS_update = 1;} //Fancy flash on GUI
if (!GPS_pids_initialized) {
GPS_set_pids();
GPS_pids_initialized = 1;
}