[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] Altitude estimation wiht BMP-sensor

From: Rolf Noellenburg
Subject: Re: [Paparazzi-devel] Altitude estimation wiht BMP-sensor
Date: Sun, 31 Jul 2011 15:53:37 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv: Gecko/20110616 Thunderbird/3.1.11

Hello Heinrich,

I'm using a SPC1000 for hight detection and had the same problems.
I did the following, but there might have been an easier way(?):
First I copied and renamed the bar_scp-files and modifyied the resulting baro_scp_rn.c-file according to baro_ets-files in order to receive a hight in addition to the pressure and temp. Like you experienced, some mixing of Baro and GPS altitude occured the estimator.c (line 216 - 219):

#ifndef USE_BARO_ETS
  float falt = gps.hmsl / 1000.;

So I changed line 216 to

//probably better way: #ifndef USE_BARO_ETS || USE_BARO_SCP_RN

The delay of the varo versus GPS altitude happes because of unmatched Kalman values. If no modification of the estmator.c is done, it looks like this (line 149 - 166):

#ifdef USE_BARO_MS5534A
  if (alt_baro_enabled) {
    DT = BARO_DT;
    R = baro_MS5534A_r;
    SIGMA2 = baro_MS5534A_sigma2;
  } else
#elif defined(USE_BARO_ETS)
  if (baro_ets_enabled) {
    R = baro_ets_r;
    SIGMA2 = baro_ets_sigma2;
  } else
    DT = GPS_DT;
    R = GPS_R;

I added the following:

#elif defined(USE_BARO_SCP_RN)
  if (baro_scp_enabled) {
    R = baro_scp_r;
    SIGMA2 = baro_scp_sigma2;

So I had to add in the baro_scp_rn.h (I'm using the 9Hz mode):
#define BARO_SCP_DT .1111

and in the baro_scp_rn.c:
#define BARO_SCP_R .01
#define BARO_SCP_SIGMA2 1

With this changes I'm getting rather noisy but quick z and z_dots out of the estimator.

Hope this were all the changes I did and that it helps.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]