View previous topic :: View next topic |
Author |
Message |
m4k
Joined: 27 Mar 2018 Posts: 29
|
|
Posted: Wed May 23, 2018 4:49 am |
|
|
Ttelmah wrote: | OK I see you are actually printing the output. Still a wrong value. Should be about 100000. Look at the maths. For instance:
Code: |
itoa(p,10,ss);
puts(ss);
//just use
printf("%ld", p);
|
|
ok...tnx for reply
i try to printing p value with printf("%ld", p);
but the output value not change ...It remains the same as before...
for high accuracy output it seems to use kalman or complementary filter ..fusion barometric output with acc z axis...
because when i saw traditional quadrotor vertical stability without gps and only with barometr its great performance |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9121 Location: Greensville,Ontario
|
|
Posted: Wed May 23, 2018 5:08 am |
|
|
While I don't have that PIC or peripheral I am following this 'thread' and have a couple commnets.
You should printout just the raw data and 'play computer'. By that I mean, get a piece of paper and pencil and do all the math, in the same steps as your program does. Now is the result close to what it should be?
If NO, then the peripheral may be at fault. Check power levels,EMI, wiring, I2C pullups, etc. Since the PIC program didn't do the 'math', this points to a hardware problem.
If YES, then your program 'math' will be in error. Perhaps a set of braces are wrong, maybe using an unsigned variable where a signed is supposed to be.
This is the 'divide and win' method. You need to locate the source of the problem THEN you can fix it!
Jay |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19238
|
|
Posted: Wed May 23, 2018 6:59 am |
|
|
Yes. That's why I suggested outputting the earlier numbers so the maths can be checked 'off board'. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19238
|
|
Posted: Wed May 23, 2018 7:54 am |
|
|
As a comment (of course) the figure being seen could be totally right if he was at a very significant altitude (perhaps 5000'). So please tell us your altitude and where you are?. |
|
|
m4k
Joined: 27 Mar 2018 Posts: 29
|
|
Posted: Thu May 24, 2018 7:00 am |
|
|
Ttelmah wrote: | As a comment (of course) the figure being seen could be totally right if he was at a very significant altitude (perhaps 5000'). So please tell us your altitude and where you are?. |
tnx
my sea level altitude is 1530 meter or 5100 ft |
|
|
m4k
Joined: 27 Mar 2018 Posts: 29
|
|
Posted: Thu May 24, 2018 7:03 am |
|
|
temtronic wrote: | While I don't have that PIC or peripheral I am following this 'thread' and have a couple commnets.
You should printout just the raw data and 'play computer'. By that I mean, get a piece of paper and pencil and do all the math, in the same steps as your program does. Now is the result close to what it should be?
If NO, then the peripheral may be at fault. Check power levels,EMI, wiring, I2C pullups, etc. Since the PIC program didn't do the 'math', this points to a hardware problem.
If YES, then your program 'math' will be in error. Perhaps a set of braces are wrong, maybe using an unsigned variable where a signed is supposed to be.
This is the 'divide and win' method. You need to locate the source of the problem THEN you can fix it!
Jay |
yes...thats right
My calculations are correct on paper and correspond to the basic calculations....i using gy86 module |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19238
|
|
Posted: Thu May 24, 2018 7:54 am |
|
|
Which is why you now need to go through step by step. Do dT TEMP, OFF & SENS all agree with values you calculate manually?. |
|
|
|