mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-01 04:46:51 +08:00
XSens bugfix lattitude-longitude issue
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user