Closed GoogleCodeExporter closed 9 years ago
looks like sensors.pde as the same issue
in void read_airspeed(void)
the above was for ArduPilotMega.pde at line 806
Original comment by mbada...@gmail.com
on 11 Oct 2010 at 10:35
I had problems similar to your qualitative description last time I flew my real
airframe and you're right about airspeed changing to an integer recently; that
seems like a likely culprit. For some background, see Issue 124. From a quick
glance, it looks like there is a parenthesis bug in the current code; the
0.00005 constant should be applied to the difference between airspeed_error^2
and airspeed^2, not just to airspeed_error^2. However, your correction looks
fine; that's close to how I would have tried to fix it. You say you had some
success; what is still wrong after making that change?
As a side note, airspeed_energy_error shouldn't be calculated by two different
formulas in the code; I'll see about changing that.
Original comment by bjpcalt...@gmail.com
on 12 Oct 2010 at 1:14
Well nothing wrong but the formula looks like FBW_B with it would never have
worked then with the energy error computation and I was looking for something
simpler. Happy to see that I was not too far off.
Just for my info what is this formula ?
Is this dynamic energy ? :
http://www.experimentalaircraft.info/flight-planning/aircraft-lift-formula.php
Original comment by mbada...@gmail.com
on 12 Oct 2010 at 5:51
I don't think FBWB is used very much (I've never used it; I use FBWA instead)
which is probably why it wasn't caught before now. The formula is just simple
kinetic energy: 1/2*m*v^2, except that mass is the same in all terms so we
ignore that. velocity is in cm/s rather than m/s, so we divide by (1/100)^2 to
get more manageable units that are compatible with potential energy (m*g*h).
The airspeed energy error is the difference between the kinetic energy at the
current speed and the kinetic energy at the target speed.
Just to be clear, FBWB didn't work before you made the above change and it does
now?
Original comment by bjpcalt...@gmail.com
on 12 Oct 2010 at 6:39
Thanks for the explanation it makes more sense now. Indeed it was not working
and it works now. I want to use fbw_b when i am flying fpv, it makes it simpler.
Original comment by mbada...@gmail.com
on 12 Oct 2010 at 6:52
bjpcaltech, are you Benjamin Pelletier?
Original comment by dewei...@gmail.com
on 12 Oct 2010 at 2:31
Yep, that's me :) And thanks mbadaire; I'll make your change part of the
repository.
Original comment by bjpcalt...@gmail.com
on 12 Oct 2010 at 5:31
This issue was closed by revision r1247.
Original comment by bjpcalt...@gmail.com
on 12 Oct 2010 at 7:21
Original issue reported on code.google.com by
mbada...@gmail.com
on 11 Oct 2010 at 9:52