delay(2000); //lets some time to GPS module to init
Serial.begin(38400);
//set GPS dynamic platform to "pedestrian" seems to be best for copter
PROGMEM prog_uchar conf2[]={0xB5, 0x62, 0x06, 0x24, 0x24, 0x00, 0xFF, 0xFF, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x10, 0x27, 0x00, 0x00, 0x05, 0x00, 0xFA, 0x00, 0xFA, 0x00, 0x64, 0x00, 0x2C, 0x01, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x82};
Serial.write (conf2,sizeof(conf2));
delay(300);
//disable all default NMEA messages
PROGMEM prog_uchar conf3[]={0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0xF0, 0x05, 0x00, 0xFF, 0x19};
Serial.write (conf3,sizeof(conf3));
delay(100);
PROGMEM prog_uchar conf5[]={0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0xF0, 0x03, 0x00, 0xFD, 0x15};
Serial.write (conf5,sizeof(conf5));
delay(100);
PROGMEM prog_uchar conf6[]={0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0xF0, 0x01, 0x00, 0xFB, 0x11};
Serial.write (conf6,sizeof(conf6));
delay(100);
PROGMEM prog_uchar conf7[]={0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0xF0, 0x00, 0x00, 0xFA, 0x0F};
Serial.write (conf7,sizeof(conf7));
delay(100);
PROGMEM prog_uchar conf8[]={0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0xF0, 0x02, 0x00, 0xFC, 0x13};
Serial.write (conf8,sizeof(conf8));
delay(100);
PROGMEM prog_uchar conf9[]={0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0xF0, 0x04, 0x00, 0xFE, 0x17};
Serial.write (conf9,sizeof(conf9));
delay(100);
//enable UBX messages POSLLH, SOL, STATUS and VELNED as is in EOSBandi's config file
PROGMEM prog_uchar conf10[]={0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0x01, 0x02, 0x01, 0x0E, 0x47};
Serial.write (conf10,sizeof(conf10));
delay(100);
PROGMEM prog_uchar conf11[]={0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0x01, 0x03, 0x01, 0x0F, 0x49};
Serial.write (conf11,sizeof(conf11));
delay(100);
PROGMEM prog_uchar conf12[]={0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0x01, 0x06, 0x01, 0x12, 0x4F};
Serial.write (conf12,sizeof(conf12));
delay(100);
PROGMEM prog_uchar conf13[]={0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0x01, 0x12, 0x01, 0x1E, 0x67};
Serial.write (conf13,sizeof(conf13));
delay(100);
//set rate to 5Hz
// Der Chip kann nur alle 200ms neue Daten liefern.
//wer auch 10HZ stellt, bekommt immer 2mal hintereinander die selben Daten.
PROGMEM prog_uchar conf15[]={0xB5, 0x62, 0x06, 0x08, 0x06, 0x00, 0xC8, 0x00, 0x01, 0x00, 0x01, 0x00, 0xDE, 0x6A};
Serial.write (conf15,sizeof(conf15));
// set serial to 115200
PROGMEM prog_uchar conf1[]={0xB5, 0x62, 0x06, 0x00, 0x14, 0x00, 0x01, 0x00, 0x00, 0x00, 0xD0, 0x08, 0x00, 0x00, 0x00, 0xC2, 0x01, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC4, 0x96};
Serial.write (conf1, sizeof(conf1));
delay(1000);
Serial.end();
delay(500);
Serial.begin(115200); //bei jedem Booten wird der GPS Empfänger jetzt passend Konfiguriert
delay(100);