Ejemplo n.º 1
0
 /**
  * Searches for a reflectable within a circle of specified radius.
  *
  * @param radius of the search area, in meters
  * @return message depending on whether a reflectable was found or not
  * @throws TrackerException thrown if not connected, or if no reflectable was found
  */
 String search(double radius) throws TrackerException {
   isConnected();
   trk.search(radius);
   if (trk.targetPresent()) {
     return "Target found.\n";
   } else {
     throw new TrackerException("Target not found.\n");
   }
 }
Ejemplo n.º 2
0
 /** Returns true if the tracker is pointing at a reflectable, false if not. */
 boolean reflPresent() throws TrackerException {
   isConnected();
   return trk.targetPresent();
 }