Something i would like to add to my AGV is to the ability to tell it to go 100 ft forward on your current heading, or 50 feet at the heading of 60. So i wanted to ask if there was a formula for this before i make it myself. Basically what i am looking for is a formula that given the current gps location, a distance to the next wanted to gps point (say 100ft) and then the heading to get to the point. Instead of finding the distance between 2 points and the heading. I want to find point A knowing point B, the distance, and heading. Do you know of such a formula, it seems like it wouldnt be that hard for me to work backwards to get the formula. Like i said, just asking before i sit down with pad and paper and work on it.

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

Join diydrones

Email me when people reply –

Replies

  • yeah, this took me a while to figure out, too.

    The ardupilot code has some routines that provide inspiration, I've attached my own (crappy but functional) code that runs on an Ardupilot. It's also got a routine that works out direction and distance.

    The hardest thing I found was visualizing the coordinate system. X coordinates work differently at various latitudes and you have to scale degrees by the Cosine of the Lat. Also, when you work with angles, things like Cos and Tan work from a "zero" that is 90 degrees out from regular North/South bearings. Urgh.

    Anyway, I hope this helps.

    cartest_03.zip

  • 3D Robotics
    All the math you need is here.
    Calculate distance and bearing between two Latitude/Longitude points using haversine formula in Jav…
This reply was deleted.

Activity

DIY Robocars via Twitter
New version of Intel OpenBot! This resolves many of the issues with the first version, including a much smoother tr… https://twitter.com/i/web/status/1352395636369313798
19 hours ago
DIY Drones via Twitter
Using ArduRover with an RTK GPS https://ift.tt/2N9I3RO
Tuesday
DIY Drones via Twitter
Monday
DIY Robocars via Twitter
Monday
DIY Robocars via Twitter
Jan 15
DIY Robocars via Twitter
Jan 15
DIY Drones via Twitter
Jan 14
DIY Robocars via Twitter
RT @Heavy02011: @diyrobocars : A Home-brew computer club* for Connected Autonomous Driving on Jan 23rd, 2021 https://www.meetup.com/Connected-Autonomous-Driving/events/275728684/ #Meetu…
Jan 14
DIY Robocars via Twitter
Jan 14
David Hori liked Isabella Domi's profile
Jan 12
DIY Robocars via Twitter
RT @Heavy02011: ⁦@diyrobocars⁩ Autonomous Driving Assembly at #rC3. join us at https://rc3.world/rc3/assembly/diyrobocars-f1tenth/ ⁦@f1tenth⁩ ⁦@DAVGtech⁩ ⁦@DWalmroth⁩…
Jan 11
DIY Robocars via Twitter
RT @chr1sa: New car designs coming for our next @DIYRobocars @donkey_car virtual race on the 23rd. Choose any one you want at race time Le…
Jan 11
DIY Robocars via Twitter
RT @RoboticMasters: Thanks to @EllerbachMaxime and the Sydney Uni Capstone Students the @donkey_car @diyrobocars simulator is getting a ma…
Jan 11
DIY Robocars via Twitter
Jan 6
DIY Robocars via Twitter
Dec 28, 2020
DIY Robocars via Twitter
An interesting line-following simulator to use with with your robocars: https://github.com/ron-grant/LFS
Dec 23, 2020
More…