Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.12 KB | None | 0 0
  1. //camera and infared view target directly and are always linked
  2. //once tracking is acquired, it must be kept. psuedocode for that
  3. //by karl brown
  4. while(looped every X units of time)
  5. {
  6.     if(nothittinganythingsoon) //our copter isnt crashing
  7.     {
  8.         while(colorcombination_outsidesaferange) //we are losing our target from a safe center box of the camera
  9.         {
  10.         turntofind(colorcombination,pixel_offset_x, pixel_offset_y) //adjust camera accordingly
  11.         }
  12.         if(colorcombination_faraway || colorcombination_tooclose) //target is too far
  13.         {
  14.             calculate_distance(colorcombination)   //how far from target
  15.             moveaccordingly(calculate_distance,angleofcamera)  //pythagorean theorum translated into 3 dimensions
  16.         }
  17.     }else
  18.     {
  19.         while(tooclosetorandomobjects) //HIGHWAY TO THE DANGER ZONE
  20.         {
  21.             moveawayfromproblem //up,down,left,right, front, backwards accordingly,
  22.             turntofind(colorcombination,pixel_offset_x, pixel_offset_y)  //gotta track that bad boy as we move
  23.         ]      
  24.     }
  25. turntofind (colorcombination,pixels_relative_to_center)
  26. {
  27.  
  28. }  
  29. moveaccordingly(calculate_distance,angleofcamera)
  30. {
  31.  
  32. }
  33. moveawayfromproblem
  34. {
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement