Once the sensors lock onto the beacon, how do I determine the angle of the infrared sensors with respect to the beacon so that I can calculate the distance and heading to the beacon?
You first check to see if the two trackers are locked-on to the beacon and then using the current commanded servo motor positions, you should be able to calculate a heading and distance to the beacon. An example of how to do this is documented in frc_tracker.zip / user_routines_fast.c / Process_Data_From_Local_IO(): if ((Tracker_Data[LEFT].Status == BOTH_IN_VIEW) && (Tracker_Data[RIGHT].Status == BOTH_IN_VIEW)) { // both trackers have an angular solution; calculate beacon vector // here using the known baseline distance between the trackers and // angles derived from the two Tracker_Data[].
Related Questions
- Once the sensors lock onto the beacon, how do I determine the angle of the infrared sensors with respect to the beacon so that I can calculate the distance and heading to the beacon?
- We know our beacon and infrared sensors are working, the servo motors are plugged into PWM outputs 1 and 2, but they don rotate. Have any ideas why?
- How do Infrared Wireless Motion Sensors Work?