Arduino Boat

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

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

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

  • I prefer not to learn by hacking apart the programming of an ardurover. To get it to interface the compass differently and steering differently. I mean id rather learn and program a mega myself at this stage.

    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.

  • Sounds like I'd be spending a lot of time and effort trying to adapt code already written to work how I would want it to and on the equipment I want to use.
    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

  •  

    The Ardurover code works just fine on a boat.  You wil need to use a older release if not using a Pixhawk.

    Regards,

    David R. Boulanger


  •  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

  • 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).  

This reply was deleted.

Activity

DIY Robocars via Twitter
Sep 9
DIY Robocars via Twitter
RT @chr1sa: We've got another virtual @DIYRobocars race tomorrow at 9:00am PT. Two dozen autonomous cars will compete, four at a time. Ther…
Sep 4
DIY Robocars via Twitter
Sep 1
DIY Robocars via Twitter
Aug 31
DIY Robocars via Twitter
Aug 31
DIY Robocars via Twitter
RT @ExplorerRobocar: Sometimes, I am really a big kid!! Having fun with my virtual RC car on the @diyrobocars track 😜😉, by using the « AR R…
Aug 24
DIY Robocars via Twitter
RT @grepLeigh: @donkey_car @unity3d @TensorFlow ~1050 episodes into training, my agent learned to erratically drive in the left lane. 🤖😆 ht…
Aug 24
DIY Robocars via Twitter
RT @EclipseCyclone: Sweet! http://Robotec.ai high performance #ROS 2 @unity3d #CycloneDDS bridge for @AutowareFdn @SVLSimulator now…
Aug 24
DIY Robocars via Twitter
RT @a1k0n: My car had a lot of trouble getting around the track at the last @diyrobocars event -- only one actual finished lap during the r…
Aug 24
DIY Robocars via Twitter
RT @SmallpixelCar: This is the run time map https://t.co/VzykOkUt2G
Aug 24
DIY Robocars via Twitter
RT @SmallpixelCar: Made a lot progress on Warm Spring Raceways track. Almost finished one lap. https://t.co/nUVpufZQyP
Aug 24
DIY Robocars via Twitter
RT @AntonioRobotics: Super fun time seeing these autonomous cars race at @circuitlaunch for the @diyrobocars quarterly meet up! The demolit…
Aug 15
DIY Robocars via Twitter
RT @a1k0n: I thought my dumb localization code was still working at the new @circuitlaunch track, but it was just *barely* working. I shoul…
Aug 14
DIY Robocars via Twitter
RT @DAVGtech: Recording of entire in person @diyrobocars race today @circuitlaunch. Fast forward a couple hours to go straight to the racin…
Aug 14
DIY Robocars via Twitter
RT @SmallpixelCar: This is the run time map. Very noisy Lidar signal https://t.co/bAbeVUMi10
Aug 14
DIY Robocars via Twitter
RT @SmallpixelCar: Today’s race with @a1k0n at @diyrobocars We both decided jumping over the wall was the way to break the 11s lap time. Th…
Aug 14
More…