<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable id="found">found</variable>
<variable id="red_center_display">redCenterDistance</variable>
<variable id="pair_r4_seen">r4Seen</variable>
<variable id="pair_r5_seen">r5Seen</variable>
<variable id="pair_b4_seen">b4Seen</variable>
<variable id="pair_b5_seen">b5Seen</variable>
<variable id="range_r1">R1Distance</variable>
<variable id="range_r2">R2Distance</variable>
<variable id="range_r3">R3Distance</variable>
<variable id="range_r4">R4Distance</variable>
<variable id="range_r5">R5Distance</variable>
<variable id="range_r6">R6Distance</variable>
<variable id="range_r7">R7Distance</variable>
<variable id="range_r8">R8Distance</variable>
<variable id="range_b1">B1Distance</variable>
<variable id="range_b2">B2Distance</variable>
<variable id="range_b3">B3Distance</variable>
<variable id="range_b4">B4Distance</variable>
<variable id="range_b5">B5Distance</variable>
<variable id="range_b6">B6Distance</variable>
<variable id="range_b7">B7Distance</variable>
<variable id="range_b8">B8Distance</variable>
<variable id="r">result</variable>
<variable id="l">list</variable>
<variable id="sel">selecting</variable>
<variable id="t">tag</variable>
<variable id="pair_red_x">redX</variable>
<variable id="sid">selectedId</variable>
<variable id="p">pose</variable>
<variable id="pair_red_y">redY</variable>
<variable id="pair_blue_x">blueX</variable>
<variable id="srg">selectedRange</variable>
<variable id="pair_red_z">redZ</variable>
<variable id="pair_blue_y">blueY</variable>
<variable id="x">x</variable>
<variable id="pair_r4_x">r4X</variable>
<variable id="pair_r5_x">r5X</variable>
<variable id="pair_red_range">redRange</variable>
<variable id="pair_blue_z">blueZ</variable>
<variable id="y">y</variable>
<variable id="pair_r4_y">r4Y</variable>
<variable id="pair_r5_y">r5Y</variable>
<variable id="pair_b4_x">b4X</variable>
<variable id="pair_b5_x">b5X</variable>
<variable id="pair_blue_range">blueRange</variable>
<variable id="crg">currentRange</variable>
<variable id="z">z</variable>
<variable id="pair_r4_z">r4Z</variable>
<variable id="pair_r5_z">r5Z</variable>
<variable id="pair_red_tx">redTx</variable>
<variable id="pair_b4_y">b4Y</variable>
<variable id="pair_b5_y">b5Y</variable>
<variable id="pair_blue_tx">blueTx</variable>
<variable id="ctx">currentTx</variable>
<variable id="pair_b4_z">b4Z</variable>
<variable id="pair_b5_z">b5Z</variable>
<variable id="tri_yaw">yaw</variable>
<variable id="ctr">centered</variable>
<variable id="tri_pitch">pitch</variable>
<variable id="rg">range</variable>
<variable id="id">id</variable>
<variable id="tx">tx</variable>
<variable id="tri_group">group</variable>
<variable id="tri_offset">offset</variable>
<variable id="start">startRange</variable>
<variable id="target">targetRange</variable>
<variable id="done">done</variable>
<variable id="pair_r4_tx">r4Tx</variable>
<variable id="pair_r5_tx">r5Tx</variable>
<variable id="pair_b4_tx">b4Tx</variable>
<variable id="pair_b5_tx">b5Tx</variable>
</variables>
<block type="procedures_defnoreturn" id="$lNq!@wb;:`W!_5l$=eB" deletable="false" x="25" y="13">
<field name="NAME">runOpMode</field>
<comment pinned="true" h="100" w="500">APRILTAG AUTONOMOUS

