Hey guys I'm making an autonomous boat powered by arduino, GPS & Compass readings and thought id see if anyone reads this stuff at all, Hoping to also get a bit more info about a gps Im using and also the TinyGPS & TinyGPS++ library data and the calculation I would use to adjust for currents when changing heading, Ie How do I go north when i need to power nne to adjust for a cross current if i cross a fast flowing river.
Cheers for any tips, Im sure a flight guy would know the answer from adapting to the wind.
Cheers
Replies
David, noone's arguing against that. I think we all, including the OP, understand that Ardurover can do boats. Dat0 prefers to work from scratch, maybe for learning, maybe for other reasons. It's a perfectly reasonable decision. Sometimes having a working model isn't the only goal.
At school, I'm building a multirotor flight controller from scratch, even though I understand (from personal experience) that ArduCopter exists and works very well. The amount of knowledge you soak up when implementing your own PID controllers, filters, inertial navigation, communications, etc. is incredible, and totally worth the effort put into it.
The original question was about algorithms for compensating for windage. If we were to draw from the Ardorover project, I think the best way would be to discuss how it handles the windage problem, so that we can learn from it and emulate it.
This will be the last I say. I have a boat and you don't need to hack the rover code. It handles windage and current just fine.
Regards,
David R. Boulanger
Cheers buy please no more ardurover stuff I'm going DIY
And thanks for the cross track correction tip. I'm looking at what might be the best way forward with it.
Ardurover does an outstanding job doing this. 2.5 is the last release I think that works on the old processors.
Regards,
David R. Boulanger
Sure, what you're talking (at least in part) about is called crosstrack correction. (APM actually replaced this with an entirely different navigation algorithm, but it still works...).
The basic idea is that with simple movement, you constantly adjust your heading to point directly towards the current waypoint. If you get swept off course, you'll just stay off course because you'll keep heading directly from your new position to the current waypoint. What you should do is calculate how far off course you are (distance between your position and the closest point on the original course line), and then use that number to adjust your heading so that the "corrected heading" is not directly towards the waypoint, but is biased towards getting you back on course.
I think I might be better off learing the math and experimenting with the heading to adapt for wind.
At the moment my thoughts are to continue as planed and avoid trying to adapt pre written mostly finished code.
So that in mind does anyone have any reading that would help ?
Thanks
Yeah, you could run it on Ardumega, as that is the base chip on the ardupilot. The code requires a bit of modification for a standard board, but it will work. In fact, there might already might be a script that is on github that does exactly that.
Dat0 said:
Hey
I think you have taken your original post and run with it a little far, Im not using ardupilot at all unless its code that loads onto an Arduino mega. Really I'm after the following -
a bit more info about a gps Im using and also the TinyGPS & TinyGPS++ library data and the calculation I would use to adjust for currents when changing heading, Ie How do I go north when i need to power nne to adjust for a cross current if i cross a fast flowing river.
Cheers for any tips, Im sure a flight guy would know the answer from adapting to the wind.
So yeah, If anyone has any info on how i would start to tackle this code let me know.
Cheers
Hi Dat0
You don't need to worry, your "flight Plan" defines a required track and the boat follows the course as best as possible to achieve the desired track and not heading. And it will also adjust speed (within limits) to maintain a desired constant speed over the earth, in other words less throttle down stream and much more into the current. The autopilot derives a heading from the track (a gps position now compared to a gps position a few seconds back) so into current conditions when the position has not changed significantly cause errors in the derived heading and cause a bit of oscillation in track (weaving).