Tuesday, April 30, 2013

7. Testing - Comparing the original and modified code

  1. First we will appropriately place (at 0,0 waypoint according to the runway of out topology in X- Plane 9) the U.A.V./drone both in gentlenav and gentlenav1 code (matrix pilot) and study the behavior of the U.A.V./drone.
  2. Second we place the U.A.V./drone both in gentlenav and gentlenav1 code (matrix pilot) at some inappropriate point (i.e a lot away from 0,0 waypoint) and again study the behavior of the U.A.V./drone.
  3. Then we will compare the results of the 4 flights and conclude which code is working better.
PS: Will try to get the videos uploaded of all the four flights in the next post (Post - 8).

Monday, April 29, 2013

6. How are we going to build a more stable Loiter program? - The Idea.

Whenever we wish our drone/U.A.V. to loiter we load a waypoint (x,y,z where z is height) and call the Loiter flag (F_LOITER) along with it. On the remote of our U.A.V. its in the auto mode. The Loiter flag has a program which guides the U.A.V. We are going to bring changes in this program.

The basic idea is that whenever a waypoint is loaded for loiter, 8 more waypoints are calculated around it and loaded one after another. to calculate the waypoints we use Switch case in C language with the following logic:


  1. We know - Sin of any angle = Perpendicular/Hypotenuse and Cos of any angle = Base/Hypotenuse
  2. Therefore, Sin45 = 1/1.414 and Cos45 = 1/1.414 (root of 2 = 1.414)
  3. Hence if we load a waypoint for eg (0,0) with waypoint/loiter radius 1000 meters then our code will look like this -
void loiter_routine()
{
struct relative3D myltrpnt;
loitercount++; //set_goal(GPSlocation, wp_to_relative(currentWaypointSet[waypointIndex]).loc)
switch(loitercount)
{
case 1:
myltrpnt.x= currentWaypointSet[waypointIndex].loc.x;
myltrpnt.y= currentWaypointSet[waypointIndex].loc.y + LOITER_RADIUS;
myltrpnt.z= currentWaypointSet[waypointIndex].loc.z;
break;

case 2:
myltrpnt.x= (currentWaypointSet[waypointIndex].loc.x)-(LOITER_RADIUS/(1.414));
myltrpnt.y= (currentWaypointSet[waypointIndex].loc.y)+(LOITER_RADIUS/(1.414));
myltrpnt.z= currentWaypointSet[waypointIndex].loc.z;
break;

case 3:
myltrpnt.x= currentWaypointSet[waypointIndex].loc.x - LOITER_RADIUS;
myltrpnt.y= (currentWaypointSet[waypointIndex].loc.y);
myltrpnt.z= currentWaypointSet[waypointIndex].loc.z;
break;

case 4:
myltrpnt.x= (currentWaypointSet[waypointIndex].loc.x)-(LOITER_RADIUS/(1.414));
myltrpnt.y= (currentWaypointSet[waypointIndex].loc.y)-(LOITER_RADIUS/(1.414));
myltrpnt.z= currentWaypointSet[waypointIndex].loc.z;
break;

case 5:
myltrpnt.x= (currentWaypointSet[waypointIndex].loc.x);
myltrpnt.y= currentWaypointSet[waypointIndex].loc.y - LOITER_RADIUS;
myltrpnt.z= currentWaypointSet[waypointIndex].loc.z;
break;

case 6:
myltrpnt.x= (currentWaypointSet[waypointIndex].loc.x)+(LOITER_RADIUS/(1.414));
myltrpnt.y= (currentWaypointSet[waypointIndex].loc.y)-(LOITER_RADIUS/(1.414));
myltrpnt.z= currentWaypointSet[waypointIndex].loc.z;
break;

case 7:
myltrpnt.x= (currentWaypointSet[waypointIndex].loc.x)+(LOITER_RADIUS/(1.414));
myltrpnt.y= currentWaypointSet[waypointIndex].loc.y;
myltrpnt.z= currentWaypointSet[waypointIndex].loc.z;
break;

case 8:
myltrpnt.x= (currentWaypointSet[waypointIndex].loc.x)+(LOITER_RADIUS/(1.414));
myltrpnt.y= (currentWaypointSet[waypointIndex].loc.y)+(LOITER_RADIUS/(1.414));
myltrpnt.z= currentWaypointSet[waypointIndex].loc.z;
loitercount =0;
break;

default:
break;

}
set_goal( GPSlocation, myltrpnt ) ;
}