1. During INIT, show red tag and center distances.
2. After START, find the nearer red or blue cluster center.
3. Rotate until centered.
4. Drive toward the center and stop 24 inches away.
5. Stop safely if vision is lost or a timeout occurs.</comment>
<data>{"commentPositionLeft":161,"commentPositionTop":-13}</data>
<statement name="STACK">
<block type="comment" id="student_auto_setup">
<field name="COMMENT">ROBOT SETUP: Configure directions, BRAKE behavior, encoder mode, and zero motor power before anything can move.</field>
<next>
<block type="dcMotor_setProperty_Direction" id=");hjh;/S5f2vG.;_U,I_">
<field name="IDENTIFIER">front_left_driveAsDcMotor</field>
<field name="PROP">Direction</field>
<data>{"IDENTIFIER":"front_left_drive"}</data>
<value name="VALUE">
<block type="dcMotor_typedEnum_direction" id="FKHX[fGskv|-mFtmg:r)">
<field name="DIRECTION">REVERSE</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Direction" id="rY-oSH@UVMDSKwTEB1+,">
<field name="IDENTIFIER">back_left_driveAsDcMotor</field>
<field name="PROP">Direction</field>
<data>{"IDENTIFIER":"back_left_drive"}</data>
<value name="VALUE">
<block type="dcMotor_typedEnum_direction" id="KtqUXAG5d_RvUsO*+,qM">
<field name="DIRECTION">REVERSE</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Direction" id="T_ur*LV[WZS#6Y1qV{5-">
<field name="IDENTIFIER">front_right_driveAsDcMotor</field>
<field name="PROP">Direction</field>
<data>{"IDENTIFIER":"front_right_drive"}</data>
<value name="VALUE">
<block type="dcMotor_typedEnum_direction" id="}x-5J-p%bek%:i?fM|vf">
<field name="DIRECTION">FORWARD</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Direction" id="13A3MBA?Z+#af-po?-a3">
<field name="IDENTIFIER">back_right_driveAsDcMotor</field>
<field name="PROP">Direction</field>
<data>{"IDENTIFIER":"back_right_drive"}</data>
<value name="VALUE">
<block type="dcMotor_typedEnum_direction" id="`+fi-=oeTO)113H#vog2">
<field name="DIRECTION">FORWARD</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_ZeroPowerBehavior" id="PMS%jo7sZwD1g26RuroW">
<field name="IDENTIFIER">front_left_driveAsDcMotor</field>
<field name="PROP">ZeroPowerBehavior</field>
<data>{"IDENTIFIER":"front_left_drive"}</data>
<value name="VALUE">
<block type="dcMotor_typedEnum_zeroPowerBehavior" id="xUdD9$2Slfhk_(YYlPj)">
<field name="ZERO_POWER_BEHAVIOR">BRAKE</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_ZeroPowerBehavior" id="$Z?=,@*UZ^k03#Wr*hmt">
<field name="IDENTIFIER">front_right_driveAsDcMotor</field>
<field name="PROP">ZeroPowerBehavior</field>
<data>{"IDENTIFIER":"front_right_drive"}</data>
<value name="VALUE">
<block type="dcMotor_typedEnum_zeroPowerBehavior" id="uG:;pTjj^CyF/U^ygn40">
<field name="ZERO_POWER_BEHAVIOR">BRAKE</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_ZeroPowerBehavior" id="?6R058T7014hq/e2dKR=">
<field name="IDENTIFIER">back_left_driveAsDcMotor</field>
<field name="PROP">ZeroPowerBehavior</field>
<data>{"IDENTIFIER":"back_left_drive"}</data>
<value name="VALUE">
<block type="dcMotor_typedEnum_zeroPowerBehavior" id="YV~:$eo{,gPN[T!t3qto">
<field name="ZERO_POWER_BEHAVIOR">BRAKE</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_ZeroPowerBehavior" id="b.Fpd_,Sw+Y^M`O]NU05">
<field name="IDENTIFIER">back_right_driveAsDcMotor</field>
<field name="PROP">ZeroPowerBehavior</field>
<data>{"IDENTIFIER":"back_right_drive"}</data>
<value name="VALUE">
<block type="dcMotor_typedEnum_zeroPowerBehavior" id="r2P[px6`Z*Yhi}f+4wRC">
<field name="ZERO_POWER_BEHAVIOR">BRAKE</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_RunMode" id="=e9XcVx8;+U%:ZymhYZM">
<field name="IDENTIFIER">front_left_driveAsDcMotor</field>
<field name="PROP">Mode</field>
<data>{"IDENTIFIER":"front_left_drive"}</data>
<value name="VALUE">
<block type="dcMotor_typedEnum_runMode" id="V^?sh8B?iievO$jJm21=">
<field name="RUN_MODE">RUN_USING_ENCODER</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_RunMode" id="uGZ:tXUNQ:ujm0TIy8I!">
<field name="IDENTIFIER">front_right_driveAsDcMotor</field>
<field name="PROP">Mode</field>
<data>{"IDENTIFIER":"front_right_drive"}</data>
<value name="VALUE">
<block type="dcMotor_typedEnum_runMode" id="!*_7Bwr+Iwt~:P9hC;4b">
<field name="RUN_MODE">RUN_USING_ENCODER</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_RunMode" id="?IbNt$d|0$~HMRKCf_Oy">
<field name="IDENTIFIER">back_left_driveAsDcMotor</field>
<field name="PROP">Mode</field>
<data>{"IDENTIFIER":"back_left_drive"}</data>
<value name="VALUE">
<block type="dcMotor_typedEnum_runMode" id="9=lu=HlY5mJ!Zc|v|3aK">
<field name="RUN_MODE">RUN_USING_ENCODER</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_RunMode" id="LP)LM(_tG-B*$S`hnv7_">
<field name="IDENTIFIER">back_right_driveAsDcMotor</field>
<field name="PROP">Mode</field>
<data>{"IDENTIFIER":"back_right_drive"}</data>
<value name="VALUE">
<block type="dcMotor_typedEnum_runMode" id="8bcw=p%TuCBqdAXAuU.B">
<field name="RUN_MODE">RUN_USING_ENCODER</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="E)GXHtoH~BDSoC/;T;(L">
<field name="IDENTIFIER">front_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id="K]8Cg!5jQEa*_5r5`ZXd">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="p`9Y2)jAcDV]@RFqPRWz">
<field name="IDENTIFIER">back_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id="!4t)j:p4.ALay:)Cf9H}">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="wew#F}bDy;)9XJ/36?*2">
<field name="IDENTIFIER">front_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="x1w5o$g3FNWvm.Qu5Un;">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="B-t?.h8OwRAfdj-)-E!D">
<field name="IDENTIFIER">back_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="Cb?PZ~u@!Kc$4pQUb9q%">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="telemetry_setProperty_Number" id="D}!!t=s00GaN]|YeW(::">
<field name="PROP">MsTransmissionInterval</field>
<value name="VALUE">
<block type="math_number" id="UqSk!@,5twm/YO4QPv?y">
<field name="NUM">50</field>
</block>
</value>
<next>
<block type="limelight3A_setPollRateHz" id="SV^.H^reF{cN5!-lH|i~">
<field name="IDENTIFIER">limelightAsLimelight3A</field>
<data>{"IDENTIFIER":"limelight"}</data>
<value name="RATE_HZ">
<block type="math_number" id="H[1u2}v#OM_k9,{pr{=0">
<field name="NUM">100</field>
</block>
</value>
<next>
<block type="limelight3A_pipelineSwitch" id="Q5FLY*nX+M|A=,`CGUWC">
<mutation has_output="false"/>
<field name="IDENTIFIER">limelightAsLimelight3A</field>
<data>{"IDENTIFIER":"limelight"}</data>
<value name="INDEX">
<block type="math_number" id="=tk1M_tSf`H]Sm5HL^5{">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="comment" id="student_auto_camera">
<field name="COMMENT">START THE LIMELIGHT: Pipeline 0 detects AprilTags. A fast poll rate gives the control loops frequent steering updates.</field>
<next>
<block type="limelight3A_start" id="xdawdW^@*6K:{:A;vD]V">
<field name="IDENTIFIER">limelightAsLimelight3A</field>
<data>{"IDENTIFIER":"limelight"}</data>
<next>
<block type="telemetry_addTextData_All" id="p2-WS$8S?Jw-PNfxRTM}">
<value name="KEY">
<shadow type="text" id="pyS(?O=K/HIdbHz(~y1K">
<field name="TEXT">Status</field>
</shadow>
</value>
<value name="TEXT">
<shadow type="text" id="|mumq)-`=odJ/#~.m}EG">
<field name="TEXT">READY: triangulate center and stop 24 inches away</field>
</shadow>
</value>
<next>
<block type="telemetry_update" id="(Oy!n}Y1oE#b6-Db7L,=">
<next>
<block type="comment" id="student_auto_init">
<field name="COMMENT">INIT DISPLAY: Scan continuously before START. Show R1-R8 and the triangulated red-center distance while all motor powers remain zero.</field>
<next>
<block type="controls_whileUntil" id="initVisionLoop">
<field name="MODE">WHILE</field>
<value name="BOOL">
<block type="linearOpMode_opModeInInit" id="3-xPo-=y2-fdKfUwa5Vw"/>
</value>
<statement name="DO">
<block type="procedures_callnoreturn" id="gx??A=eCe5iaGPFbf@;)">
<mutation name="scanTags"/>
<next>
<block type="telemetry_addTextData_All" id="RY!+_uas=CA5aS/Q~Ru1">
<value name="KEY">
<shadow type="text" id="!S32#z_=$l@]-UO`UVmh">
<field name="TEXT">INIT vision</field>
</shadow>
</value>
<value name="TEXT">
<shadow type="text" id="63I!}PHDl|L%B|C.idxb">
<field name="TEXT">Showing red tags; triangulating red and blue centers</field>
</shadow>
</value>
<next>
<block type="telemetry_update" id="0T[kVYM07:$tQ+ArpPR!">
<next>
<block type="linearOpMode_idle" id="ATO*MQyL.Mo-2vD}V6A7"/>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="comment" id="student_auto_wait">
<field name="COMMENT">WAIT FOR START: Autonomous movement is blocked until the Driver Station START button is pressed.</field>
<next>
<block type="linearOpMode_waitForStart" id="3Hg7E9}8SyL*g0/x_?YT">
<next>
<block type="variables_set" id="%ECvI_tZ4Z=BJe]UnBgN">
<field name="VAR" id="sel">selecting</field>
<value name="VALUE">
<block type="logic_boolean" id="}={oX[Pmls0bTt@@aV1O">
<field name="BOOL">TRUE</field>
</block>
</value>
<next>
<block type="variables_set" id="%w_XnJb)eM(WQTb]#PMg">
<field name="VAR" id="sid">selectedId</field>
<value name="VALUE">
<block type="math_number" id="?,$W,j]618P2SOxv4LPM">
<field name="NUM">-1</field>
</block>
</value>
<next>
<block type="variables_set" id="]aWN!vw3vUHT=*MePgeC">
<field name="VAR" id="srg">selectedRange</field>
<value name="VALUE">
<block type="math_number" id="F~aO2ScBvW/~0.?B9UAE">
<field name="NUM">9999</field>
</block>
</value>
<next>
<block type="linearOpMode_resetRuntime" id="vu#_-/zH$+B~,f~/ppt+">
<next>
<block type="comment" id="student_auto_acquire">
<field name="COMMENT">ACQUIRE MEANS FIND AND CHOOSE
For up to 3 seconds, scan for enough information to build a center: at least one visible tag from each half of an alliance. The program may see many tags, but it chooses the nearer complete red or blue center. The timeout prevents an endless loop when no usable target exists.</field>
<next>
<block type="controls_whileUntil" id="V}p?leg0I/9G4v%flwH?">
<field name="MODE">WHILE</field>
<value name="BOOL">
<block type="logic_operation" id="ac-eew?0{v)OcRnD+XxV">
<field name="OP">AND</field>
<value name="A">
<block type="logic_operation" id="eDm5PFE6=Dj;-FvDB:BP">
<field name="OP">AND</field>
<value name="A">
<block type="linearOpMode_opModeIsActive" id="R249uP8EpDcI/%|I{Y%0"/>
</value>
<value name="B">
<block type="logic_compare" id="CMCgcoc]ds%ofChGr_g)">
<field name="OP">LT</field>
<value name="A">
<block type="variables_get" id="QnKLIeI?M|*jV%jG:,kB">
<field name="VAR" id="sid">selectedId</field>
</block>
</value>
<value name="B">
<block type="math_number" id=":e~:._oiwDvma5n+)vk1">
<field name="NUM">0</field>
</block>
</value>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="X(teFGhzO9KESa!UHm]1">
<field name="OP">LT</field>
<value name="A">
<block type="linearOpMode_getRuntime_Number" id="/ccYVu;MieE+yOjiN70("/>
</value>
<value name="B">
<block type="math_number" id="f,-vnN$tWVBht7PO8;(9">
<field name="NUM">3</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO">
<block type="procedures_callnoreturn" id="qp88qMZ7l[q{*Jhg`{HF">
<mutation name="scanTags"/>
<next>
<block type="telemetry_addTextData_All" id="Jf|X$8Lq+9uBK5Zt/U%}">
<value name="KEY">
<shadow type="text" id="x-J!Mj_v/f8a1?6}e;()">
<field name="TEXT">Phase</field>
</shadow>
</value>
<value name="TEXT">
<shadow type="text" id="no^Kx[6;n/IG|43phBT4">
<field name="TEXT">Acquiring nearest AprilTag</field>
</shadow>
</value>
<next>
<block type="telemetry_addNumericData_Number" id="N:/6!/;xxmqg(iwGsX[K">
<value name="KEY">
<shadow type="text" id="Hcxe)p^bwG|KTD_jZ1-`">
<field name="TEXT">Selected tag</field>
</shadow>
</value>
<value name="NUMBER">
<block type="variables_get" id="Ty?U4fKW$T,j[S=`11_j">
<field name="VAR" id="sid">selectedId</field>
</block>
</value>
<next>
<block type="telemetry_update" id="_n[|qdNOcq1WB.-{CVP$">
<next>
<block type="linearOpMode_idle" id="lXzDrL?TS+A_siH994@O"/>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="controls_if" id="TdX$b]PNZIpHSGRbuVR_">
<mutation else="1"/>
<value name="IF0">
<block type="logic_compare" id="I2nS|VmZ}EL_7y$)Upi6">
<field name="OP">GTE</field>
<value name="A">
<block type="variables_get" id="pQ0ez=|H2qaB9t4nc~{x">
<field name="VAR" id="sid">selectedId</field>
</block>
</value>
<value name="B">
<block type="math_number" id="bah;GNdP[qY6|rj#5hHQ">
<field name="NUM">0</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id=";,c7W9/NQ-q*=3k5ODw?">
<field name="VAR" id="sel">selecting</field>
<value name="VALUE">
<block type="logic_boolean" id="S;]uSD*B]bnGHWo]/cw.">
<field name="BOOL">FALSE</field>
</block>
</value>
<next>
<block type="variables_set" id="rGxS2nkYvASSQ;!}iF$h">
<field name="VAR" id="ctr">centered</field>
<value name="VALUE">
<block type="math_number" id="A]gcJ_g4%_Ft:0|jFDKl">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="linearOpMode_resetRuntime" id="Ttu?m{CB@eISw~xo^qtA">
<next>
<block type="comment" id="student_auto_center">
<field name="COMMENT">CENTER USING A HORIZONTAL ANGLE
currentTx means the target’s horizontal X angle in degrees; Tx here does not mean transmit. Positive and negative tell which way to turn. Within 2 degrees counts as centered. Requiring 5 centered camera frames filters flicker: one lucky noisy reading cannot end the turn early.</field>
<next>
<block type="controls_whileUntil" id="RfGG^/G`,Rt}st|`[TY(">
<field name="MODE">WHILE</field>
<value name="BOOL">
<block type="logic_operation" id="HOJ;q79R-ux2ZRgeMuDq">
<field name="OP">AND</field>
<value name="A">
<block type="logic_operation" id="6*%Er+;ysBp!noh/TtmE">
<field name="OP">AND</field>
<value name="A">
<block type="linearOpMode_opModeIsActive" id="zs+^;:,?ydJ]F}8ZCqN."/>
</value>
<value name="B">
<block type="logic_compare" id="jx-siJ-Zld`$@_~,E+#8">
<field name="OP">LT</field>
<value name="A">
<block type="variables_get" id="?D1!~-;t~(QLdU5hx8}8">
<field name="VAR" id="ctr">centered</field>
</block>
</value>
<value name="B">
<block type="math_number" id=";5U9b]{=LRsm.o~kk%)u">
<field name="NUM">5</field>
</block>
</value>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="(vw!T|5NpH6J=la]vGt/">
<field name="OP">LT</field>
<value name="A">
<block type="linearOpMode_getRuntime_Number" id="PFmIJ?3eTPua+M7$$)@?"/>
</value>
<value name="B">
<block type="math_number" id="*Ex#542AB!G`meSs3!x;">
<field name="NUM">6</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO">
<block type="procedures_callnoreturn" id="HICCWh=~XqWTv9ul[SL;">
<mutation name="scanTags"/>
<next>
<block type="controls_if" id="r0,cJ/(?`VV4u*QZEZfE">
<mutation else="1"/>
<value name="IF0">
<block type="variables_get" id="Fpp?bfd|v-VflH2a}YIA">
<field name="VAR" id="found">found</field>
</block>
</value>
<statement name="DO0">
<block type="controls_if" id="]Z_bVwki/0?)cL5jKoP1">
<mutation else="1"/>
<value name="IF0">
<block type="logic_compare" id="_*W3Qr@*2wjY/d,]*tgT">
<field name="OP">LTE</field>
<value name="A">
<block type="math_single" id="fnxQHz)^ncZ|R0CUXRTv">
<field name="OP">ABS</field>
<value name="NUM">
<block type="variables_get" id="h*usDht6WE~G1Cd|W.BK">
<field name="VAR" id="ctx">currentTx</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="qwQdIl}~OZo=/F4-34iq">
<field name="NUM">2</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="Mhf4D7~CD3NxoB#Y?UCB">
<field name="VAR" id="ctr">centered</field>
<value name="VALUE">
<block type="math_arithmetic" id="9XCBNC~RSs.zMJAgd~Og">
<field name="OP">ADD</field>
<value name="A">
<block type="variables_get" id="4Up1Q!5!#C*jr,fNb^)W">
<field name="VAR" id="ctr">centered</field>
</block>
</value>
<value name="B">
<block type="math_number" id="on=Ob|SN{+iqT2d`=p#%">
<field name="NUM">1</field>
</block>
</value>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="Y7]}n{KT37te0`*:?lI{">
<field name="IDENTIFIER">front_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id="pTI;3M;4lSMVJKocw;gQ">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="}X/9[9W0Kl,uToBn]?=_">
<field name="IDENTIFIER">back_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id="r5Q#NxQcI:s@B=y_Uugz">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="-,4BaO;@EeAE}2K2ROVW">
<field name="IDENTIFIER">front_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="7GTRrLr$4YV_Bo2W1WB^">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="5CxX-a(vljDe9N/?rg:s">
<field name="IDENTIFIER">back_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="M7)Sndb#}B)@|p3NEF/x">
<field name="NUM">0</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
<statement name="ELSE">
<block type="controls_if" id=")W)E).Vn]8QY(lf9KO|-">
<mutation else="1"/>
<value name="IF0">
<block type="logic_compare" id="yP`W~tUOiHvQ(as9h|G$">
<field name="OP">GT</field>
<value name="A">
<block type="variables_get" id="ww3S!}`=03IiC7]*55,b">
<field name="VAR" id="ctx">currentTx</field>
</block>
</value>
<value name="B">
<block type="math_number" id="-XyK:G_MY.fQhpej_RmF">
<field name="NUM">0</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="mv5VClR=Lqqkb$KM}?a}">
<field name="VAR" id="ctr">centered</field>
<value name="VALUE">
<block type="math_number" id="bSpYZa[.?g:3u!3m5:[4">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="%kUd.8Q(~gBa}W4Q_]|W">
<field name="IDENTIFIER">front_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id="g96i{1D{#GvrA[ZXZ5?v">
<field name="NUM">0.18</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="LSlAhSg)Q)!)^a~!XhFG">
<field name="IDENTIFIER">back_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id="bZXa64V;l%{-@j~w@;/4">
<field name="NUM">0.18</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="`A_OV+zPFIxM-=PFV~?$">
<field name="IDENTIFIER">front_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="_A+tg@{kn[:}A9lMZ},k">
<field name="NUM">-0.24</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="~m2pJ|r=$Pbh$(Vf}d3~">
<field name="IDENTIFIER">back_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="6pL6zs#*?UJ.$QY,CX~C">
<field name="NUM">-0.18</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
<statement name="ELSE">
<block type="variables_set" id="jRN{NMyU^J:B]HOBEG$s">
<field name="VAR" id="ctr">centered</field>
<value name="VALUE">
<block type="math_number" id="1.yzyl^+_9,^sE]ijW~^">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="~2(@cHgaLBB{r_A[kIgh">
<field name="IDENTIFIER">front_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id="%bGMrZN6VA/{JNvOPCw^">
<field name="NUM">-0.18</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="NUZ||[#]%fXRBc@l+E2h">
<field name="IDENTIFIER">back_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id="7TK|R;fizG5,,ZQu/CE]">
<field name="NUM">-0.18</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="UR5mRK6IG]ZN9(^;tyZk">
<field name="IDENTIFIER">front_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="3N=D3(6GC:4Sv9s}G=rR">
<field name="NUM">0.24</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="ETWXcSEWuxiW/{u=cCM4">
<field name="IDENTIFIER">back_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="APQYVA{KUQbo.;+5Ky87">
<field name="NUM">0.18</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</statement>
<next>
<block type="telemetry_addTextData_All" id="}id#w9FN6}E/t{y||UUx">
<value name="KEY">
<shadow type="text" id="?Kf@^O2n_ygZAldjcTX)">
<field name="TEXT">Phase</field>
</shadow>
</value>
<value name="TEXT">
<shadow type="text" id="dlTXR#@jTEcoR~Rc2F@p">
<field name="TEXT">Centering on selected AprilTag</field>
</shadow>
</value>
<next>
<block type="telemetry_addNumericData_Number" id="3C-Klntk]Q6r!=Af$:GW">
<value name="KEY">
<shadow type="text" id="9}dD!tt`5]6~rdP}jq9,">
<field name="TEXT">Horizontal error (deg)</field>
</shadow>
</value>
<value name="NUMBER">
<block type="variables_get" id="uqLD`2:Q90PIge.WpeRx">
<field name="VAR" id="ctx">currentTx</field>
</block>
</value>
<next>
<block type="telemetry_addNumericData_Number" id="a]T|-Q^EfaN^2.(yeXgT">
<value name="KEY">
<shadow type="text" id="DTNrgK]=gZ-vbF2{wJ{2">
<field name="TEXT">Centered frames</field>
</shadow>
</value>
<value name="NUMBER">
<block type="variables_get" id="bzMVomOQ17!iGQxhK?{x">
<field name="VAR" id="ctr">centered</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
<statement name="ELSE">
<block type="dcMotor_setProperty_Number" id="xJSS1CxB9pG]2l}iF{Q8">
<field name="IDENTIFIER">front_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id="N%Q+AY1$^ZzzO^xqC;y?">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="1=.-c)gYjsw=I1HXMt}O">
<field name="IDENTIFIER">back_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id="/Sd7VtUoIDxUWy,-VOCn">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="zmRzn]Kps2p.!.AW}7Cr">
<field name="IDENTIFIER">front_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="^9y{PgSY^?nz:,VuUluO">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="X}C]nv#GUJlRZ!d38WLp">
<field name="IDENTIFIER">back_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="s~3uy~`Qq*tw+=In$WV:">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="telemetry_addTextData_All" id="VdRp6F!3n:=2AGS/I1~u">
<value name="KEY">
<shadow type="text" id="FXdI@{ejLLi|.@hw#W^S">
<field name="TEXT">Status</field>
</shadow>
</value>
<value name="TEXT">
<shadow type="text" id="pF,]*^n0$-!*MJbN}Qsl">
<field name="TEXT">Selected tag not visible; motors stopped</field>
</shadow>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="telemetry_update" id="MVOqQ%=t2ltt%Z$k@6td">
<next>
<block type="linearOpMode_idle" id="f4@htI2ulp5PhmO7ncL`"/>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="dcMotor_setProperty_Number" id="T2}-gAM2zg,H{cJc5Lpc">
<field name="IDENTIFIER">front_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id="^YOZ]n(ddbcX]1RoyyRC">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="RX={]uIJ`ABn6nv8WXV*">
<field name="IDENTIFIER">back_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id="(2]q7kOKu!0zH`+mhlgo">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="Qs:]JN$+xV$(:r?Xyg#Z">
<field name="IDENTIFIER">front_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="4t6Lh)rW-.U:(c8KS`,0">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="?orwvi.nS.x`5zQkZY?9">
<field name="IDENTIFIER">back_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="y(*Vi;nVYM.ON(vcOpw[">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="controls_if" id="o|vENq7R!p-F3y_XTEu,">
<mutation else="1"/>
<value name="IF0">
<block type="logic_compare" id="6gE.$(t.qJh%;XT(aJdC">
<field name="OP">GTE</field>
<value name="A">
<block type="variables_get" id="E03{:m!o6uI~pG7Qmf71">
<field name="VAR" id="ctr">centered</field>
</block>
</value>
<value name="B">
<block type="math_number" id="m*4%|@E%Mwo/v`)QmbwS">
<field name="NUM">5</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="LeMT)jH_Wua{~#wi52ne">
<field name="VAR" id="start">startRange</field>
<value name="VALUE">
<block type="variables_get" id="SFor[_6$-EVq3M9~Ehpp">
<field name="VAR" id="crg">currentRange</field>
</block>
</value>
<next>
<block type="variables_set" id="U[B~OcT6,G~WN`dRzM@U">
<field name="VAR" id="target">targetRange</field>
<value name="VALUE">
<block type="math_number" id=";eC.294ec[NUcsDCXV+U">
<field name="NUM">24</field>
</block>
</value>
<next>
<block type="controls_if" id="RJ[}FhZ-)|L]/xsnHiad">
<mutation else="1"/>
<value name="IF0">
<block type="logic_compare" id="w7bNo})tm)P?}@ASw+)/">
<field name="OP">GTE</field>
<value name="A">
<block type="variables_get" id="Hu9#{#Dh{w(6B27H]OuK">
<field name="VAR" id="target">targetRange</field>
</block>
</value>
<value name="B">
<block type="math_number" id="Ala|Xn+[rP7D6mw]Dk2{">
<field name="NUM">10</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="?5~ayadRs[QwrPdmL5JO">
<field name="VAR" id="done">done</field>
<value name="VALUE">
<block type="logic_boolean" id="3eUt9#L)LL4^0JHd~QWv">
<field name="BOOL">FALSE</field>
</block>
</value>
<next>
<block type="linearOpMode_resetRuntime" id="J6~AM5*1xozsOB`kEcn^">
<next>
<block type="comment" id="student_auto_approach">
<field name="COMMENT">DRIVE TO A 24-INCH RANGE
Range means straight-line distance from camera to calculated center. The robot drives while currentRange is greater than 24 inches and stops at 24 or less. Small unequal left/right powers correct the horizontal angle while moving. The 8-second timeout and found flag stop the robot if vision fails.</field>
<next>
<block type="controls_whileUntil" id="kjYEy$N|+J6=7p+lTuKh">
<field name="MODE">WHILE</field>
<value name="BOOL">
<block type="logic_operation" id="pS69bpv7UnE[*U5_Lc^c">
<field name="OP">AND</field>
<value name="A">
<block type="logic_operation" id="g_w)C_pf!@f`v|U={3vI">
<field name="OP">AND</field>
<value name="A">
<block type="linearOpMode_opModeIsActive" id="Oaa{rmciaFfN:J,mqos}"/>
</value>
<value name="B">
<block type="logic_negate" id="mRs(F:to$JODA6z*J]M`">
<value name="BOOL">
<block type="variables_get" id="dMPd6T1H}F27B?K)wb(y">
<field name="VAR" id="done">done</field>
</block>
</value>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="=rY6%AZpIKzgDF-PSHA#">
<field name="OP">LT</field>
<value name="A">
<block type="linearOpMode_getRuntime_Number" id="`3yWEr89zKFgz9w/|s3t"/>
</value>
<value name="B">
<block type="math_number" id="Aefx.85nV.h6S(+){r~r">
<field name="NUM">8</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO">
<block type="procedures_callnoreturn" id="~;-.~$R.51oben0r2*Pm">
<mutation name="scanTags"/>
<next>
<block type="controls_if" id="4v(1W]zaMn7yJwh8Lb%G">
<mutation else="1"/>
<value name="IF0">
<block type="variables_get" id="AH^c8}R9B@L=M3CQnEgP">
<field name="VAR" id="found">found</field>
</block>
</value>
<statement name="DO0">
<block type="controls_if" id="L*{s)Y[7,8(BK7b||5GI">
<mutation else="1"/>
<value name="IF0">
<block type="logic_compare" id="dayYC7Yw4Wpj8f}o2I#O">
<field name="OP">LTE</field>
<value name="A">
<block type="variables_get" id="`#eMn%6meYPim#zphh=W">
<field name="VAR" id="crg">currentRange</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="lbU}_G}}?x~)Q._2~vZR">
<field name="VAR" id="target">targetRange</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="dcMotor_setProperty_Number" id="v(O}[Awh,XjDorf;BDL.">
<field name="IDENTIFIER">front_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id="Dy7l1#=cm:~9rqQ/8eIt">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="):ATLX0ko9Wt~z/~(n3n">
<field name="IDENTIFIER">back_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id="z%8(P1hjP[Lm!yv-gBLX">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="oM,d@r`L37+IF6onfIe#">
<field name="IDENTIFIER">front_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="5X,d:L6Sq|#7P6#e-JfI">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="i!M-mG?=t:~kdS/+jCM_">
<field name="IDENTIFIER">back_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="=y%{$6w/5d*1dx;bXuk2">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="variables_set" id="0:SoO|QYm*h@Uv@X+Del">
<field name="VAR" id="done">done</field>
<value name="VALUE">
<block type="logic_boolean" id="0dJ(vfC`bl?7/3=YXWTi">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
<statement name="ELSE">
<block type="controls_if" id="/c8A,7;p@uRR1^V*RoJ4">
<mutation else="1"/>
<value name="IF0">
<block type="logic_compare" id="p?wNk:=$Zy]fCBlKo-Ba">
<field name="OP">GT</field>
<value name="A">
<block type="variables_get" id="S}y53@3zuuV?U0#ZWmJm">
<field name="VAR" id="ctx">currentTx</field>
</block>
</value>
<value name="B">
<block type="math_number" id="=LQplSaGc(0XjPp!K|UY">
<field name="NUM">2</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="dcMotor_setProperty_Number" id="XGQR3Y/If,H(Vz4;A}bv">
<field name="IDENTIFIER">front_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id="/0hrsSB*D(,OAFSN]NKs">
<field name="NUM">0.3</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id=",*|bkpB4OZGc_dLnR{76">
<field name="IDENTIFIER">back_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id="]XtZ[7tIU}3x/YsT1D$O">
<field name="NUM">0.3</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="Ea@Dw1O9xR+=F-kEO5U=">
<field name="IDENTIFIER">front_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="rxGdfJEdWdo_N#}w3Ka2">
<field name="NUM">0.26</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="K2[`bNx|-Y=MVlKejH,1">
<field name="IDENTIFIER">back_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="M|IG+$Zhfi6-j7!zyUY_">
<field name="NUM">0.2</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
<statement name="ELSE">
<block type="controls_if" id="CdGZK-TJfb*/5U*uYwuU">
<mutation else="1"/>
<value name="IF0">
<block type="logic_compare" id="926~xobzw0qsm9Hzy[,x">
<field name="OP">LT</field>
<value name="A">
<block type="variables_get" id="15p8i2}M_-_)?vH{#U5A">
<field name="VAR" id="ctx">currentTx</field>
</block>
</value>
<value name="B">
<block type="math_number" id="7/**W+,ph$KYrQ2$^{DL">
<field name="NUM">-2</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="dcMotor_setProperty_Number" id=")AZ.$|4/~c5bcNePu25)">
<field name="IDENTIFIER">front_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id="cR:@JjK*{aP9/1$:Do,6">
<field name="NUM">0.2</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="`2q:Hy#)%V8gIEp(YO^}">
<field name="IDENTIFIER">back_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id=".*n|s{f]}o=zRe.:K8l+">
<field name="NUM">0.2</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="CvEw,by{KuH3iEC{LI!I">
<field name="IDENTIFIER">front_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="V~5$f59ZxoGS[Ofuo_[F">
<field name="NUM">0.36</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="WjL]CU.q:xbC}r8-waI6">
<field name="IDENTIFIER">back_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="Z0|teBUwrt`Z/|#FXP`W">
<field name="NUM">0.3</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
<statement name="ELSE">
<block type="dcMotor_setProperty_Number" id="]GqL8KAb+:Xxs|Zx+MYa">
<field name="IDENTIFIER">front_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id="l|aDcPUv.PSabyV,{~$G">
<field name="NUM">0.25</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="[0SrC^UVsg!4bo}X`VUz">
<field name="IDENTIFIER">back_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id="D)X6PZv}ulUD9([VKP}i">
<field name="NUM">0.25</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="rkd^IWf^tZ;!.WVs]B:|">
<field name="IDENTIFIER">front_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="*kqKyU:=jz!w)F{3|)mJ">
<field name="NUM">0.31</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="Z|S$)/awwn[v~,OwRn}#">
<field name="IDENTIFIER">back_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="Hr{wZ@Pryj+80iKa$^0I">
<field name="NUM">0.25</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</statement>
</block>
</statement>
</block>
</statement>
<statement name="ELSE">
<block type="dcMotor_setProperty_Number" id="9EOb]Qe-+A|!)8=SCel_">
<field name="IDENTIFIER">front_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id="VSDP.OORYw0=sa5M5UC;">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="=GqN8E@tP3gzE#}eA;NC">
<field name="IDENTIFIER">back_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id="4pnvUT-w9RkU:`AMDKsG">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="U,bt.9gPKPK]iR-q#/HG">
<field name="IDENTIFIER">front_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="NlBC+SGp.YV6H#xyU=%U">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="vs;K`Yloor-W~%|V.?$Y">
<field name="IDENTIFIER">back_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="$S$6W5G:h/84:V9Ur;J6">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="telemetry_addTextData_All" id="BnKw9q3C*yjJ6*a@)aIp">
<value name="KEY">
<shadow type="text" id="|pSto7)W|ZjT(~FmfOgZ">
<field name="TEXT">Status</field>
</shadow>
</value>
<value name="TEXT">
<shadow type="text" id="DRq48WmEvDBn`Co3q|:V">
<field name="TEXT">Selected tag not visible; motors stopped</field>
</shadow>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="telemetry_addTextData_All" id="azTwCL~AJMDF;^[.~Q}(">
<value name="KEY">
<shadow type="text" id="5}3g%^da$)U?5=9eNCQ!">
<field name="TEXT">Phase</field>
</shadow>
</value>
<value name="TEXT">
<shadow type="text" id="A6nc,PX3M(qSQ[$W8|@~">
<field name="TEXT">Driving toward center; stopping at 24 inches</field>
</shadow>
</value>
<next>
<block type="telemetry_addNumericData_Number" id="`RoL{:N0./-#y~Q}I3Pw">
<value name="KEY">
<shadow type="text" id=")@3?93y.jyS{LYJ]~bD4">
<field name="TEXT">Start range (in)</field>
</shadow>
</value>
<value name="NUMBER">
<block type="variables_get" id="e)`qv)h9dGL^vnNgN2L-">
<field name="VAR" id="start">startRange</field>
</block>
</value>
<next>
<block type="telemetry_addNumericData_Number" id="HQM^N?pjBoFgPB8O|]Jr">
<value name="KEY">
<shadow type="text" id="pb#%7lwREdXU1Lxq0w=I">
<field name="TEXT">Current range (in)</field>
</shadow>
</value>
<value name="NUMBER">
<block type="variables_get" id=";qgOaK-`.4O;y5m4)u#:">
<field name="VAR" id="crg">currentRange</field>
</block>
</value>
<next>
<block type="telemetry_addNumericData_Number" id="8$9w/~i5rb-*+dyykdf0">
<value name="KEY">
<shadow type="text" id="%*{G`fW7iHB~i1h#k=.~">
<field name="TEXT">Distance traveled (in)</field>
</shadow>
</value>
<value name="NUMBER">
<block type="math_arithmetic" id="XHnQDbGJ]aK1f_FY%W%K">
<field name="OP">MINUS</field>
<value name="A">
<block type="variables_get" id="C@FyyY6;jbUXRz[=4T~d">
<field name="VAR" id="start">startRange</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="zqd1wtZ3_su+U(D,-`ql">
<field name="VAR" id="crg">currentRange</field>
</block>
</value>
</block>
</value>
<next>
<block type="telemetry_update" id="-?S[RVB).9;4]5:j8+Ur">
<next>
<block type="linearOpMode_idle" id="0wq)vCeM^tXxq~~v{;ZO"/>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="dcMotor_setProperty_Number" id="TpuDxslI?]bC!pIB?)fw">
<field name="IDENTIFIER">front_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id=":w4]cn!d(^0Kb|:9{gCi">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="?P~`gV|G,F$eJ=YJ}XbF">
<field name="IDENTIFIER">back_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id="`~rVA_kc-AFHU)b.Knba">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="~jJ(ykVtp;FB=-;57q:.">
<field name="IDENTIFIER">front_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="]!D9~C7O`_Hl}I*;1GHw">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="Vz:wv*#C}z~~,:6nYv:P">
<field name="IDENTIFIER">back_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="FY(SEa!Cg[0BHN*Qb.Vs">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="controls_if" id="cpdCB_cHY+6$8.|yAj)(">
<mutation else="1"/>
<value name="IF0">
<block type="variables_get" id="hb$qk@-Jms`LM#mFllpi">
<field name="VAR" id="done">done</field>
</block>
</value>
<statement name="DO0">
<block type="telemetry_addTextData_All" id="Lp8{C]3iBM?G3^Z/78)N">
<value name="KEY">
<shadow type="text" id="98pBc)`~d-Wm|nmka.%?">
<field name="TEXT">Result</field>
</shadow>
</value>
<value name="TEXT">
<shadow type="text" id="Ak[DOb7?oJ5mAk}b#`,}">
<field name="TEXT">COMPLETE: centered and reached 24-inch range</field>
</shadow>
</value>
</block>
</statement>
<statement name="ELSE">
<block type="telemetry_addTextData_All" id="dq?)H3Xg[B~B(uSi5q@f">
<value name="KEY">
<shadow type="text" id="Y84{E:%xT9C#A2Nd)*ef">
<field name="TEXT">Result</field>
</shadow>
</value>
<value name="TEXT">
<shadow type="text" id="Enif3.dGEYj87r58]1LQ">
<field name="TEXT">STOPPED: approach timeout or tag unavailable</field>
</shadow>
</value>
</block>
</statement>
<next>
<block type="telemetry_update" id=";T^-B_UP9}ce:YSBg|]."/>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
<statement name="ELSE">
<block type="dcMotor_setProperty_Number" id="p$WZ5ZN((|@3@,Wb(Dw$">
<field name="IDENTIFIER">front_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id="y/]!lY=HT53GO5)PV?Ij">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="BbUQHx@-oHVc5pIC,%%0">
<field name="IDENTIFIER">back_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id="=MY+_l*JvLS-Z,PSwHMn">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="CTM/3ECV!MlQfBJ=[L9=">
<field name="IDENTIFIER">front_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="i)}3mIZ]bf(,YG}^=eDL">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="vVJkG]8L(%Q2jJQsvI3V">
<field name="IDENTIFIER">back_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="A}]5j)azY4xyA7NVvI9x">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="telemetry_addTextData_All" id="hg1#B/]JXqywy1ud@BAk">
<value name="KEY">
<shadow type="text" id="q`9r^EY8iJEMw}+8.m8l">
<field name="TEXT">Result</field>
</shadow>
</value>
<value name="TEXT">
<shadow type="text" id="1/HE=km#wN0tv+(eRP)^">
<field name="TEXT">STOPPED: already within 24-inch center range</field>
</shadow>
</value>
<next>
<block type="telemetry_update" id="rIlF/l|RWcnriT1?$l,/"/>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</statement>
<statement name="ELSE">
<block type="dcMotor_setProperty_Number" id="_-R4/;kqeV@XlWa[V(D;">
<field name="IDENTIFIER">front_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id="_B%%?)bYhlN}Ws!F=_+;">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="~tN!KW.;CMrO;bDn~3X@">
<field name="IDENTIFIER">back_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id="*{ursd.8%yL)i[+1-v@a">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="7c3VRES#s+nHXW9qv]@j">
<field name="IDENTIFIER">front_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="aIy7x+[+MI6zj-!~HO(E">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="mk]QyhB5*cNp|ZbFNt0_">
<field name="IDENTIFIER">back_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="Qz}T9igE,X5jWD|j`OWI">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="telemetry_addTextData_All" id="JfWIoj_+*A3Fa{*8h2ao">
<value name="KEY">
<shadow type="text" id="#LOTPwt[yj!_WV07#|kL">
<field name="TEXT">Result</field>
</shadow>
</value>
<value name="TEXT">
<shadow type="text" id="TkT+J7h|bXq:h(VooThf">
<field name="TEXT">STOPPED: unable to center before timeout</field>
</shadow>
</value>
<next>
<block type="telemetry_update" id="GAC:}MVyj/lr7A^C)73o"/>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
<statement name="ELSE">
<block type="dcMotor_setProperty_Number" id="yDTF$Z.M}=gjU(8rGeq:">
<field name="IDENTIFIER">front_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id="|s79egc(AIDm27Ba%suH">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="0]`(XZCwDM`,K`9vfj}B">
<field name="IDENTIFIER">back_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id="H![t}^oFF%o3JJi^q[PF">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="0#LSl]wah29brx^+NV+R">
<field name="IDENTIFIER">front_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="LUVgknk4@OrW^zRn(!H!">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="v(YcS@-L.,/V[kIX,(||">
<field name="IDENTIFIER">back_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="soO%yxZ5b0r-Mv[;[Ekv">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="telemetry_addTextData_All" id="hExcYt%I?RrZOB=mm?ef">
<value name="KEY">
<shadow type="text" id="SDj9}vpiETp~m?ZDHePh">
<field name="TEXT">Result</field>
</shadow>
</value>
<value name="TEXT">
<shadow type="text" id="O`yY/e)2,lJv93nN`=UM">
<field name="TEXT">STOPPED: no AprilTag acquired</field>
</shadow>
</value>
<next>
<block type="telemetry_update" id="END_!||ag;A5CDhupV(G"/>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="dcMotor_setProperty_Number" id="!AQ(=wcinzeOVIb!!x+8">
<field name="IDENTIFIER">front_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id="pV#_fXjpTycG-G{5f9nU">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="X1A./*l8f#s+HkZcgY}$">
<field name="IDENTIFIER">back_left_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_left_drive"}</data>
<value name="VALUE">
<block type="math_number" id="PDPaBfn8c8WLf44jDEmk">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="lh!xuG:cO{I?/eMtxyq,">
<field name="IDENTIFIER">front_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"front_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="8E?I[pHr}xsCy3P`?xiE">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="pxfSgqJ|F[Y!|XPXV$g;">
<field name="IDENTIFIER">back_right_driveAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"back_right_drive"}</data>
<value name="VALUE">
<block type="math_number" id="^[R?${Xs*mB]T[*S1t.Z">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="comment" id="student_auto_stop">
<field name="COMMENT">FINAL SAFETY STOP: Set every motor to zero and stop the Limelight when autonomous finishes.</field>
<next>
<block type="limelight3A_stop" id="(s;EhlDFidrGiaL1xvxL">
<field name="IDENTIFIER">limelightAsLimelight3A</field>
<data>{"IDENTIFIER":"limelight"}</data>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
<block type="procedures_defnoreturn" id="Il~~.L[c=%xjk}NiEtqo" x="25" y="5645">
<field name="NAME">scanTags</field>
<comment pinned="false" h="80" w="160">SCAN APRILTAGS

This helper reads the Limelight, labels BIOBUZZ tags, estimates hidden R4/R5 or B4/B5 endpoints with trigonometry, and calculates each cluster center.</comment>
<statement name="STACK">
<block type="comment" id="student_auto_scan_reset">
<field name="COMMENT">FRESH FRAME, FRESH FLAGS
Every camera frame is a new measurement. Reset found and visible flags before reading it. Otherwise a tag that disappeared could leave an old true value behind, making the robot steer using stale information.</field>
<next>
<block type="variables_set" id="1y+ddDjTd11`du76eL(V">
<field name="VAR" id="found">found</field>
<value name="VALUE">
<block type="logic_boolean" id="j?J#%/B5[}wks1evqyOj">
<field name="BOOL">FALSE</field>
</block>
</value>
<next>
<block type="variables_set" id="redCenterDisplayReset">
<field name="VAR" id="red_center_display">redCenterDistance</field>
<value name="VALUE">
<shadow type="text" id="S7C:5X+{n+B/v?[7A;d=">
<field name="TEXT">not available</field>
</shadow>
</value>
<next>
<block type="variables_set" id="Fqku0Ip5h+^oC48}6sXm">
<field name="VAR" id="pair_r4_seen">r4Seen</field>
<value name="VALUE">
<block type="logic_boolean" id="i$j)c3Cb},U([qxcSoaL">
<field name="BOOL">FALSE</field>
</block>
</value>
<next>
<block type="variables_set" id="a[9O9M3ovV=a=:a@0@}0">
<field name="VAR" id="pair_r5_seen">r5Seen</field>
<value name="VALUE">
<block type="logic_boolean" id="e.B#JvE~fz}4~{!Au7|p">
<field name="BOOL">FALSE</field>
</block>
</value>
<next>
<block type="variables_set" id="Zy+gD:$67cVT+%}h*-[0">
<field name="VAR" id="pair_b4_seen">b4Seen</field>
<value name="VALUE">
<block type="logic_boolean" id="3AB+jWz|R:FZu_g=(U4M">
<field name="BOOL">FALSE</field>
</block>
</value>
<next>
<block type="variables_set" id="4JzXzoz1lkWAGs0MlOE|">
<field name="VAR" id="pair_b5_seen">b5Seen</field>
<value name="VALUE">
<block type="logic_boolean" id="r#UYc`.ZB+.Yr|ta--v)">
<field name="BOOL">FALSE</field>
</block>
</value>
<next>
<block type="variables_set" id="7m}of]~.z7Ep^0dDPV[v">
<field name="VAR" id="range_r1">R1Distance</field>
<value name="VALUE">
<shadow type="text" id="F$Y.:Cyzq9OhknY5@`+E">
<field name="TEXT">not visible</field>
</shadow>
</value>
<next>
<block type="variables_set" id="c]aV*-4cVriOc[%#]i(j">
<field name="VAR" id="range_r2">R2Distance</field>
<value name="VALUE">
<shadow type="text" id="J;dlq3TN(7#+CDi4^{#q">
<field name="TEXT">not visible</field>
</shadow>
</value>
<next>
<block type="variables_set" id="D,,w2MR%R+d*(Cu=rY10">
<field name="VAR" id="range_r3">R3Distance</field>
<value name="VALUE">
<shadow type="text" id="zl_Ya|U$fNVYc(X49dIH">
<field name="TEXT">not visible</field>
</shadow>
</value>
<next>
<block type="variables_set" id=":nuf2K_b?#M!330,VkU@">
<field name="VAR" id="range_r4">R4Distance</field>
<value name="VALUE">
<shadow type="text" id="[k9ql`p3YxTldD$9.hY;">
<field name="TEXT">not visible</field>
</shadow>
</value>
<next>
<block type="variables_set" id="[W1hG7j|hTR82nh#9izl">
<field name="VAR" id="range_r5">R5Distance</field>
<value name="VALUE">
<shadow type="text" id="daDQn)pSOSkv3hbPELak">
<field name="TEXT">not visible</field>
</shadow>
</value>
<next>
<block type="variables_set" id="o$=A[!A#E,l1fmeh$v0]">
<field name="VAR" id="range_r6">R6Distance</field>
<value name="VALUE">
<shadow type="text" id="MroBX7,0.+4^a$y#E+Iz">
<field name="TEXT">not visible</field>
</shadow>
</value>
<next>
<block type="variables_set" id="#-S`,[uuP_||[Pp`5+hD">
<field name="VAR" id="range_r7">R7Distance</field>
<value name="VALUE">
<shadow type="text" id="3YqgO_2KCcn%f{z.D*rk">
<field name="TEXT">not visible</field>
</shadow>
</value>
<next>
<block type="variables_set" id="=g6MvxQLp3CAY?Ll6E).">
<field name="VAR" id="range_r8">R8Distance</field>
<value name="VALUE">
<shadow type="text" id="jk*L|Z=4]PBa_flsJFUt">
<field name="TEXT">not visible</field>
</shadow>
</value>
<next>
<block type="variables_set" id="0_!B^I[R)W0dn|`:kDfN">
<field name="VAR" id="range_b1">B1Distance</field>
<value name="VALUE">
<shadow type="text" id="7g/.L,E9~R]YPn-F5=wN">
<field name="TEXT">not visible</field>
</shadow>
</value>
<next>
<block type="variables_set" id="E$r#nHeQ#CkwyE37!*B+">
<field name="VAR" id="range_b2">B2Distance</field>
<value name="VALUE">
<shadow type="text" id="A8)BTKSP9YEFAR[E.Zst">
<field name="TEXT">not visible</field>
</shadow>
</value>
<next>
<block type="variables_set" id="_S{N;PZoAtqG+#OX_+?V">
<field name="VAR" id="range_b3">B3Distance</field>
<value name="VALUE">
<shadow type="text" id="o2@JG2%dMgzMhxp0_G:6">
<field name="TEXT">not visible</field>
</shadow>
</value>
<next>
<block type="variables_set" id="OzbFdt[WbF%}oVm@;O?x">
<field name="VAR" id="range_b4">B4Distance</field>
<value name="VALUE">
<shadow type="text" id="YlH!YHoSFw%[,qG9396P">
<field name="TEXT">not visible</field>
</shadow>
</value>
<next>
<block type="variables_set" id="xJ.,^vWl,MlE}z,,71Qs">
<field name="VAR" id="range_b5">B5Distance</field>
<value name="VALUE">
<shadow type="text" id="UJt?V=M{BmEZvTHvqCr%">
<field name="TEXT">not visible</field>
</shadow>
</value>
<next>
<block type="variables_set" id="*Kb]{vM@GaF#9VXDr`f@">
<field name="VAR" id="range_b6">B6Distance</field>
<value name="VALUE">
<shadow type="text" id="@hI$.4K+aPt5/=[]NZ^t">
<field name="TEXT">not visible</field>
</shadow>
</value>
<next>
<block type="variables_set" id="5ju5q0Z9tJJ4RNr2#hcg">
<field name="VAR" id="range_b7">B7Distance</field>
<value name="VALUE">
<shadow type="text" id="Nq43t~NlUq4qO62hOe4r">
<field name="TEXT">not visible</field>
</shadow>
</value>
<next>
<block type="variables_set" id=",bD9r=0XMEFB)OaoKw`#">
<field name="VAR" id="range_b8">B8Distance</field>
<value name="VALUE">
<shadow type="text" id="k9{%E9$^*svn]BLTZ.:y">
<field name="TEXT">not visible</field>
</shadow>
</value>
<next>
<block type="comment" id="student_auto_scan_result">
<field name="COMMENT">WHAT THE LIMELIGHT RETURNS
getLatestResult retrieves the newest processed image result. Fiducial means a known visual marker. FiducialResults is a list of all recognized AprilTags, and the for-each loop performs the same geometry on each list item.</field>
<next>
<block type="variables_set" id="EhyQf8d4a3-WS;y=Tt9!">
<field name="VAR" id="r">result</field>
<value name="VALUE">
<block type="limelight3A_getLatestResult" id="IcI-XY7L7v7HOs[LT6V+">
<field name="IDENTIFIER">limelightAsLimelight3A</field>
<data>{"IDENTIFIER":"limelight"}</data>
</block>
</value>
<next>
<block type="controls_if" id="YYlU5|kC`P~?IlOmOhd%">
<mutation else="1"/>
<value name="IF0">
<block type="misc_isNotNull" id="ILsa0Jk*+A=_UY@uT-V:">
<value name="VALUE">
<block type="variables_get" id="o*mrIjcO7N+5Igu]2R5s">
<field name="VAR" id="r">result</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="p@W`t3?x+|r4c$U!4j[v">
<field name="VAR" id="l">list</field>
<value name="VALUE">
<block type="llResult_getProperty_Array" id="Z_b;Vf)xYxelXP;eB2%A">
<field name="PROP">FiducialResults</field>
<value name="LL_RESULT">
<block type="variables_get" id="*UFa^/Y,H`Mgl{%2vzMo">
<field name="VAR" id="r">result</field>
</block>
</value>
</block>
</value>
<next>
<block type="comment" id="student_auto_scan_loop">
<field name="COMMENT">CAMERA COORDINATES AND POSE
Pose means position plus rotation. X is left/right, Y is up/down, and Z is forward from the camera. Yaw is left/right rotation; pitch is up/down tilt. All are needed because the tag strip may be viewed from an angle.</field>
<next>
<block type="controls_forEach" id="+7S~$yVzsN@cw_xD!H{o">
<field name="VAR" id="t">tag</field>
<value name="LIST">
<block type="variables_get" id="!(9Z:OBug.#?]vZ90dOb">
<field name="VAR" id="l">list</field>
</block>
</value>
<statement name="DO">
<block type="variables_set" id="}0cb@Y,7/~Ma+bGHSK1#">
<field name="VAR" id="p">pose</field>
<value name="VALUE">
<block type="llResultTypesFiducialResult_getProperty_Pose3D" id="z3+agr=TR`XKWyhsAj7B">
<field name="PROP">TargetPoseCameraSpace</field>
<value name="FIDUCIAL_RESULT">
<block type="variables_get" id="Z0G:yy[H@1_AJ~OJ^$Vr">
<field name="VAR" id="t">tag</field>
</block>
</value>
</block>
</value>
<next>
<block type="comment" id="student_auto_scan_xyz">
<field name="COMMENT">SIGNED X, Y, Z VALUES
A signed number contains direction and size. For example, negative X may mean left and positive X right. Squaring removes the signs for distance, but keeping signs before that is essential for steering and projecting hidden points.</field>
<next>
<block type="variables_set" id="VkVyfZ|ZvkW?LCluubq7">
<field name="VAR" id="x">x</field>
<value name="VALUE">
<block type="pose3D_getProperty_Number" id="M~%{IDw?m9I?rPeay!Nw">
<field name="PROP">position.x</field>
<value name="POSE_3D">
<block type="variables_get" id="9dH3HV51$-_pg;sFhT6#">
<field name="VAR" id="p">pose</field>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="hkRmv=rgfQ[HtfgMbw#S">
<field name="VAR" id="y">y</field>
<value name="VALUE">
<block type="pose3D_getProperty_Number" id="p:DY%MUf0H1IIoR+]N#Y">
<field name="PROP">position.y</field>
<value name="POSE_3D">
<block type="variables_get" id="9T9`cN:QPK[)+hw{V]5O">
<field name="VAR" id="p">pose</field>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="ENE0nX3sI:~2cI|JAT-#">
<field name="VAR" id="z">z</field>
<value name="VALUE">
<block type="pose3D_getProperty_Number" id="A(IZdfltA0U_/8PeLevs">
<field name="PROP">position.z</field>
<value name="POSE_3D">
<block type="variables_get" id="-O$0jB/{-7Bh$|7X]z%W">
<field name="VAR" id="p">pose</field>
</block>
</value>
</block>
</value>
<next>
<block type="comment" id="student_auto_scan_angles">
<field name="COMMENT">DEGREES AND ROTATION
Yaw is like turning your head left/right; pitch is like nodding up/down. The Limelight gives degrees. The Blocks sine and cosine operations convert these degree angles internally, so students do not need to calculate radians.</field>
<next>
<block type="variables_set" id="triYawSet">
<field name="VAR" id="tri_yaw">yaw</field>
<value name="VALUE">
<block type="pose3D_getProperty_Number" id="dJJ=O6c7S96Cpb3{!N9K">
<field name="PROP">orientation.yaw</field>
<value name="POSE_3D">
<block type="variables_get" id="^v^VOER5)[^q7Fx0m{tn">
<field name="VAR" id="p">pose</field>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="triPitchSet">
<field name="VAR" id="tri_pitch">pitch</field>
<value name="VALUE">
<block type="pose3D_getProperty_Number" id="Zdpm=`RTmqNS6XS)cG7,">
<field name="PROP">orientation.pitch</field>
<value name="POSE_3D">
<block type="variables_get" id=".i:S5Y|L15RU6se_#;C9">
<field name="VAR" id="p">pose</field>
</block>
</value>
</block>
</value>
<next>
<block type="comment" id="student_auto_scan_pythagorean">
<field name="COMMENT">WHY SQUARE, ADD, THEN SQUARE ROOT?
Each axis is one side of a 3D right-angle path. Squaring makes every contribution positive. Adding X²+Y²+Z² combines all three dimensions. The square root returns the direct camera-to-tag distance. Multiply meters by 39.3701 for inches.</field>
<next>
<block type="variables_set" id="J*sDur3p@4Yg|YF-Wtc+">
<field name="VAR" id="rg">range</field>
<value name="VALUE">
<block type="math_arithmetic" id="$xky0E:@O.v3Qnlt~_A%">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="math_single" id="{G[.r:^@+}@Z2Vh.Q?2I">
<field name="OP">ROOT</field>
<value name="NUM">
<block type="math_arithmetic" id="?oiTYZY`.V=^9;JJHc[+">
<field name="OP">ADD</field>
<value name="A">
<block type="math_arithmetic" id="F|.T{o,H]/J87.]$45-$">
<field name="OP">ADD</field>
<value name="A">
<block type="math_arithmetic" id="e_YptB4CjMva6(q?pI6%">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="variables_get" id="fY[_%[%tD2DRlJ3mt=+F">
<field name="VAR" id="x">x</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="YrR=VhtA0GUMvh.Fng?=">
<field name="VAR" id="x">x</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_arithmetic" id="i~{23QyV3vRsI4^=^~n5">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="variables_get" id="+aYF?#tEv6NwD^qk*:#L">
<field name="VAR" id="y">y</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="(p+=.UB1|v/;,*7-T|tE">
<field name="VAR" id="y">y</field>
</block>
</value>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_arithmetic" id="3XLfp2^Cc!-)gGO,N^dN">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="variables_get" id="RXwDs:H)ks0DJS@~,:h]">
<field name="VAR" id="z">z</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="NNbQ(:8]?OWi6zGYy^r~">
<field name="VAR" id="z">z</field>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="xS+=sCGbyJM=JSiZE%Nv">
<field name="NUM">39.3701</field>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="=XAOIynQ!%s=7EWIL$U(">
<field name="VAR" id="id">id</field>
<value name="VALUE">
<block type="llResultTypesFiducialResult_getProperty_Number" id="jIqs^JOkW7f4*d$L;;O2">
<field name="PROP">FiducialId</field>
<value name="FIDUCIAL_RESULT">
<block type="variables_get" id="Qqg~ZE]aq?z4wdLe5Itc">
<field name="VAR" id="t">tag</field>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="sW=HC~*i$94FG#9~re8^">
<field name="VAR" id="tx">tx</field>
<value name="VALUE">
<block type="llResultTypesFiducialResult_getProperty_Number" id="UXv{s%Ij.cP]1@D@_D@f">
<field name="PROP">TargetXDegrees</field>
<value name="FIDUCIAL_RESULT">
<block type="variables_get" id="]9}e2=5Gb1[LHQXkg)EG">
<field name="VAR" id="t">tag</field>
</block>
</value>
</block>
</value>
<next>
<block type="comment" id="student_auto_scan_groups">
<field name="COMMENT">WHY FOUR GROUP NUMBERS?
0 means red first half R1–R4; 1 means red second half R5–R8; 2 and 3 are the matching blue halves. One visible tag in group 0 plus one in group 1 can build the red center. Groups 2 and 3 build blue.</field>
<next>
<block type="variables_set" id="triGroupReset">
<field name="VAR" id="tri_group">group</field>
<value name="VALUE">
<block type="math_number" id="wzm.~ob?n?^J}2aVS~x;">
<field name="NUM">-1</field>
</block>
</value>
<next>
<block type="variables_set" id="triOffsetReset">
<field name="VAR" id="tri_offset">offset</field>
<value name="VALUE">
<block type="math_number" id="%NCn@zqp1i=6V^#~#mga">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="comment" id="student_auto_scan_ids">
<field name="COMMENT">BIOBUZZ TAG MAP AND OFFSETS
IDs 30–37 are red R1–R8; IDs 38–45 are blue B1–B8. Tag centers within each four-tag strip sit at -6.5, -2.75, +2.75, and +6.5 inches. Those known measurements let one visible tag estimate a hidden endpoint.</field>
<next>
<block type="controls_if" id="mi^Y}S~^FbU?`G]Sms:D">
<value name="IF0">
<block type="logic_compare" id="ppuYcE?%nVSE_4-Qdydv">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id=":.B%WEu{nC^GTf+?PzO?">
<field name="VAR" id="id">id</field>
</block>
</value>
<value name="B">
<block type="math_number" id="Z/Mwcdvj*`2AVwvC}AaY">
<field name="NUM">30</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="`VDa16mR6MXLOd50K/$9">
<field name="VAR" id="range_r1">R1Distance</field>
<value name="VALUE">
<block type="variables_get" id=")-/`[TT?Ty3kX^EG~bAz">
<field name="VAR" id="rg">range</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_R1Distance">
<field name="VAR" id="tri_group">group</field>
<value name="VALUE">
<block type="math_number" id="%|hnDL?aJo]kke~{`fwv">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_R1Distance_offset">
<field name="VAR" id="tri_offset">offset</field>
<value name="VALUE">
<block type="math_number" id="t4Nye#ox~I}+WP0Gc%:K">
<field name="NUM">13</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="controls_if" id="bc$y4NL|NwPgMjTdHpXE">
<value name="IF0">
<block type="logic_compare" id="-IMkBuK~~L$bQ7#S7yB}">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="_bY*}jqy]VR0MpWLka88">
<field name="VAR" id="id">id</field>
</block>
</value>
<value name="B">
<block type="math_number" id="Dj%gf-70KF,ydu[R`%1H">
<field name="NUM">31</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="9Y8.^;^/]v+fHvFeP))C">
<field name="VAR" id="range_r2">R2Distance</field>
<value name="VALUE">
<block type="variables_get" id="tgIggP38ym=c?yEg:IHr">
<field name="VAR" id="rg">range</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_R2Distance">
<field name="VAR" id="tri_group">group</field>
<value name="VALUE">
<block type="math_number" id="A:W0I-1XB@92kx93(yrd">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_R2Distance_offset">
<field name="VAR" id="tri_offset">offset</field>
<value name="VALUE">
<block type="math_number" id="9?s,*N$4kdR`dO`ML?%_">
<field name="NUM">9.25</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="controls_if" id="r+#z%71hV7FF_%avspey">
<value name="IF0">
<block type="logic_compare" id=",J!tyr]nB33KO=5:2z?g">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="`a-!ll{1^W[eIW*:ed(,">
<field name="VAR" id="id">id</field>
</block>
</value>
<value name="B">
<block type="math_number" id="kkDJCmE@vn+RlvwhwP`*">
<field name="NUM">32</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="1B4=tx3mf0meOt4+HB|8">
<field name="VAR" id="range_r3">R3Distance</field>
<value name="VALUE">
<block type="variables_get" id="1nES[~qjP.oL#55d|5..">
<field name="VAR" id="rg">range</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_R3Distance">
<field name="VAR" id="tri_group">group</field>
<value name="VALUE">
<block type="math_number" id="!8XDLmEXsP2LlcI^}-jx">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_R3Distance_offset">
<field name="VAR" id="tri_offset">offset</field>
<value name="VALUE">
<block type="math_number" id="d^op=iVnLXX$(MrG@YY@">
<field name="NUM">3.75</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="controls_if" id="lIlhxOc$t]#nY!zm;/LK">
<value name="IF0">
<block type="logic_compare" id="NlULb(Mb_Mp|?]hn]5#V">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="vVPf|T+O{aLZh9oq;*:w">
<field name="VAR" id="id">id</field>
</block>
</value>
<value name="B">
<block type="math_number" id="?U+q|;OWoSgtq07dSbGs">
<field name="NUM">33</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="*ie7@clOuqKh`mpLh[=9">
<field name="VAR" id="range_r4">R4Distance</field>
<value name="VALUE">
<block type="variables_get" id="R{FJmDjOI47LAEWe$r#H">
<field name="VAR" id="rg">range</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_R4Distance">
<field name="VAR" id="tri_group">group</field>
<value name="VALUE">
<block type="math_number" id="=kaCXp*wso0p?7^qPAb-">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_R4Distance_offset">
<field name="VAR" id="tri_offset">offset</field>
<value name="VALUE">
<block type="math_number" id="i|$h5Hg1UE/1R^Ez;NFv">
<field name="NUM">0</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="controls_if" id="j^Y]OVTI`X/|l#Zrq(nR">
<value name="IF0">
<block type="logic_compare" id="+bKfl.7k{MT)^eLR7fw)">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="s:-J$%lElg.YleA(5H9L">
<field name="VAR" id="id">id</field>
</block>
</value>
<value name="B">
<block type="math_number" id="Vrn{/q:XC(Um~as1q42}">
<field name="NUM">34</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="/!@YCvRf[zwUx^T%OY_a">
<field name="VAR" id="range_r5">R5Distance</field>
<value name="VALUE">
<block type="variables_get" id="6HK9QAYIC(DXh00Mbm-c">
<field name="VAR" id="rg">range</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_R5Distance">
<field name="VAR" id="tri_group">group</field>
<value name="VALUE">
<block type="math_number" id="@KdW8^wfXJG|n6E!gQ{/">
<field name="NUM">1</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_R5Distance_offset">
<field name="VAR" id="tri_offset">offset</field>
<value name="VALUE">
<block type="math_number" id="-rFSp9oh=hfJF|3,Q8+v">
<field name="NUM">0</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="controls_if" id="iM$3;R,nVhKUF%Km7T6p">
<value name="IF0">
<block type="logic_compare" id="BS|EvBxP:GQwSz[b?/bN">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="pz{$c8vYS`w+7CPvM:gu">
<field name="VAR" id="id">id</field>
</block>
</value>
<value name="B">
<block type="math_number" id="PeUrF4mC(MOklj99*rz%">
<field name="NUM">35</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="w^+R}2`9K/i_}[w13vPs">
<field name="VAR" id="range_r6">R6Distance</field>
<value name="VALUE">
<block type="variables_get" id="-gr}`c(}Q@KX@@c+36GW">
<field name="VAR" id="rg">range</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_R6Distance">
<field name="VAR" id="tri_group">group</field>
<value name="VALUE">
<block type="math_number" id="K,VpDOo8@JwfM=(XI*)b">
<field name="NUM">1</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_R6Distance_offset">
<field name="VAR" id="tri_offset">offset</field>
<value name="VALUE">
<block type="math_number" id="cn1}F!F*!u{`^64uar8Q">
<field name="NUM">-3.75</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="controls_if" id="}HLqaLADRz(8P^;/;6GE">
<value name="IF0">
<block type="logic_compare" id="/T[Tu/6Bf4w3tn_zA8|S">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="*;xneRRBT5?l%aTgkCj#">
<field name="VAR" id="id">id</field>
</block>
</value>
<value name="B">
<block type="math_number" id="U)QG%LvTDqw*ay4%y`pm">
<field name="NUM">36</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="zS?gsy4Y(AQMQ$SiG|9%">
<field name="VAR" id="range_r7">R7Distance</field>
<value name="VALUE">
<block type="variables_get" id="ch#:%HBWE|K#,yk~wm(o">
<field name="VAR" id="rg">range</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_R7Distance">
<field name="VAR" id="tri_group">group</field>
<value name="VALUE">
<block type="math_number" id="#(=bzpC0?Rk9Fi$I]%(h">
<field name="NUM">1</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_R7Distance_offset">
<field name="VAR" id="tri_offset">offset</field>
<value name="VALUE">
<block type="math_number" id="iGR!loj?+Yj:B*1hy)/|">
<field name="NUM">-9.25</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="controls_if" id="S`oE,kD)9%3nPzwS/6s1">
<value name="IF0">
<block type="logic_compare" id="GV`Li)!50;Ey2oF`8lC:">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="J;,5RLn[|n=u]O8XtMz]">
<field name="VAR" id="id">id</field>
</block>
</value>
<value name="B">
<block type="math_number" id="gtYSRTKhD6etbXi/OLBU">
<field name="NUM">37</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id=":ko$|dnq6Bk}!qi)3b5N">
<field name="VAR" id="range_r8">R8Distance</field>
<value name="VALUE">
<block type="variables_get" id="Tdf)n{Ji7l+$gQv*99+S">
<field name="VAR" id="rg">range</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_R8Distance">
<field name="VAR" id="tri_group">group</field>
<value name="VALUE">
<block type="math_number" id="C/e,Diq+4iHNmUZ]R`n@">
<field name="NUM">1</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_R8Distance_offset">
<field name="VAR" id="tri_offset">offset</field>
<value name="VALUE">
<block type="math_number" id="bD11B(ceqE2Nal:~^Lkf">
<field name="NUM">-13</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="controls_if" id="gt@D[gY99:*RW`09-;19">
<value name="IF0">
<block type="logic_compare" id="UH66(*[/rFXrSF0;05_u">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="g}v%P![5).^[swVj_%1a">
<field name="VAR" id="id">id</field>
</block>
</value>
<value name="B">
<block type="math_number" id="@LI]G:=LGog1_So=xi}0">
<field name="NUM">38</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="jUV0Pm9r#f#F:X.vL#M@">
<field name="VAR" id="range_b1">B1Distance</field>
<value name="VALUE">
<block type="variables_get" id="!u||4-@gcvQ-{bA~Nc)(">
<field name="VAR" id="rg">range</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_B1Distance">
<field name="VAR" id="tri_group">group</field>
<value name="VALUE">
<block type="math_number" id="dAiBA`:{}O-$s00Bo*AG">
<field name="NUM">2</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_B1Distance_offset">
<field name="VAR" id="tri_offset">offset</field>
<value name="VALUE">
<block type="math_number" id="T{@bWRYm@3O(SpYG(^c^">
<field name="NUM">13</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="controls_if" id="Nh3=2ZiIgJ{`3kV11-7f">
<value name="IF0">
<block type="logic_compare" id="*:)5O2TR}Xs//k%i2aV,">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="goCeo2ky0~k5!%QYku-N">
<field name="VAR" id="id">id</field>
</block>
</value>
<value name="B">
<block type="math_number" id="HY4FO,.S1d7Jw|6]N54Y">
<field name="NUM">39</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="J:p2|Go)#}B}XwR8vr1,">
<field name="VAR" id="range_b2">B2Distance</field>
<value name="VALUE">
<block type="variables_get" id="Ts|nCal(`yXOGdW#?Aj-">
<field name="VAR" id="rg">range</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_B2Distance">
<field name="VAR" id="tri_group">group</field>
<value name="VALUE">
<block type="math_number" id="^;=wLc7!H2z(Y(0D=DO,">
<field name="NUM">2</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_B2Distance_offset">
<field name="VAR" id="tri_offset">offset</field>
<value name="VALUE">
<block type="math_number" id="g_~i(z%jZeX#G^{lyiUN">
<field name="NUM">9.25</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="controls_if" id="VVCP`SD3Jwt*}:]+4ZY5">
<value name="IF0">
<block type="logic_compare" id="Q/v!R;_BrdHh;w-I|B*y">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="[~zX.[1)_|s}dBt/4Ct[">
<field name="VAR" id="id">id</field>
</block>
</value>
<value name="B">
<block type="math_number" id="1XEf#K0,JRPl%aHrnnDp">
<field name="NUM">40</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="=6sV1AfY^#$CKUvPKmIJ">
<field name="VAR" id="range_b3">B3Distance</field>
<value name="VALUE">
<block type="variables_get" id="NUj]Vf}).JBfF#gItJba">
<field name="VAR" id="rg">range</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_B3Distance">
<field name="VAR" id="tri_group">group</field>
<value name="VALUE">
<block type="math_number" id="*[vmj1@IHMQfE4RNQT/B">
<field name="NUM">2</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_B3Distance_offset">
<field name="VAR" id="tri_offset">offset</field>
<value name="VALUE">
<block type="math_number" id="7~R|J/;R=C]_sK19Cyv$">
<field name="NUM">3.75</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="controls_if" id="Zs,cnx;d#jq0jUio!hoP">
<value name="IF0">
<block type="logic_compare" id="/`WZgI,/hwIcTDlEU?c`">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="{ITK-7$=F{wjM1$3}e]m">
<field name="VAR" id="id">id</field>
</block>
</value>
<value name="B">
<block type="math_number" id="HEE$Xhg[D?rG0H`4gyna">
<field name="NUM">41</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="q41g=@w={C?OPy~i85N~">
<field name="VAR" id="range_b4">B4Distance</field>
<value name="VALUE">
<block type="variables_get" id="j-y@R0*d%txpvzHT-0+s">
<field name="VAR" id="rg">range</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_B4Distance">
<field name="VAR" id="tri_group">group</field>
<value name="VALUE">
<block type="math_number" id="DlzxoJm6Hexi-WHm9NHm">
<field name="NUM">2</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_B4Distance_offset">
<field name="VAR" id="tri_offset">offset</field>
<value name="VALUE">
<block type="math_number" id="T#BTDC#xVHW[0TxxJ_P.">
<field name="NUM">0</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="controls_if" id="R|LiTiWfp)}LMC.1UWVa">
<value name="IF0">
<block type="logic_compare" id="hZL8x3f*MC#3ggPBFx4q">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="K3%3VgVK^I?=l2X)hfGZ">
<field name="VAR" id="id">id</field>
</block>
</value>
<value name="B">
<block type="math_number" id="X6/i/8mDvSE|!Pw13?F!">
<field name="NUM">42</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="_!@94Prem$71M3I;wm)c">
<field name="VAR" id="range_b5">B5Distance</field>
<value name="VALUE">
<block type="variables_get" id="[B6A7^R#]L@ceF.G?yYH">
<field name="VAR" id="rg">range</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_B5Distance">
<field name="VAR" id="tri_group">group</field>
<value name="VALUE">
<block type="math_number" id="z*8H62lcl57FZdN!wfY{">
<field name="NUM">3</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_B5Distance_offset">
<field name="VAR" id="tri_offset">offset</field>
<value name="VALUE">
<block type="math_number" id="5OC/A.O!i.p#ry1KKnc2">
<field name="NUM">0</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="controls_if" id="O^y/l?qdHB3EKWlJ_scZ">
<value name="IF0">
<block type="logic_compare" id="U2)I|yjgP11jfty`rkwK">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="cd/.Wti0C._$eJvnMV@^">
<field name="VAR" id="id">id</field>
</block>
</value>
<value name="B">
<block type="math_number" id="KEz-`JjU[a?!^@|V0e[w">
<field name="NUM">43</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="zM@U_S84u$hmz?z(/x!#">
<field name="VAR" id="range_b6">B6Distance</field>
<value name="VALUE">
<block type="variables_get" id="%YV-F^Z{X/A@w[?gaV)R">
<field name="VAR" id="rg">range</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_B6Distance">
<field name="VAR" id="tri_group">group</field>
<value name="VALUE">
<block type="math_number" id="#N-4D;I*rvD^M}FVC(6y">
<field name="NUM">3</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_B6Distance_offset">
<field name="VAR" id="tri_offset">offset</field>
<value name="VALUE">
<block type="math_number" id="fu_7={=v:.=Wx^9V-zHM">
<field name="NUM">-3.75</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="controls_if" id="f?]P,QU@Eq_1qBiAbNGT">
<value name="IF0">
<block type="logic_compare" id=";y/SO@0a.uq_b*5PZ+Wy">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="byucw.A@{]06!U2RUu{R">
<field name="VAR" id="id">id</field>
</block>
</value>
<value name="B">
<block type="math_number" id="64W`.GkamdSH[:rZpq8Y">
<field name="NUM">44</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="(-fa]2^s.Xfn]dkj{#HE">
<field name="VAR" id="range_b7">B7Distance</field>
<value name="VALUE">
<block type="variables_get" id="$UNw=])J7w:{h|$`gmg#">
<field name="VAR" id="rg">range</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_B7Distance">
<field name="VAR" id="tri_group">group</field>
<value name="VALUE">
<block type="math_number" id="Qm1eh1C%;SIZr-Jp!(qU">
<field name="NUM">3</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_B7Distance_offset">
<field name="VAR" id="tri_offset">offset</field>
<value name="VALUE">
<block type="math_number" id="*Q.FfB|,~[}=#n@L5)s@">
<field name="NUM">-9.25</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="controls_if" id="tHhSp!R*YM+~s|!A[l24">
<value name="IF0">
<block type="logic_compare" id="$En3`{GzQz)^]OIZdtW1">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="fb{qfBZx@4SzTt=6V(*Y">
<field name="VAR" id="id">id</field>
</block>
</value>
<value name="B">
<block type="math_number" id="#(X3((|0y_V[s}dIyG;n">
<field name="NUM">45</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="aT`C@(@PrctO+|21./7d">
<field name="VAR" id="range_b8">B8Distance</field>
<value name="VALUE">
<block type="variables_get" id="gg8J-ZbTu~okCOZMJT:c">
<field name="VAR" id="rg">range</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_B8Distance">
<field name="VAR" id="tri_group">group</field>
<value name="VALUE">
<block type="math_number" id="4XhJ0*H~HG7Ca@uNz+;j">
<field name="NUM">3</field>
</block>
</value>
<next>
<block type="variables_set" id="triMap_B8Distance_offset">
<field name="VAR" id="tri_offset">offset</field>
<value name="VALUE">
<block type="math_number" id="{XALy6(U,Zbwi(-%I8j8">
<field name="NUM">-13</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="comment" id="student_auto_scan_trig">
<field name="COMMENT">ROTATE A KNOWN OFFSET WITH TRIGONOMETRY
An offset measured along the tag strip is not automatically camera-left/right when the strip is angled. Cosine gives the component along an axis; sine gives the perpendicular component. Using yaw and pitch rotates the offset into camera X, Y, and Z. Divide inches by 39.3701 first because pose coordinates are meters.</field>
<next>
<block type="controls_if" id="uqB,5|zAYENU[gL$ciQI">
<value name="IF0">
<block type="logic_compare" id="triCond_r4X">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="X5JUjevNc({|NOLpt~FB">
<field name="VAR" id="tri_group">group</field>
</block>
</value>
<value name="B">
<block type="math_number" id="4*4!(lv4^i8[-n-*K,),">
<field name="NUM">0</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="h)xfRPFH?S!~dk+Y2l}G">
<field name="VAR" id="pair_r4_x">r4X</field>
<value name="VALUE">
<block type="math_arithmetic" id="z|z8j^oib7K^184a([Ly">
<field name="OP">ADD</field>
<value name="A">
<block type="variables_get" id="`%ibi65AK`qWwNLa$Z[@">
<field name="VAR" id="x">x</field>
</block>
</value>
<value name="B">
<block type="math_arithmetic" id="z2OcW_|+^Dh2Y#+js-md">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="math_arithmetic" id="9m)H5lLH/FG+sl?HNO:t">
<field name="OP">DIVIDE</field>
<value name="A">
<block type="variables_get" id="bsY=5xHfvz$plme/Y~a:">
<field name="VAR" id="tri_offset">offset</field>
</block>
</value>
<value name="B">
<block type="math_number" id="GBjbwJslbl])PZpa97tC">
<field name="NUM">39.3701</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_arithmetic" id="%Jf{ZQ`{..,^diE1AKKO">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="math_trig" id=",R_1wGa%hKHs4s_m}n^0">
<field name="OP">COS</field>
<value name="NUM">
<block type="variables_get" id="RS|Y3qu09*Rg#K^{!=uo">
<field name="VAR" id="tri_yaw">yaw</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_trig" id="UNmL*`%)H8xb]@0{DuF@">
<field name="OP">COS</field>
<value name="NUM">
<block type="variables_get" id="t_uWL0|qr`IL+;*YCy;5">
<field name="VAR" id="tri_pitch">pitch</field>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="b9YF+.KJbo4|$nW=Na$i">
<field name="VAR" id="pair_r4_y">r4Y</field>
<value name="VALUE">
<block type="math_arithmetic" id="{,y7DJ*M{]uO*/f6tye0">
<field name="OP">ADD</field>
<value name="A">
<block type="variables_get" id="+EookI,wevJdQPri=6eZ">
<field name="VAR" id="y">y</field>
</block>
</value>
<value name="B">
<block type="math_arithmetic" id="{{b4cTFjsJNo6WnKICEX">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="math_arithmetic" id="j1EeMt-Pr{1$Ba#T%2z3">
<field name="OP">DIVIDE</field>
<value name="A">
<block type="variables_get" id="xhvd|9@1YX)9veF?x^x3">
<field name="VAR" id="tri_offset">offset</field>
</block>
</value>
<value name="B">
<block type="math_number" id="E5N|V_#t[~##0BwuoYmC">
<field name="NUM">39.3701</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_arithmetic" id=",lU4kd/^K!9D#`zFo,OF">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="math_trig" id="p:s-}Y,KsmKSEU,tKLAM">
<field name="OP">SIN</field>
<value name="NUM">
<block type="variables_get" id="(nio(iNe;5~5GMtPIMbm">
<field name="VAR" id="tri_yaw">yaw</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_trig" id="TI{SA^u7IvV?]TF=oK7q">
<field name="OP">COS</field>
<value name="NUM">
<block type="variables_get" id="e(A9WR:3N~6Qf97hJP2_">
<field name="VAR" id="tri_pitch">pitch</field>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="|k2`-E^fzSTsa(Z9i:bb">
<field name="VAR" id="pair_r4_z">r4Z</field>
<value name="VALUE">
<block type="math_arithmetic" id="dY-o)ewK6eCp((mfhk$`">
<field name="OP">MINUS</field>
<value name="A">
<block type="variables_get" id="j`fs}Li`pmZ2%*!GJ?dU">
<field name="VAR" id="z">z</field>
</block>
</value>
<value name="B">
<block type="math_arithmetic" id="*EN5|^Jl:LqZ;j*zwlR4">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="math_arithmetic" id="rFvVGl]o|9sq/9Iz3$qy">
<field name="OP">DIVIDE</field>
<value name="A">
<block type="variables_get" id="xfQRDmjJn47yjJti.XQm">
<field name="VAR" id="tri_offset">offset</field>
</block>
</value>
<value name="B">
<block type="math_number" id="l}[5h9Gj[5#W;_`W[ntd">
<field name="NUM">39.3701</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_trig" id="^bM|ui={PunXwtO;dq{|">
<field name="OP">SIN</field>
<value name="NUM">
<block type="variables_get" id="+Zug?Mbj6`aCq37ieOJm">
<field name="VAR" id="tri_pitch">pitch</field>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="5V!fA4+c9s`$-p2D}U,q">
<field name="VAR" id="pair_r4_tx">r4Tx</field>
<value name="VALUE">
<block type="variables_get" id=",6.pV#Y:P1S.jC-k;C,:">
<field name="VAR" id="tx">tx</field>
</block>
</value>
<next>
<block type="variables_set" id="x_5KU/QJWml0iSVS=e]Q">
<field name="VAR" id="pair_r4_seen">r4Seen</field>
<value name="VALUE">
<block type="logic_boolean" id="KT%sg#j%]/Op{O9iMpD=">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="controls_if" id="HNjoW{,UU^$(I0,IOwdr">
<value name="IF0">
<block type="logic_compare" id="triCond_r5X">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="*SO)j|)v3Z7b-~}12Gt=">
<field name="VAR" id="tri_group">group</field>
</block>
</value>
<value name="B">
<block type="math_number" id="ai1%ui}icl$U;A@8FV.R">
<field name="NUM">1</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="%,a@_T_,k`)Iw=hgg}B(">
<field name="VAR" id="pair_r5_x">r5X</field>
<value name="VALUE">
<block type="math_arithmetic" id="i!JiRMQflgm$M]^V?eaQ">
<field name="OP">ADD</field>
<value name="A">
<block type="variables_get" id="80@t78$*?=Vss7t=BoT=">
<field name="VAR" id="x">x</field>
</block>
</value>
<value name="B">
<block type="math_arithmetic" id="v+17PJ2e|PL@~T{t8;)?">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="math_arithmetic" id="c5m$3hVagP(4+la3-?;,">
<field name="OP">DIVIDE</field>
<value name="A">
<block type="variables_get" id="HAez~ni^FVJV,I:Js#fM">
<field name="VAR" id="tri_offset">offset</field>
</block>
</value>
<value name="B">
<block type="math_number" id="SHbj^fq{-u[ci9B-SRJ)">
<field name="NUM">39.3701</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_arithmetic" id="vt-AfpT+-2rw1R*L[c3s">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="math_trig" id="``LiuALJ@{KWYYeAjK,{">
<field name="OP">COS</field>
<value name="NUM">
<block type="variables_get" id="@)t@2eDB0T.tvi{IpWO2">
<field name="VAR" id="tri_yaw">yaw</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_trig" id="Fm3_hErp!;^=H+cHvVl`">
<field name="OP">COS</field>
<value name="NUM">
<block type="variables_get" id="O1nC]ap^=#{SB+1-~|G;">
<field name="VAR" id="tri_pitch">pitch</field>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="qNn^|{$[k+uS8z8iGfe/">
<field name="VAR" id="pair_r5_y">r5Y</field>
<value name="VALUE">
<block type="math_arithmetic" id="TFSy(?QCzWi64v!wi2E6">
<field name="OP">ADD</field>
<value name="A">
<block type="variables_get" id=")E3??-BJZxpu%L1sxt+a">
<field name="VAR" id="y">y</field>
</block>
</value>
<value name="B">
<block type="math_arithmetic" id="bHXP1zQEEk.IJa+D34Em">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="math_arithmetic" id="=wHu}9u^om?S@)W=TJRv">
<field name="OP">DIVIDE</field>
<value name="A">
<block type="variables_get" id="[8Pg|t|FY:,kGCNmd4k1">
<field name="VAR" id="tri_offset">offset</field>
</block>
</value>
<value name="B">
<block type="math_number" id="%p2`@*QcLE.~{4z`w)ah">
<field name="NUM">39.3701</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_arithmetic" id="FXudvS%?62}eP0/Q!zos">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="math_trig" id="{rvMJ!x37Qm,/kL[Oy8;">
<field name="OP">SIN</field>
<value name="NUM">
<block type="variables_get" id="I.eYOMJ5{W+Lx801`yXK">
<field name="VAR" id="tri_yaw">yaw</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_trig" id="lszEY[]ge_R3!y7:)Fi1">
<field name="OP">COS</field>
<value name="NUM">
<block type="variables_get" id="oRjBhmk$9AA.=ZAjQT83">
<field name="VAR" id="tri_pitch">pitch</field>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="oyc8}~:B5@ydVsP0x8M*">
<field name="VAR" id="pair_r5_z">r5Z</field>
<value name="VALUE">
<block type="math_arithmetic" id="^ElIL$E{Cbvfs|GS+^*-">
<field name="OP">MINUS</field>
<value name="A">
<block type="variables_get" id="3/-@ye5Yypuiai`1nFMo">
<field name="VAR" id="z">z</field>
</block>
</value>
<value name="B">
<block type="math_arithmetic" id="`w74^Yu2r(W~by^t[Uro">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="math_arithmetic" id="^[LBEfC_1KWSvpNm~}TE">
<field name="OP">DIVIDE</field>
<value name="A">
<block type="variables_get" id="x$1))YW~[*_]Oew;M#18">
<field name="VAR" id="tri_offset">offset</field>
</block>
</value>
<value name="B">
<block type="math_number" id="c*}K%:XwtXO.WhtpLc%)">
<field name="NUM">39.3701</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_trig" id="7L{#O0fQng,HDxq`.Bc-">
<field name="OP">SIN</field>
<value name="NUM">
<block type="variables_get" id="D8UT#;fV@1w49R1b|5:K">
<field name="VAR" id="tri_pitch">pitch</field>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id=",5YDxeDL6@=LU]jN-DDX">
<field name="VAR" id="pair_r5_tx">r5Tx</field>
<value name="VALUE">
<block type="variables_get" id="k`^)3OAEj$1bTM)R4lcx">
<field name="VAR" id="tx">tx</field>
</block>
</value>
<next>
<block type="variables_set" id=".avKi~:X^cmW,#t!xBI0">
<field name="VAR" id="pair_r5_seen">r5Seen</field>
<value name="VALUE">
<block type="logic_boolean" id=",{,ivVGSq#q[s7f8$,OC">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="controls_if" id="=BZ[^?_DABl~K#bF3gvo">
<value name="IF0">
<block type="logic_compare" id="triCond_b4X">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="szu7LKY[5Q[xLtE?LNyl">
<field name="VAR" id="tri_group">group</field>
</block>
</value>
<value name="B">
<block type="math_number" id="Zz!4?%r?(DP(eKy:P`~B">
<field name="NUM">2</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="ZS+5b@wY6}1a.9U6jR*s">
<field name="VAR" id="pair_b4_x">b4X</field>
<value name="VALUE">
<block type="math_arithmetic" id="oHkweIhXooQTTcO5V77{">
<field name="OP">ADD</field>
<value name="A">
<block type="variables_get" id="K@L=w,N~cjxCi7?vr~{.">
<field name="VAR" id="x">x</field>
</block>
</value>
<value name="B">
<block type="math_arithmetic" id="xe6b-Lb5rY{RR^-UfpI(">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="math_arithmetic" id="Qh/:L+Ms)H:}tSI;5Bu!">
<field name="OP">DIVIDE</field>
<value name="A">
<block type="variables_get" id="(b,x?QzS`=x-T81DqJ2s">
<field name="VAR" id="tri_offset">offset</field>
</block>
</value>
<value name="B">
<block type="math_number" id="3CcSgtI*(dsC,Mvwanf?">
<field name="NUM">39.3701</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_arithmetic" id="fK[acDIfvrsOb:y(F[{?">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="math_trig" id="/sRr*?p5bc][{:JF=rH:">
<field name="OP">COS</field>
<value name="NUM">
<block type="variables_get" id="@M0j{cHfzCi0+zScX(^Z">
<field name="VAR" id="tri_yaw">yaw</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_trig" id="V:KAaSM!|ya!V3f7I%)u">
<field name="OP">COS</field>
<value name="NUM">
<block type="variables_get" id="MePfs?t0%B%vz[uTxXx8">
<field name="VAR" id="tri_pitch">pitch</field>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="V+FBE3v{x`xs}-C_A5rx">
<field name="VAR" id="pair_b4_y">b4Y</field>
<value name="VALUE">
<block type="math_arithmetic" id="w3Ckrm7duiXKc;Axac-]">
<field name="OP">ADD</field>
<value name="A">
<block type="variables_get" id="f4x+_2]sOx.J]6T!$4g7">
<field name="VAR" id="y">y</field>
</block>
</value>
<value name="B">
<block type="math_arithmetic" id="VpAD!7?+g*)z1TeEp.5B">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="math_arithmetic" id="%?qU+A]4yps@3}i`F?Bs">
<field name="OP">DIVIDE</field>
<value name="A">
<block type="variables_get" id="C(Hn}JqZS0[mXr2hS7DT">
<field name="VAR" id="tri_offset">offset</field>
</block>
</value>
<value name="B">
<block type="math_number" id="yONGqRIec;X)GHL=K?{!">
<field name="NUM">39.3701</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_arithmetic" id="PP0,}3i?e%5]~ax~nslx">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="math_trig" id="KrGxHkxMm^jp@*Sb_Kr-">
<field name="OP">SIN</field>
<value name="NUM">
<block type="variables_get" id="%#(*~0:=AF[1uJJ5JO{0">
<field name="VAR" id="tri_yaw">yaw</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_trig" id="/qk8T,W[Ln95.0og_Tre">
<field name="OP">COS</field>
<value name="NUM">
<block type="variables_get" id="LVaRC_J+(V[!o(Uknk}u">
<field name="VAR" id="tri_pitch">pitch</field>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id=",=Qu~8k$v?K!xhxh`QU0">
<field name="VAR" id="pair_b4_z">b4Z</field>
<value name="VALUE">
<block type="math_arithmetic" id=",0Jt:$f=AgopoIYu^x8h">
<field name="OP">MINUS</field>
<value name="A">
<block type="variables_get" id="PBm:qKI)a_J]RoQs2K7}">
<field name="VAR" id="z">z</field>
</block>
</value>
<value name="B">
<block type="math_arithmetic" id="]4SPB9rSnbqX92^`ux!N">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="math_arithmetic" id="s?(dagohcka_fIm`q9Ns">
<field name="OP">DIVIDE</field>
<value name="A">
<block type="variables_get" id="#k?zH_CJb]eWfZTTH]Y:">
<field name="VAR" id="tri_offset">offset</field>
</block>
</value>
<value name="B">
<block type="math_number" id="BdlXHyD-6W#x{H8r`-$k">
<field name="NUM">39.3701</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_trig" id="TjZ,{F5$[~1gO-A%eh-8">
<field name="OP">SIN</field>
<value name="NUM">
<block type="variables_get" id="y7+*v%dek;/)K,z,:3Bx">
<field name="VAR" id="tri_pitch">pitch</field>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="E:(5e=|Bq[pvnO,fhA5d">
<field name="VAR" id="pair_b4_tx">b4Tx</field>
<value name="VALUE">
<block type="variables_get" id="zNtJeEE7p.b4{xR}}fYd">
<field name="VAR" id="tx">tx</field>
</block>
</value>
<next>
<block type="variables_set" id="(FmSUx5uGgd3Ctz$o)6A">
<field name="VAR" id="pair_b4_seen">b4Seen</field>
<value name="VALUE">
<block type="logic_boolean" id="D+ho^%b{Km(;WANKRgC_">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="controls_if" id="95|}4UJ[]du(Qc/^76lY">
<value name="IF0">
<block type="logic_compare" id="triCond_b5X">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="#DvST7`_rt)ciR{rBwL:">
<field name="VAR" id="tri_group">group</field>
</block>
</value>
<value name="B">
<block type="math_number" id="a[m:_f{~fC]sHZL|.;5[">
<field name="NUM">3</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="}v|D,{W~%y`LHPPMrKW_">
<field name="VAR" id="pair_b5_x">b5X</field>
<value name="VALUE">
<block type="math_arithmetic" id="uOF}(2N5hZ]Pa$X$ppeI">
<field name="OP">ADD</field>
<value name="A">
<block type="variables_get" id="jh0wDvK._46F)|vcM.](">
<field name="VAR" id="x">x</field>
</block>
</value>
<value name="B">
<block type="math_arithmetic" id="6gX~ycs[x!TcV!qte_oh">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="math_arithmetic" id="aqC67Xll~n5g{8~@M-5c">
<field name="OP">DIVIDE</field>
<value name="A">
<block type="variables_get" id="OIR[7H`Ldarwnr#[7F(x">
<field name="VAR" id="tri_offset">offset</field>
</block>
</value>
<value name="B">
<block type="math_number" id="_}5[$6MlL39lyh6fHu)7">
<field name="NUM">39.3701</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_arithmetic" id="QwkL2/;*N}e6X0HS?8Q%">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="math_trig" id="r6i8RrLhI~c]D~!:33Y}">
<field name="OP">COS</field>
<value name="NUM">
<block type="variables_get" id="G7c,Etg^o{za9A#y993z">
<field name="VAR" id="tri_yaw">yaw</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_trig" id="?)fi=nmdGpMwi@!-OA7L">
<field name="OP">COS</field>
<value name="NUM">
<block type="variables_get" id="FHnCpY7=_]ZGW2j(F4R)">
<field name="VAR" id="tri_pitch">pitch</field>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="~|t;z+TVmMM=zLZac/6l">
<field name="VAR" id="pair_b5_y">b5Y</field>
<value name="VALUE">
<block type="math_arithmetic" id="Jnz78m2y*bNw#1TShMw{">
<field name="OP">ADD</field>
<value name="A">
<block type="variables_get" id="m(~%*E/U#:KLL~)gWN+$">
<field name="VAR" id="y">y</field>
</block>
</value>
<value name="B">
<block type="math_arithmetic" id="nCR8=^*25xq3gRmHnGUM">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="math_arithmetic" id="8Wx5qdcKKu1;MR1gW-kX">
<field name="OP">DIVIDE</field>
<value name="A">
<block type="variables_get" id="Hr;w0sl4$0,XUT~E*0iu">
<field name="VAR" id="tri_offset">offset</field>
</block>
</value>
<value name="B">
<block type="math_number" id="i[roS2pqE)sc!~H+/IMT">
<field name="NUM">39.3701</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_arithmetic" id="=NhjEuH%t()K13:]zIFS">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="math_trig" id="3,.2:j*Qd-X+h3eAwUot">
<field name="OP">SIN</field>
<value name="NUM">
<block type="variables_get" id="f.JGZFQG{r2yg*VOcD3y">
<field name="VAR" id="tri_yaw">yaw</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_trig" id="q500lSs*}I!9o`/kdCG5">
<field name="OP">COS</field>
<value name="NUM">
<block type="variables_get" id="W-`txk.;C~jLh=S=`kN_">
<field name="VAR" id="tri_pitch">pitch</field>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="k7Hy9[e=knlG{KV+`VMr">
<field name="VAR" id="pair_b5_z">b5Z</field>
<value name="VALUE">
<block type="math_arithmetic" id="@@cgSIsVupx@cY9ToTET">
<field name="OP">MINUS</field>
<value name="A">
<block type="variables_get" id="XWmSYg%J~#!XIhY3qH34">
<field name="VAR" id="z">z</field>
</block>
</value>
<value name="B">
<block type="math_arithmetic" id="`J#0lCtcQy)ort{o/wec">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="math_arithmetic" id="(Ro#N{4[M`zX61CDY,sI">
<field name="OP">DIVIDE</field>
<value name="A">
<block type="variables_get" id="3@ltoDKxewbL,5[q5[u.">
<field name="VAR" id="tri_offset">offset</field>
</block>
</value>
<value name="B">
<block type="math_number" id="|dl$nCfc9I_Y:F|or4HF">
<field name="NUM">39.3701</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_trig" id="4DrYzV9)-W*z#Xh@/U2u">
<field name="OP">SIN</field>
<value name="NUM">
<block type="variables_get" id=".i+qDg?ceVLtozG;)C`,">
<field name="VAR" id="tri_pitch">pitch</field>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="[1?R/rKsAud4BU18zG,K">
<field name="VAR" id="pair_b5_tx">b5Tx</field>
<value name="VALUE">
<block type="variables_get" id="2:Mjl#/%bhgveZLIqjY2">
<field name="VAR" id="tx">tx</field>
</block>
</value>
<next>
<block type="variables_set" id="pmA`mWLKAp0Oo]yuVdt@">
<field name="VAR" id="pair_b5_seen">b5Seen</field>
<value name="VALUE">
<block type="logic_boolean" id="r)yT4|`/LeTr-y(wjsPO">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</statement>
<statement name="ELSE">
<block type="telemetry_addTextData_All" id="TBxZx.K8l)|Ph-}Q_Ik]">
<value name="KEY">
<shadow type="text" id=".5.oaSaX1VMWnSK#4q-z">
<field name="TEXT">AprilTags</field>
</shadow>
</value>
<value name="TEXT">
<shadow type="text" id=")DX_7PKVunqiIL]w5_vI">
<field name="TEXT">none detected</field>
</shadow>
</value>
</block>
</statement>
<next>
<block type="comment" id="student_auto_scan_center">
<field name="COMMENT">MIDPOINT, DISTANCE, AND DIRECTION
Average endpoint coordinates to find the center: (A+B)/2 on each axis. Then distance=square root of X²+Y²+Z², the 3D Pythagorean theorem. atan2(X,Z) gives the signed left/right angle even when X or Z is zero; ordinary tangent division could fail or lose the correct quadrant.</field>
<next>
<block type="controls_if" id="L2!Q,AF6L4A@{k.gxR2*">
<value name="IF0">
<block type="logic_operation" id="Y!J8P7XJ=[B[(r#+p+-!">
<field name="OP">AND</field>
<value name="A">
<block type="variables_get" id="2#6D6`}4v,fC,X/4e%;^">
<field name="VAR" id="pair_r4_seen">r4Seen</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="$RKJ^%GrA3BsT9hmL!N@">
<field name="VAR" id="pair_r5_seen">r5Seen</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="Ufk!B+Nq#Nz75{_U8x4l">
<field name="VAR" id="pair_red_x">redX</field>
<value name="VALUE">
<block type="math_arithmetic" id="d_;wjDoY?6a2{}L?zR+?">
<field name="OP">DIVIDE</field>
<value name="A">
<block type="math_arithmetic" id="lHY)m#zH@FJpLU*mU@[j">
<field name="OP">ADD</field>
<value name="A">
<block type="variables_get" id="q@-sg9#([!Ev|Ag=C69)">
<field name="VAR" id="pair_r4_x">r4X</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="@ZZuLJ%))Yf,]mF`xU;/">
<field name="VAR" id="pair_r5_x">r5X</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="=5Towly^h.C#1A?GEo-X">
<field name="NUM">2</field>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="k/+(S7cu5Uegd?MRhlG9">
<field name="VAR" id="pair_red_y">redY</field>
<value name="VALUE">
<block type="math_arithmetic" id="jFCIyS?tMqV[69nDn]YS">
<field name="OP">DIVIDE</field>
<value name="A">
<block type="math_arithmetic" id="q4Y9v;VMUWmr2/,!MvyN">
<field name="OP">ADD</field>
<value name="A">
<block type="variables_get" id=".NN^Q9aw+;0M)pV*EeKI">
<field name="VAR" id="pair_r4_y">r4Y</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="^v_IzS%r$N]BlEc28:Jq">
<field name="VAR" id="pair_r5_y">r5Y</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="|.yQ.zWHnE~;/F/!{Tif">
<field name="NUM">2</field>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id=":(.=nY:U#:dwLVmwP8/(">
<field name="VAR" id="pair_red_z">redZ</field>
<value name="VALUE">
<block type="math_arithmetic" id="1(=13!BRv-%fwxQ3IakF">
<field name="OP">DIVIDE</field>
<value name="A">
<block type="math_arithmetic" id="7L!d4`83c}EF-^tdJ:6G">
<field name="OP">ADD</field>
<value name="A">
<block type="variables_get" id="1Be.?j%~oC#vSVsUt1:L">
<field name="VAR" id="pair_r4_z">r4Z</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="P/[#~,z_-LCY:%,!8S4J">
<field name="VAR" id="pair_r5_z">r5Z</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="d1{J}UaB@=6[QOEPQ}Oq">
<field name="NUM">2</field>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="!)Ft=r-J53L!Ln*NW9qG">
<field name="VAR" id="pair_red_range">redRange</field>
<value name="VALUE">
<block type="math_arithmetic" id="k~nnQg+qzlg(f):Yi)7_">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="math_single" id="I|SW04CMm2vc:ceD|f3*">
<field name="OP">ROOT</field>
<value name="NUM">
<block type="math_arithmetic" id="U,pMd(O@1a)I]/E~qgG:">
<field name="OP">ADD</field>
<value name="A">
<block type="math_arithmetic" id="C67W1vYi_,Et~Q2LdV6O">
<field name="OP">ADD</field>
<value name="A">
<block type="math_arithmetic" id="(oS{mIVcAW0^ciZ_ISX^">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="variables_get" id="iag*;r):0~,z~xxO_h3D">
<field name="VAR" id="pair_red_x">redX</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="s3Fy(UOM*G9aCP87/`Bf">
<field name="VAR" id="pair_red_x">redX</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_arithmetic" id="B6DT2,H}Sc,UAEP,cjdF">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="variables_get" id="^2kDu%B:yTqWK=HjHMg-">
<field name="VAR" id="pair_red_y">redY</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="%c0MS@_PcAh]*dB6tF.:">
<field name="VAR" id="pair_red_y">redY</field>
</block>
</value>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_arithmetic" id="w^fMi7P?KPiaF6iWGxG$">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="variables_get" id=",Xd4J+($G~^M;amd4xdW">
<field name="VAR" id="pair_red_z">redZ</field>
</block>
</value>
<value name="B">
<block type="variables_get" id=":Tm@msFewIVXld`{#?k~">
<field name="VAR" id="pair_red_z">redZ</field>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="4_Nh?Lzvfv48a8tTGHFn">
<field name="NUM">39.3701</field>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="redCenterDisplaySet">
<field name="VAR" id="red_center_display">redCenterDistance</field>
<value name="VALUE">
<block type="variables_get" id="^=#Z5/zK0e%pEt##6zYq">
<field name="VAR" id="pair_red_range">redRange</field>
</block>
</value>
<next>
<block type="variables_set" id=")Lm~Fx!NpW)@{MS:I_n:">
<field name="VAR" id="pair_red_tx">redTx</field>
<value name="VALUE">
<block type="math_atan2" id="DYZiV#@=ZdGf4}Yfe|rL">
<value name="X">
<block type="variables_get" id="?~wpb*Zf-aEIc9P![C|2">
<field name="VAR" id="pair_red_z">redZ</field>
</block>
</value>
<value name="Y">
<block type="variables_get" id=".+NWsMXkOE_[WIwpF^DU">
<field name="VAR" id="pair_red_x">redX</field>
</block>
</value>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="controls_if" id="T[aQu2:d,AR},35|{Qk;">
<value name="IF0">
<block type="logic_operation" id="+6:r;Bh.RnguLpi0ox)F">
<field name="OP">AND</field>
<value name="A">
<block type="variables_get" id="~k{.vzC4uWGWe7K_0gyD">
<field name="VAR" id="pair_b4_seen">b4Seen</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="+JI7%ibHPZ.2Il#2n-yE">
<field name="VAR" id="pair_b5_seen">b5Seen</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="38(M:=?QjK]sX*XGy+AR">
<field name="VAR" id="pair_blue_x">blueX</field>
<value name="VALUE">
<block type="math_arithmetic" id="2]Nw_1DUkkq%v2cC1o9{">
<field name="OP">DIVIDE</field>
<value name="A">
<block type="math_arithmetic" id="A.FyL~C6Qy}A#9:EJ$=G">
<field name="OP">ADD</field>
<value name="A">
<block type="variables_get" id="qFF%)v}NsZCJc8+(v9EZ">
<field name="VAR" id="pair_b4_x">b4X</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="Xq)^_,+c=J2@62bIQhK-">
<field name="VAR" id="pair_b5_x">b5X</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="T`_2T$F!VJ0D}1Ro[i=z">
<field name="NUM">2</field>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="w[vZ0p%o2s.6=i:9nIPQ">
<field name="VAR" id="pair_blue_y">blueY</field>
<value name="VALUE">
<block type="math_arithmetic" id="?K2WAPW1du]Od8.4KpN`">
<field name="OP">DIVIDE</field>
<value name="A">
<block type="math_arithmetic" id="Me^xdwVr6`,v8YNiN]K6">
<field name="OP">ADD</field>
<value name="A">
<block type="variables_get" id="(wm;*$99K]7PTID9*C*2">
<field name="VAR" id="pair_b4_y">b4Y</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="HWAzgS+?ob*NYV%uKA-%">
<field name="VAR" id="pair_b5_y">b5Y</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="f{4]vlQJ/^mxQC{8(_3/">
<field name="NUM">2</field>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="%qhIE^0_B}CX([%ATQC2">
<field name="VAR" id="pair_blue_z">blueZ</field>
<value name="VALUE">
<block type="math_arithmetic" id="[Kl+c0O.k((hEBL5NM;/">
<field name="OP">DIVIDE</field>
<value name="A">
<block type="math_arithmetic" id="UP.thq{_%I-L:{?zTbZf">
<field name="OP">ADD</field>
<value name="A">
<block type="variables_get" id="2TplhS9nM%M2t3+vy{^L">
<field name="VAR" id="pair_b4_z">b4Z</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="(sMmn-h~S6wGh}7kv~:r">
<field name="VAR" id="pair_b5_z">b5Z</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="qyO0YCECSh6M1BD$e!`{">
<field name="NUM">2</field>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="u^/Oz}fJOk4$UiXx$tI#">
<field name="VAR" id="pair_blue_range">blueRange</field>
<value name="VALUE">
<block type="math_arithmetic" id="oT*76]ZaaCs5Y;El+mk6">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="math_single" id="U,`rhk.2rOK9Mx6ydlb#">
<field name="OP">ROOT</field>
<value name="NUM">
<block type="math_arithmetic" id=")VpYr,l~8[KpoKgY~jx1">
<field name="OP">ADD</field>
<value name="A">
<block type="math_arithmetic" id="5Q.mC9xn}^|0Jtrc1vD5">
<field name="OP">ADD</field>
<value name="A">
<block type="math_arithmetic" id="-ARhLO.KENmcHJ3,bkl^">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="variables_get" id="B:68V@#xi%e[@y)Vj/UT">
<field name="VAR" id="pair_blue_x">blueX</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="Ejdkmiswz`coTt*AJR`S">
<field name="VAR" id="pair_blue_x">blueX</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_arithmetic" id="5VH,lRNeM9d*UmRXiz0R">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="variables_get" id="WCn?%@QywMDGRdkP[GAw">
<field name="VAR" id="pair_blue_y">blueY</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="^#e[6i/$x7LcS9Vsk9jw">
<field name="VAR" id="pair_blue_y">blueY</field>
</block>
</value>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_arithmetic" id=")rY`)T)uxy9/gDJf@}dM">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="variables_get" id="Lx|Bbod`Jpb{gdqksKx@">
<field name="VAR" id="pair_blue_z">blueZ</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="cm=Dz+6a`J,i8AwK-R#F">
<field name="VAR" id="pair_blue_z">blueZ</field>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="~!QXM33OzpXK[v({Pt5?">
<field name="NUM">39.3701</field>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="TB-$q7y%$L8Nv(rdDrF-">
<field name="VAR" id="pair_blue_tx">blueTx</field>
<value name="VALUE">
<block type="math_atan2" id="KfHLM2y@W(Ez/H09XTA_">
<value name="X">
<block type="variables_get" id="i!2gO;*=34zsz`BPHm:g">
<field name="VAR" id="pair_blue_z">blueZ</field>
</block>
</value>
<value name="Y">
<block type="variables_get" id="n@7!X7BI+8S?Y/=/j2xu">
<field name="VAR" id="pair_blue_x">blueX</field>
</block>
</value>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="comment" id="student_auto_scan_select">
<field name="COMMENT">TARGET STATE VARIABLES
selectedId uses 0 for red center and 1 for blue center; it is not a physical tag ID. currentRange is center distance in inches. currentTx is center horizontal angle in degrees. found must be true before any vision-guided motor command is allowed.</field>
<next>
<block type="controls_if" id="hAfyH0L;rIBpY^[17UHd">
<mutation else="1"/>
<value name="IF0">
<block type="variables_get" id="xx,7l;yR+.omgoc?g)rL">
<field name="VAR" id="sel">selecting</field>
</block>
</value>
<statement name="DO0">
<block type="controls_if" id="{/LO)[MYaB7?|:i!~xwW">
<value name="IF0">
<block type="logic_operation" id="),=D}YF.xDiOX:62Dl=j">
<field name="OP">AND</field>
<value name="A">
<block type="logic_operation" id="hZ:puY639-_YsCK{-V+F">
<field name="OP">AND</field>
<value name="A">
<block type="variables_get" id="avQ2`:WYA=q(@?`,jbzH">
<field name="VAR" id="pair_r4_seen">r4Seen</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="1;Ef@h6|-:v+mq9={%nc">
<field name="VAR" id="pair_r5_seen">r5Seen</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="/T9tZpM@1im0%#[(b5^L">
<field name="OP">LT</field>
<value name="A">
<block type="variables_get" id="uUM)jUf+NF.-R#C;5}xT">
<field name="VAR" id="pair_red_range">redRange</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="*9)GmsENLS]v~Wp6r_u@">
<field name="VAR" id="srg">selectedRange</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="SvE;nop-_fz3EjNS{3UK">
<field name="VAR" id="srg">selectedRange</field>
<value name="VALUE">
<block type="variables_get" id="hY8sV3k0,X=Q#fCE5/V|">
<field name="VAR" id="pair_red_range">redRange</field>
</block>
</value>
<next>
<block type="variables_set" id="b{O)a4yTu%5jKoa)!O_u">
<field name="VAR" id="sid">selectedId</field>
<value name="VALUE">
<block type="math_number" id="18+.Mt6U~JP?}Gko)~=M">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="variables_set" id="?2;JnB_e|rhT?PB#}]zg">
<field name="VAR" id="crg">currentRange</field>
<value name="VALUE">
<block type="variables_get" id="A;M3YPA~};1W$V`*dsb3">
<field name="VAR" id="pair_red_range">redRange</field>
</block>
</value>
<next>
<block type="variables_set" id="lWX*pYtW@?LXQQ`Pjh^j">
<field name="VAR" id="ctx">currentTx</field>
<value name="VALUE">
<block type="variables_get" id="kK,z*({zRcFDb2HtrCmY">
<field name="VAR" id="pair_red_tx">redTx</field>
</block>
</value>
<next>
<block type="variables_set" id="Ft5uTVRZ~h+P`jN.[PAe">
<field name="VAR" id="found">found</field>
<value name="VALUE">
<block type="logic_boolean" id="EHwg4EPATewE27ttI}[j">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="controls_if" id="7$O~ub;p)[Hw`JlI}^$.">
<value name="IF0">
<block type="logic_operation" id="y]FOSxKk_H$vg6A%0/c8">
<field name="OP">AND</field>
<value name="A">
<block type="logic_operation" id="x:KnGDd[,1NFk_?Q*Db.">
<field name="OP">AND</field>
<value name="A">
<block type="variables_get" id="/p*k=1YMNgvPidf@_LH;">
<field name="VAR" id="pair_b4_seen">b4Seen</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="aM;4m:Eq@-+*7-(i^w:+">
<field name="VAR" id="pair_b5_seen">b5Seen</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="vyxBQ]:74Y8q}P{w{{`U">
<field name="OP">LT</field>
<value name="A">
<block type="variables_get" id="[yp8kOj=UovWo~v~IERx">
<field name="VAR" id="pair_blue_range">blueRange</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="%H=p|MJ_*UpL$)66j9Q!">
<field name="VAR" id="srg">selectedRange</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="~%cA1fFO*ssKW2J*ToJv">
<field name="VAR" id="srg">selectedRange</field>
<value name="VALUE">
<block type="variables_get" id="9A76,4PW~Q`[LJ1rE,N3">
<field name="VAR" id="pair_blue_range">blueRange</field>
</block>
</value>
<next>
<block type="variables_set" id="qggIhM9u;|vvjU8w6;Ds">
<field name="VAR" id="sid">selectedId</field>
<value name="VALUE">
<block type="math_number" id="@4-8fFI2|V-dpl%)[:zm">
<field name="NUM">1</field>
</block>
</value>
<next>
<block type="variables_set" id="=fV_`4NzImZotN{!nbgh">
<field name="VAR" id="crg">currentRange</field>
<value name="VALUE">
<block type="variables_get" id="#:o+abCgp,R$cL,232VG">
<field name="VAR" id="pair_blue_range">blueRange</field>
</block>
</value>
<next>
<block type="variables_set" id="w/NTmBc$yY;S|{TxGtBM">
<field name="VAR" id="ctx">currentTx</field>
<value name="VALUE">
<block type="variables_get" id="#SV*y$Bat87dI=Z4x3i.">
<field name="VAR" id="pair_blue_tx">blueTx</field>
</block>
</value>
<next>
<block type="variables_set" id="god6@1EvwAFR{2t](U=u">
<field name="VAR" id="found">found</field>
<value name="VALUE">
<block type="logic_boolean" id="FPK3yRMO4JtubVQUo`?V">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</statement>
<statement name="ELSE">
<block type="controls_if" id="7#km4Zn#mrf|rVeWJ$wz">
<value name="IF0">
<block type="logic_operation" id="m/+):8,L[9d%xN6(/39-">
<field name="OP">AND</field>
<value name="A">
<block type="logic_compare" id="RStxM8.6t{jIx{~#]:0x">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="WKocn]WA|vC6r`TX_YVe">
<field name="VAR" id="sid">selectedId</field>
</block>
</value>
<value name="B">
<block type="math_number" id="4RX/f]9A%M:;K{@1p*Vz">
<field name="NUM">0</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_operation" id="pw7rr4x$AP6^wZr1u{kq">
<field name="OP">AND</field>
<value name="A">
<block type="variables_get" id="a!c3_*VR,=M[*.3IKNh_">
<field name="VAR" id="pair_r4_seen">r4Seen</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="_*j,4`=)_w#4XvY0e_^+">
<field name="VAR" id="pair_r5_seen">r5Seen</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="R,DAYIYq85vl|jc97MWd">
<field name="VAR" id="crg">currentRange</field>
<value name="VALUE">
<block type="variables_get" id="G-hT3z^6YXaPBNie|tvL">
<field name="VAR" id="pair_red_range">redRange</field>
</block>
</value>
<next>
<block type="variables_set" id="ueRz$YZP6%DdOd[B?Wkx">
<field name="VAR" id="ctx">currentTx</field>
<value name="VALUE">
<block type="variables_get" id="7#Ya-87g7B@1CCCG@E*y">
<field name="VAR" id="pair_red_tx">redTx</field>
</block>
</value>
<next>
<block type="variables_set" id="F#VZ!xU=@g=Ayy%C1f}1">
<field name="VAR" id="found">found</field>
<value name="VALUE">
<block type="logic_boolean" id="}0;6#P+VN^n-.^l:i0dc">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="controls_if" id="vv[EPWR4MhTE}X,HhT].">
<value name="IF0">
<block type="logic_operation" id="uR{VUZlG+z^),J3^4WN;">
<field name="OP">AND</field>
<value name="A">
<block type="logic_compare" id="L-DI=Xd}/[JF.7jQRSXI">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="OcCveREynVEdSchM0wX$">
<field name="VAR" id="sid">selectedId</field>
</block>
</value>
<value name="B">
<block type="math_number" id="a]f=Rdob+P{sEJ!UZ)%x">
<field name="NUM">1</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_operation" id="D1k84!(p0@3n+I6DQb7E">
<field name="OP">AND</field>
<value name="A">
<block type="variables_get" id="{]{!)2Ebh6M_N)fI_mTC">
<field name="VAR" id="pair_b4_seen">b4Seen</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="Q+ePCH{$-W52pYv[2Vth">
<field name="VAR" id="pair_b5_seen">b5Seen</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="O4=a+a[^@t88cg^j]bqL">
<field name="VAR" id="crg">currentRange</field>
<value name="VALUE">
<block type="variables_get" id="+.;=v*A1=zJ2yV+a=C5o">
<field name="VAR" id="pair_blue_range">blueRange</field>
</block>
</value>
<next>
<block type="variables_set" id="{b*(l~z1_D{zAO5ZF!9|">
<field name="VAR" id="ctx">currentTx</field>
<value name="VALUE">
<block type="variables_get" id="DA{ZYIbxysFampL]=]w8">
<field name="VAR" id="pair_blue_tx">blueTx</field>
</block>
</value>
<next>
<block type="variables_set" id="FP3DvHKF;S[o6f;%Ba+l">
<field name="VAR" id="found">found</field>
<value name="VALUE">
<block type="logic_boolean" id="xnvhgbG$:{H:8S,;K3_o">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</statement>
<next>
<block type="telemetry_addTextData_All" id="jK.Bn|FbvO9Tv)5;pU](">
<value name="KEY">
<shadow type="text" id="41kb%dSvxhRuvUu5B%9p">
<field name="TEXT">R1</field>
</shadow>
</value>
<value name="TEXT">
<block type="variables_get" id="Ko+i7T.c$U?W+V.-GyW2">
<field name="VAR" id="range_r1">R1Distance</field>
</block>
</value>
<next>
<block type="telemetry_addTextData_All" id="#AR)j=KsRVH7Q_v}mYDV">
<value name="KEY">
<shadow type="text" id="7kpI[$fDt{`Y_oF//+lS">
<field name="TEXT">R2</field>
</shadow>
</value>
<value name="TEXT">
<block type="variables_get" id="o5[U6enP~6WzBLt4}|NF">
<field name="VAR" id="range_r2">R2Distance</field>
</block>
</value>
<next>
<block type="telemetry_addTextData_All" id="_GRPd;|ndypABw.N#6RB">
<value name="KEY">
<shadow type="text" id="b7P+3c?n*$=gVk[5G%Uv">
<field name="TEXT">R3</field>
</shadow>
</value>
<value name="TEXT">
<block type="variables_get" id="C[!K,0([FT@Ap/#sZq|#">
<field name="VAR" id="range_r3">R3Distance</field>
</block>
</value>
<next>
<block type="telemetry_addTextData_All" id="Y![|td|T2j_QgW=DTM;!">
<value name="KEY">
<shadow type="text" id="2f+RV3Zk1d7bIx6KoqRu">
<field name="TEXT">R4</field>
</shadow>
</value>
<value name="TEXT">
<block type="variables_get" id="9WajZ=g%9,u{wHfON4$[">
<field name="VAR" id="range_r4">R4Distance</field>
</block>
</value>
<next>
<block type="telemetry_addTextData_All" id="v1Yj@aFcD~t~.H/6K;g3">
<value name="KEY">
<shadow type="text" id="Js-d=!wNWDI1^IhNv|;i">
<field name="TEXT">R5</field>
</shadow>
</value>
<value name="TEXT">
<block type="variables_get" id="!%b-04Gs4..F~J:Z8t=b">
<field name="VAR" id="range_r5">R5Distance</field>
</block>
</value>
<next>
<block type="telemetry_addTextData_All" id="PdW/Rs9aRfYLyA`*%^,D">
<value name="KEY">
<shadow type="text" id="%C{@Tqk`.$ln[.PFTOLs">
<field name="TEXT">R6</field>
</shadow>
</value>
<value name="TEXT">
<block type="variables_get" id="-,:NqLe1tx-TA=!6]|5|">
<field name="VAR" id="range_r6">R6Distance</field>
</block>
</value>
<next>
<block type="telemetry_addTextData_All" id="p#*_;VJCwO)a(pOL.8?7">
<value name="KEY">
<shadow type="text" id="|#kDaO7:heQv2mi7Uj,A">
<field name="TEXT">R7</field>
</shadow>
</value>
<value name="TEXT">
<block type="variables_get" id="eeEdc@k@Lx[RQYEqX!fI">
<field name="VAR" id="range_r7">R7Distance</field>
</block>
</value>
<next>
<block type="telemetry_addTextData_All" id="MEDO`s5bFS8]fNBZG2Ss">
<value name="KEY">
<shadow type="text" id="NL?ori^Ff/c^09hvO;Qe">
<field name="TEXT">R8</field>
</shadow>
</value>
<value name="TEXT">
<block type="variables_get" id="qJLEwZ~+v899tW1,6+!L">
<field name="VAR" id="range_r8">R8Distance</field>
</block>
</value>
<next>
<block type="telemetry_addTextData_All" id="V:9z[4?f-1nJBMd~!Ol5">
<value name="KEY">
<shadow type="text" id="!u5gOz+h@v^sgGwzJw2Y">
<field name="TEXT">Red center distance (in)</field>
</shadow>
</value>
<value name="TEXT">
<shadow type="text" id="5Ew;XWD$U.S]P1SD}_8b">
<field name="TEXT">requires both tags</field>
</shadow>
<block type="variables_get" id="!VjG8FgCgJo~Kp.|pTGm">
<field name="VAR" id="red_center_display">redCenterDistance</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</xml>
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<Extra>
<OpModeMeta flavor="AUTONOMOUS" group="Starter Bot" autoTransition="" />
<Enabled value="true" />
</Extra>
