Esempio n. 1
0
void ins_init( void )
{
    uint8_t ping[7] = {CHIMU_STX, CHIMU_STX, 0x01, CHIMU_BROADCAST, MSG00_PING, 0x00, 0xE6 };
    uint8_t rate[12] = {CHIMU_STX, CHIMU_STX, 0x06, CHIMU_BROADCAST, MSG10_UARTSETTINGS, 0x05, 0xff, 0x79, 0x00, 0x00, 0x01, 0x76 };	// 50Hz attitude only + SPI
    uint8_t quaternions[7] = {CHIMU_STX, CHIMU_STX, 0x01, CHIMU_BROADCAST, MSG09_ESTIMATOR, 0x01, 0x39 }; // 25Hz attitude only + SPI
    //  uint8_t rate[12] = {CHIMU_STX, CHIMU_STX, 0x06, CHIMU_BROADCAST, MSG10_UARTSETTINGS, 0x04, 0xff, 0x79, 0x00, 0x00, 0x01, 0xd3 }; // 25Hz attitude only + SPI
    //  uint8_t euler[7] = {CHIMU_STX, CHIMU_STX, 0x01, CHIMU_BROADCAST, MSG09_ESTIMATOR, 0x00, 0xaf }; // 25Hz attitude only + SPI


    new_ins_attitude = 0;

    ins_roll_neutral = INS_ROLL_NEUTRAL_DEFAULT;
    ins_pitch_neutral = INS_PITCH_NEUTRAL_DEFAULT;

    CHIMU_Init(&CHIMU_DATA);

    // Request Software version
    for (int i=0; i<7; i++) {
        InsUartSend1(ping[i]);
    }


    // Quat Filter
    for (int i=0; i<7; i++) {
        InsUartSend1(quaternions[i]);
    }


    // 50Hz
    CHIMU_Checksum(rate,12);
    InsSend(rate,12);

}
Esempio n. 2
0
void ins_init( void )
{
  uint8_t rate[12] = {0xae, 0xae, 0x06, 0xaa, 0x10, 0x05, 0xff, 0x79, 0x00, 0x00, 0x01, 0x76 };	// 50Hz attitude only + SPI
//  uint8_t rate[12] = {0xae, 0xae, 0x06, 0xaa, 0x10, 0x04, 0xff, 0x79, 0x00, 0x00, 0x01, 0xd3 }; // 25Hz attitude only + SPI
//  uint8_t euler[7] = {0xae, 0xae, 0x01, 0xaa, 0x09, 0x00, 0xaf }; // 25Hz attitude only + SPI
  uint8_t quaternions[7] = {0xae, 0xae, 0x01, 0xaa, 0x09, 0x01, 0x39 }; // 25Hz attitude only + SPI

  CHIMU_Checksum(rate,12);

  new_ins_attitude = 0;

  ins_roll_neutral = INS_ROLL_NEUTRAL_DEFAULT;
  ins_pitch_neutral = INS_PITCH_NEUTRAL_DEFAULT;

  CHIMU_Init(&CHIMU_DATA);

  // Quat Filter
  for (int i=0;i<7;i++)
  {
    InsUartSend1(quaternions[i]);
  }








  // 50Hz
  for (int i=0;i<12;i++)
  {
    InsUartSend1(rate[i]);
  }

}