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
RT @chr1sa: Donkeycar 4.4 released with tons of new features, including path learning (useful with GPS outdoors), better Web and Lidar supp…
Sunday
DIY Robocars via Twitter
RT @NXP: We are already biting our nails in anticipation of the #NXPCupEMEA challenge! 😉 Did you know there are great cash prizes to be won…
Nov 24
DIY Robocars via Twitter
RT @gclue_akira: レースまであと3日。今回のコースは激ムズかも。あと一歩 #jetracer https://t.co/GKcEjImQ3t
Nov 24
DIY Robocars via Twitter
UC Berkeley's DIY robocar program https://roar.berkeley.edu/
Nov 24
DIY Robocars via Twitter
RT @chr1sa: The next @DIYRobocars autonomous car race at @circuitlaunch will be on Sat, Dec 10. Thrills, spills and a Brazilian BBQ. Fun…
Nov 24
DIY Robocars via Twitter
RT @arthiak_tc: Donkey car platform ... Still training uses behavioral cloning #TCXpo #diyrobocar @OttawaAVGroup https://t.co/PHBYwlFlnE
Nov 20
DIY Robocars via Twitter
RT @emurmur77: Points for style. @donkeycar racing in @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/Y2hMyj1…
Nov 20
DIY Robocars via Twitter
RT @SmallpixelCar: Going to @diyrobocars race at @UCSDJacobs https://t.co/Rrf9vDJ8TJ
Nov 8
DIY Robocars via Twitter
RT @SmallpixelCar: Race @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/kK686Hb9Ej
Nov 8
DIY Robocars via Twitter
RT @PiWarsRobotics: Presenting: the Hacky Racers Robotic Racing Series in collaboration with #PiWars. Find out more and register your inter…
Oct 23
DIY Robocars via Twitter
RT @Hacky_Racers: There will be three classes at this event: A4, A2, and Hacky Racer! A4 and A2 are based around UK paper sizing and existi…
Oct 23
DIY Robocars via Twitter
Oct 23
DIY Robocars via Twitter
Oct 19
DIY Robocars via Twitter
Oct 18
DIY Robocars via Twitter
RT @NeaveEng: Calling all UK based folks interested in @diyrobocars, @f1tenth, @donkey_car, and similar robot racing competitions! @hacky_r…
Oct 13
DIY Robocars via Twitter
RT @araffin2: 🏎️ After hours of video editing, I'm happy to share a best of my Twitch videos on learning to race with RL. 🏎️ Each part is…
Oct 13
More…