XSens bugfix lattitude-longitude issue

This commit is contained in:
Christophe De Wagter
2011-05-04 15:56:16 +02:00
parent 2bf0367eb5
commit 4ee65bc49f
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -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);
+3 -3
View File
@@ -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);
}