5. First Test Flight of the U.A.V.

This was the first test flight of our U.A.V. it was done near the Temple of Saaketri (few minutes ahead of Sukhna Lake).

The fuselage of the bird is made of EPP foam. It has a wingspan of 1500 mm, we will use a 1200 MAH LIPO Battery (11.1 Volts and 120 grams) which will give us 15 minutes of flight (approx.). Attached to it is an Electronic Speed Controller (PWM) which controls the brush-less DC motor in the fuselage. The bird or the fuselage runs on four controls - 
  1. Aileron
  2. Elevator
  3. Rudder and
  4. Throttle
Check out the catch by our RC instructor (Daaman Joyia) in the end !!! Enjoy the flight !!!!



Saturday, April 27, 2013

4. Whats the purpose of this project?

Generally in Matrix Pilot Gentlenav code, programming is done as such that when we switch to the autopilot (loiter waypoint) mode 3 things happen:
  1. One waypoint is loaded in the program.
  2. The drone or U.A.V. tries to cross or achieve that point.
  3. But due to the coding (and the waypoint radius) the U.A.V. sometimes crosses or hovers around the loaded single waypoint (forming a bee 8 sometimes on it). But it never perfectly loiters around that waypoint which might cause too much difficulties (both manually and logically) for our camera on the U.A.V. This might prevent the camera from focusing on the target waypoint all the time.
  4. Also to create a program for the safety if our U.A.V. In this as soon as there is a specific amount of battery left, our U.A.V. will automatically return to the home-point so as to avoid crash-landing/being lost.
Me and Colleagues' Job: To design a code in C language (which we are using to program our PIC micro-controller) so that the U.A.V. perfectly circles the waypoint loaded by the user (and possibly no more information is required).

3. Hardware being used - till now

First we will make a testing kit with dsPIC30F4011/4012 and program it with our test programs with the help of MPLab software and PICKit V2.





2. Software used for the U.A.V.

  1. X-Plane 9 - demo version
  2. MPLab IDE V8.90
  3. Proteus 6.0 or 7.0 (for basic PIC 16 or 18)
  4. PIC C Compiler
  5. Dev - C++
  6. Real-Term Serial Capture Program
  7. Happy kill more G.C.S. (Ground Control Station)
  8. SiRF G.P.S. Software

1. My first serious project - Unmanned Aerial Vehicle

Hi! I am Manya Sharma and I live in Chandigarh, India.

First things first - What is an Unmanned Aerial Vehicle or an U.A.V?

An Unmanned Aerial Vehicle (U.A.V.) is an aircraft that has the capability of autonomous flight, without a pilot in control. Amateur U.A.V.s are non-military and non-commercial. They typically fly under “recreational” exceptions to F.A.A. regulations on U.A.V.s, so long as the pilots/programmers keep them within tight limits on altitude and distance. Usually the U.A.V. is controlled manually by Radio Control (RC) at take-off and landing, and switched into G.P.S.-guided autonomous mode only at a safe altitude.

It is also commonly known as a drone, is an aircraft without a human pilot on board.

There are a wide variety of drone shapes, sizes, configurations, and characteristics. Historically, U.A.V.s were simple remotely piloted aircraft, but autonomous control is increasingly being employed.

They are now deployed professionally for military applications and are also use in a small but growing number of civil applications, such as policing, firefighting, and nonmilitary security work, such as surveillance of pipelines. U.A.V.s are often preferred for missions that are too "dull, dirty, or dangerous" for manned aircraft.