Skip to content

Commit

Permalink
XSens bugfix lattitude-longitude issue
Browse files Browse the repository at this point in the history
  • Loading branch information
dewagter committed May 4, 2011
1 parent 2bf0367 commit 4ee65bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions sw/airborne/modules/ins/ins_xsens.c
Expand Up @@ -291,8 +291,8 @@ void parse_ins_msg( void ) {
/* Set the real UTM zone */
gps.utm_pos.zone = (DegOfRad(gps.lla_pos.lon/1e7)+180) / 6 + 1;

lla_f.lat = (float) gps.lla_pos.lat / 1e7;
lla_f.lon = (float) gps.lla_pos.lat / 1e7;
lla_f.lat = ((float) gps.lla_pos.lat) / 1e7;
lla_f.lon = ((float) gps.lla_pos.lon) / 1e7;
utm_f.zone = nav_utm_zone0;
/* convert to utm */
utm_of_lla_f(&utm_f, &lla_f);
Expand Down
6 changes: 3 additions & 3 deletions sw/airborne/peripherals/hmc5843.c
Expand Up @@ -31,21 +31,21 @@ static void send_config(void)
hmc5843.i2c_trans.buf[1] = 0x00 | (0x06 << 2);
hmc5843.i2c_trans.len_w = 2;
i2c_submit(&HMC5843_I2C_DEVICE,&hmc5843.i2c_trans);
while(hmc5843.i2c_trans.status == I2CTransPending);
while(hmc5843.i2c_trans.status == I2CTransPending);

hmc5843.i2c_trans.type = I2CTransTx;
hmc5843.i2c_trans.buf[0] = HMC5843_REG_CFGB; // set to gain to 1 Gauss
hmc5843.i2c_trans.buf[1] = 0x01<<5;
hmc5843.i2c_trans.len_w = 2;
i2c_submit(&HMC5843_I2C_DEVICE,&hmc5843.i2c_trans);
while(hmc5843.i2c_trans.status == I2CTransPending);
while(hmc5843.i2c_trans.status == I2CTransPending);

hmc5843.i2c_trans.type = I2CTransTx;
hmc5843.i2c_trans.buf[0] = HMC5843_REG_MODE; // set to continuous mode
hmc5843.i2c_trans.buf[1] = 0x00;
hmc5843.i2c_trans.len_w = 2;
i2c_submit(&HMC5843_I2C_DEVICE,&hmc5843.i2c_trans);
while(hmc5843.i2c_trans.status == I2CTransPending);
while(hmc5843.i2c_trans.status == I2CTransPending);

}

Expand Down

0 comments on commit 4ee65bc

Please sign in to comment.