Navigation calculations??

Hi everyone!I need to write the code for navigation calculations(distance and bearing) for my UAV project. I went through some of the methods like pythagorus & haversine but I am really confused. Can somebody share the code/method which has been succesfully tested. I am working on PIC18 microcontroller.RegardsAchal

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

Join diydrones

Email me when people reply –

Replies

  • I know this is an ancient thread, but a great source for this is
    http://williams.best.vwh.net/avform.htm

    The PIC18 will definitely limit you to the flat-earth approximations.
  • T3
    Treat the coordinates as coordinates on a flat surface. Really easy..

    Here's an example (from my NXT AutoPilot):
    float tempHeading=0;
    float dX=(gpsLon-gpsLon_old);
    float dY=(gpsLat-gpsLat_old);
    if(dX!=0)
    {
    tempHeading=radiansToDegrees(atan(dY/dX));
    if(dX<0)
    {
    if(dY<=0)tempHeading+=180;
    else if(tempHeading>270)tempHeading-=180;
    }

    }
    else if(dY!=0)
    {
    if(dY<0)tempHeading=270;
    else tempHeading=90;
    }
  • 3D Robotics
    For ArduPilot, we're using Jordi's algorithms and code, which is based on this method.
This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…