Altitude hold problem
Altitude hold problem
In my Quad when i use
dev20110725, version, the altitude hold is working reasonably.
while when i use Multiwii 1.8 patch2, or Multiwii 1.9, it works but jumps up and down.
Attached pl find the screen shot of Mutiwi configurator with
1. dev20110725
2. Multiwii ver 1.8 patch2
pl note that with dev20110725 the ALT value displayed is 207.88
while with Multiwii ver 1.8 patch2/ 1.9 it is 864.20
My "debug 2" is always zero.
is this normal? or is this the reason why it is not working.
Also, i had to comment the line" Trusdted accelerometer" for the stable mode to work?
For altitude hold, does the " Trusted accelerometer" have to work? i do not think so since with dev20110725 it was reasonably working.
or with Multiwii 1.9, is there a systematic PID tuning required. Can some body give me a pointer for this.?
your kind help appreciated.
dev20110725, version, the altitude hold is working reasonably.
while when i use Multiwii 1.8 patch2, or Multiwii 1.9, it works but jumps up and down.
Attached pl find the screen shot of Mutiwi configurator with
1. dev20110725
2. Multiwii ver 1.8 patch2
pl note that with dev20110725 the ALT value displayed is 207.88
while with Multiwii ver 1.8 patch2/ 1.9 it is 864.20
My "debug 2" is always zero.
is this normal? or is this the reason why it is not working.
Also, i had to comment the line" Trusdted accelerometer" for the stable mode to work?
For altitude hold, does the " Trusted accelerometer" have to work? i do not think so since with dev20110725 it was reasonably working.
or with Multiwii 1.9, is there a systematic PID tuning required. Can some body give me a pointer for this.?
your kind help appreciated.
Re: Altitude hold problem
hello friends,
pl kindly reply to this problem of mine.
thanking you
pl kindly reply to this problem of mine.
thanking you
Re: Altitude hold problem
What sensors are you using ???
Tell a little about your hardware.
BR - KH
Tell a little about your hardware.
BR - KH
Re: Altitude hold problem
hello Kalle123,
I have made my own board. Attched pl find the Picture.
I use
ITG3200
BMA180
BMP085
HMC5883
1.5 K pull up for the I2C lines.
Level convereter
On board 5V and 3.3V regulator
No errors in Debug2 window with 1.9 SW
thanks a lot
ashta
I have made my own board. Attched pl find the Picture.
I use
ITG3200
BMA180
BMP085
HMC5883
1.5 K pull up for the I2C lines.
Level convereter
On board 5V and 3.3V regulator
No errors in Debug2 window with 1.9 SW
thanks a lot
ashta
kalle123 wrote:What sensors are you using ???
Tell a little about your hardware.
BR - KH
Re: Altitude hold problem
You shouldnt need untrusted acc (i.e TRUSTED_ACCZ commented OUT) on properly made hardware.
its only needed for failcases of people ghettoing up a bunch of crap breakout boards.
it should really be renamed to
#define MY_HARDWARE_IS_BROKEN

its only needed for failcases of people ghettoing up a bunch of crap breakout boards.
it should really be renamed to
#define MY_HARDWARE_IS_BROKEN

Re: Altitude hold problem
but if i do not comment it, it is not stable when accelerometer is enabled.
Re: Altitude hold problem
So your accZ decreases when you run motors and throttle up? (The only case for needing trusted accz).
Re: Altitude hold problem
yes. but pl give me some tips to make it work!
it was kind of working with the dev version dev20110725
and why is
" with dev20110725 the ALT value displayed is 207.88
while with Multiwii ver 1.8 patch2/ 1.9 it is 864.20"
it was kind of working with the dev version dev20110725
and why is
" with dev20110725 the ALT value displayed is 207.88
while with Multiwii ver 1.8 patch2/ 1.9 it is 864.20"
-
- Posts: 1630
- Joined: Wed Jan 19, 2011 9:07 pm
Re: Altitude hold problem
ashta wrote:yes. but pl give me some tips to make it work!
it was kind of working with the dev version dev20110725
and why is
" with dev20110725 the ALT value displayed is 207.88
while with Multiwii ver 1.8 patch2/ 1.9 it is 864.20"
Hi,
I remember I did some float to integer simplifications about alt calculation,
but the values are correct on my side.
There is probably something wrong somewhere...
However, the important thing is the accuracy of altitude variation, not the absolute value.
Re: Altitude hold problem
thanks Allex. i will try some PID tuning and will report
Re: Altitude hold problem
I noticed there was another change in bmp085 pressure calculation,
> b7 = ((uint32_t) (bmp085_ctx.up >> (8 - OSS)) - b3) * (50000 >> OSS);
in multiwii now
> b7 = ((uint32_t) bmp085_ctx.up - b3) * (50000 >> OSS);
in reference code from sparkfun or so
with the line1, i was getting 200k pascals as output of pressure_calculate (wrong)
with line2, i was correctly getting ~100k (I live at sea level).
I knew this because my hardware can just set a breakpoint inside bmp085_calculate and I knew the returned value. no idea how you can confirm the calculation on your board.
> b7 = ((uint32_t) (bmp085_ctx.up >> (8 - OSS)) - b3) * (50000 >> OSS);
in multiwii now
> b7 = ((uint32_t) bmp085_ctx.up - b3) * (50000 >> OSS);
in reference code from sparkfun or so
with the line1, i was getting 200k pascals as output of pressure_calculate (wrong)
with line2, i was correctly getting ~100k (I live at sea level).
I knew this because my hardware can just set a breakpoint inside bmp085_calculate and I knew the returned value. no idea how you can confirm the calculation on your board.
Re: Altitude hold problem
Hi,
This is probably because you did shift here:

regards,
ziss_dm
This is probably because you did shift here:
Code: Select all
bmp085_ctx.up = ((((uint32_t)raw[0] << 16) | ((uint32_t)raw[1] << 8) | ((uint32_t)raw[2])) >> (8 - OSS));

regards,
ziss_dm
Last edited by ziss_dm on Tue Dec 06, 2011 9:33 am, edited 1 time in total.
Re: Altitude hold problem
Oh, haha, good catch. So disregard that, I suck.