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
RT @chr1sa: Just a week to go before our next @DIYRobocars race at @circuitlaunch, complete with famous Brazilian BBQ. It's free, fun for k…
yesterday
DIY Robocars via Twitter
How to use the new @donkey_car graphical UI to edit driving data for better training https://www.youtube.com/watch?v=J5-zHNeNebQ
Nov 28
DIY Robocars via Twitter
RT @SmallpixelCar: Wrote a program to find the light positions at @circuitlaunch. Here is the hypothesis of the light locations updating ba…
Nov 26
DIY Robocars via Twitter
RT @SmallpixelCar: Broke my @HokuyoUsa Lidar today. Luckily the non-cone localization, based on @a1k0n LightSLAM idea, works. It will help…
Nov 25
DIY Robocars via Twitter
@gclue_akira CC @NVIDIAEmbedded
Nov 23
DIY Robocars via Twitter
RT @luxonis: OAK-D PoE Autonomous Vehicle (Courtesy of zonyl in our Discord: https://discord.gg/EPsZHkg9Nx) https://t.co/PNDewvJdrb
Nov 23
DIY Robocars via Twitter
RT @f1tenth: It is getting dark and rainy on the F1TENTH racetrack in the @LGSVLSimulator. Testing out the new flood lights for the racetra…
Nov 23
DIY Robocars via Twitter
RT @JoeSpeeds: Live Now! Alex of @IndyAChallenge winning @TU_Muenchen team talking about their racing strategy and open source @OpenRobotic…
Nov 20
DIY Robocars via Twitter
RT @DAVGtech: Live NOW! Alexander Wischnewski of Indy Autonomous Challenge winning TUM team talking racing @diyrobocars @Heavy02011 @Ottawa…
Nov 20
DIY Robocars via Twitter
Incredible training performance with Donkeycar https://www.youtube.com/watch?v=9yy7ASttw04
Nov 9
DIY Robocars via Twitter
RT @JoeSpeeds: Sat Nov 6 Virtual DonkeyCar (and other cars, too) Race. So bring any car? @diyrobocars @IndyAChallenge https://t.co/nZQTff5…
Oct 31
DIY Robocars via Twitter
RT @JoeSpeeds: @chr1sa awesomely scary to see in person as our $1M robot almost clipped the walls as it spun at 140mph. But it was also awe…
Oct 29
DIY Robocars via Twitter
RT @chr1sa: Hey, @a1k0n's amazing "localize by the ceiling lights" @diyrobocars made @hackaday! It's consistently been the fastest in our…
Oct 25
DIY Robocars via Twitter
RT @IMS: It’s only fitting that @BostonDynamics Spot is waving the green flag for today’s @IndyAChallenge! Watch LIVE 👉 https://t.co/NtKnO…
Oct 23
DIY Robocars via Twitter
RT @IndyAChallenge: Congratulations to @TU_Muenchen the winners of the historic @IndyAChallenge and $1M. The first autonomous racecar comp…
Oct 23
DIY Robocars via Twitter
RT @JoeSpeeds: 🏎@TU_Muenchen #ROS 2 @EclipseCyclone #DDS #Zenoh 137mph. Saturday 10am EDT @IndyAChallenge @Twitch http://indyautonomouschallenge.com/stream
Oct 23
More…