Closed GoogleCodeExporter closed 9 years ago
Correcion, for 'falls off' read 'increases' in last paragraph.
Original comment by goo...@harding99.freeserve.co.uk
on 2 Jun 2011 at 11:58
Looks good. Would you be able to provide a patch?
Original comment by jasonshort
on 3 Jun 2011 at 3:35
OK, I'll try to write some code for you.
I have measured the LV EZ2 sonar, and its deadband is about 4 degrees, before
it starts increasing as the cosine. (ie there's about 4 degrees of gap between
the ideal cosine curve and the measured curve.
Need some other folks to measure the EZ0 now please.
Original comment by goo...@harding99.freeserve.co.uk
on 3 Jun 2011 at 6:28
Jason, what's the best way to do this: Email you the suggested changes (I don't
have your email), or Browse the source file in the wiki, click 'edit file',
make the changes and then click 'upload patch' .
Will the change get moderated and checked then before being included? I'm not
an authorised coder on this project.
regards
Rob
Original comment by goo...@harding99.freeserve.co.uk
on 4 Jun 2011 at 5:01
I've had a look in more detail at the code and it's not as easy as I expected.
Sin and cos of the roll and pitch are available, but not the roll and pitch
angles themselves. I assume we can't do sin and cos functions because they are
too expensive? This makes manipulating the roll and pitch angle values in the
way I proposed before doing the sin and cos tricky.
If you can see an easy way to implement what I was trying to achieve, please
let me know, and I'll have another go.
Thanks Rob
Original comment by goo...@harding99.freeserve.co.uk
on 5 Jun 2011 at 11:07
dcm.roll_sensor = roll in degrees * 100
Would that help?
Original comment by jasonshort
on 5 Jun 2011 at 11:10
[deleted comment]
Jason, please see attached file for proposed code changes,
regards
Rob
Original comment by goo...@harding99.freeserve.co.uk
on 8 Jun 2011 at 10:26
Attachments:
Sorry Jason, I know you are snowed under with support for drift and Yaw issues
at the moment. This sonar issue is really not important in comparison, but it's
here for when you get to it.
regards
Rob
Original comment by goo...@harding99.freeserve.co.uk
on 8 Jun 2011 at 9:16
Hi Jason, have you had a chance to look at the above code change proposal for
inclusion in the imminent release? Thanks and regards
Rob
Original comment by goo...@harding99.freeserve.co.uk
on 18 Jun 2011 at 8:19
Hi Jason, I have just tested the recommended XL-Maxsonar-EZ0 for its behaviour
when tilted to the ground, and it's even more flat that I expected. For example
at a sonar distance of 75cm from the ground (with the quad held horizontal,)
when tilted to 45 degrees the sonar reads 80 cm. ie it hardly changes at all.
Another example 200 cm horizontal versus 210 cm at 45 degreees. Both tests done
over short grass. This is way off a cosine curve, which would have predicted
that the sonar should read 106 cm rather than 80, and 282 cm rather than 210.
Therefore we would be better off merely commenting out the line that scales the
altitude by cos(roll) * cos(pitch), rather than implementing my code change
above.
Could you comment out this line for the next release please?
(If you're not happy with this, it's actually pretty linear between 0 and 45
degrees, increasing by around 6%, so could code that instead to be more
accurate.)
Thanks Rob
Original comment by goo...@harding99.freeserve.co.uk
on 18 Jun 2011 at 5:04
sounds good!
Original comment by jasonshort
on 18 Jun 2011 at 5:20
Original comment by jasonshort
on 1 Aug 2011 at 3:58
Original issue reported on code.google.com by
goo...@harding99.freeserve.co.uk
on 1 Jun 2011 at 9:28