Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //camera and infared view target directly and are always linked
- //once tracking is acquired, it must be kept. psuedocode for that
- //by karl brown
- while(looped every X units of time)
- {
- if(nothittinganythingsoon) //our copter isnt crashing
- {
- while(colorcombination_outsidesaferange) //we are losing our target from a safe center box of the camera
- {
- turntofind(colorcombination,pixel_offset_x, pixel_offset_y) //adjust camera accordingly
- }
- if(colorcombination_faraway || colorcombination_tooclose) //target is too far
- {
- calculate_distance(colorcombination) //how far from target
- moveaccordingly(calculate_distance,angleofcamera) //pythagorean theorum translated into 3 dimensions
- }
- }else
- {
- while(tooclosetorandomobjects) //HIGHWAY TO THE DANGER ZONE
- {
- moveawayfromproblem //up,down,left,right, front, backwards accordingly,
- turntofind(colorcombination,pixel_offset_x, pixel_offset_y) //gotta track that bad boy as we move
- ]
- }
- turntofind (colorcombination,pixels_relative_to_center)
- {
- }
- moveaccordingly(calculate_distance,angleofcamera)
- {
- }
- moveawayfromproblem
- {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement