**TI92P*mainO=j٠<|2><O=٬O=<@;Rranger%Z%1() Prgm Local a,b,c,d,f,g,h,i,k,l,m,n,p,q,r,t,u,z,cfg,cfgr,err,fp,ex,ut,dt,dva,tq,tr,ts,tt,en,pen,tf,sr,lr,lr1,lr2,lst,il5,mat,gt,ug,mm,mm1,mm2,rs,ap,cgr,bn,oor,xfr,nl,atr,al1,getit,s7g,l6 "Total collection time"sr "Enter integer from 1 to 99"oor "***LINK ERROR***"lr "Push in CBR cord"lr1 "firmly at both ends."lr2 "Transferring"xfr "LIST"l "Press "p "-Time"t "[ENTER]"en p&enpen "Applications"ap " Match"mat "on CBR to start."tq "T(S)"ts "Quit"ex "Main Menu"mm "Main"mm1 "Menu"mm2 "Repeat Sample"rs "newList(q)l1:l1l2:l1l3:l1l4"nl "l5[6]tr:If tr=2:7tr"atr ":PxlText ts,55,136"tt ":Send {0}:0l1[1]:cumSum(l1)l1"al1 ":For i,1,q:Get l6:l6[c]l2[i]:l6[4]l1[i]:PtOn i,l6[c]:EndFor"getit "Send {7}:Get l6"s7g {"Graph","FUNCTION","Display Digits","FIX 3","Exponential Format","NORMAL","Complex Format","REAL","Split Screen","FULL","Exact/Approx","AUTO","Base","DEC"}cfgr {"Grid","Axes","Labels","Off","On"}cgr {"Distance","Velocity","Acceleration"}dt {en&" Key","[TRIGGER] Button","10 Sec. Delay"}tf {"Light","Medium","Heavy","None"}fp {"Left","Right"," Bound? "}bn {"Feet","Meters"}ut {"1.5 feet","0.5 meter"}ug [["D(Ft)","V(Ft/S)","A(Ft/S)","Ht(Ft)"]["D(M)","V(M/S)","A(M/S)","Ht(M)"]]dva {"L1=Time","L2="&dt[1],"L3="&dt[2],"L4="&dt[3],"L5=Config"}lst {2,2,0,15,9,0,0,0,0,0,0,94,0,0,0,0,0,0}il5 Local adf Define adf(v,l)=Func If l[1]=2 and v<4 Then:v+6l[7] ElseIf v4 Then:0l[7] Else:v+1l[7] EndIf Return l EndFunc Local rstat Define rstat(lr,lr1,lr2)=Prgm Local s,b,c {"Okay","Replace","Replace"}b {"Not Setup","Armed","Sampling","Done"}c Lbl jmd Try:Send {7}:Get s Else If errornum=650 or errornum=180 Then ClrErr Dialog:Title lr:Text lr1:Text lr2:EndDlog If ok1:Goto e Else:PassErr EndIf Goto jmd EndTry ClrIO Disp "Battery: "&b[1+s[3]],"CBR State: "&c[s[14]],"" If s[2]0:Disp "Last Error:"&string(s[2]) Pause Lbl e ClrIO:Return EndPrgm MAIN getMode("ALL")cfg setMode(cfgr) For i,1,3:setGraph(cgr[i],cgr[4]):EndFor setGraph("Coordinates","Rect") PlotsOff :FnOff 1yscl:1xscl 0ymin:0xmin:80ymax:94xmax ClrIO ClrGraph {0}l6 ClrDraw PxlText "Texas Instruments",8,30 PxlText "RANGER (v1.01)",20,37 PxlText pen,45,44 Pause "0"gt If getType(l5)l Then DelVar l5:newList(18)l5 EndIf real(l5)l5 If l5[5]9 or dim(l5)18:1l6[1] If 1=l6[1]:Goto b1 Lbl x 0q If getType(l1)l:1q If q0:Goto y For i,2,4 "(l"&string(i)&")"a If expr("getType"&a)l Then:1q ElseIf dim(l1)expr("dim"&a) Then:1q EndIf EndFor Lbl y If q0:0l5[14] 0l5[17] Lbl oh 0l5[9] {9}l6 ClrIO Disp mm1 Disp mm2 1b PopUp {"Setup/Sample","Set Defaults",ap&"","Plot Menu","Tools",ex},b {"a","b1","a6","t","d4","z"}r:r[b]gt Goto #gt If ok=0:Goto oh Lbl a 1f l5[1]b l5[2]c l5[3]+1d l5[6]+1g l5[7]h If h>6 Then:h-6h ElseIf h=0 Then:4h Else:h-1h EndIf 0l5[13] 1z ClrIO Dialog Title "SETUP OPTIONS" DropDown "Use this setup?",{"Start Now",mm},z Text "" DropDown "Realtime ",{"No","Yes"},b DropDown "Time (S) ",{string(l5[4]),"Change Time"},f DropDown "Display ",dt,d DropDown "Begin On ",tf,g DropDown "Smoothing",fp,h DropDown "Units ",ut,c EndDlog If ok=0:Goto oh cl5[2] d-1l5[3] adf(h,l5)l5 g-1l5[6] 0l5[16] If b=1 and f=2 Then Loop string(l5[4])a Dialog:Title sr Text oor:Request "Time (S)",a EndDlog For i,1,dim(a) mid(a,i,1)m If inString("1234567890",m)=0:Goto h1 EndFor expr(a)a If a1 and a99:Goto h2 Lbl h1 Dialog Title "Data Entry Out-Of-Range":Text oor EndDlog EndLoop Lbl h2 al5[4] EndIf If b=2 Then 15l5[4] If f=2 Then Dialog:Text sr:Text "is fixed in Realtime mode." EndDlog EndIf EndIf If bl5[1] or f=2 Then bl5[1] 1f 3z EndIf {"q","Oh","a"}r:r[z]gt Goto #gt Lbl d4 ClrIO 1b PopUp {"Get CBR Data","Send TI-89 Data","CBR Status","Stop/Clear CBR",mm},b {"r","d6","d1","d5","Oh"}r:r[b]gt Goto #gt Lbl d1 rstat(lr,lr1,lr2) Goto oh Lbl d5 Try:Send {0}: Else:"d5"err:Goto lbad:EndTry Goto oh Lbl d6 Dialog Title "Send TI-89 Data" Text "Receiving TI-89 must be at" Text "Home Screen. Link with cord." EndDlog If ok1:Goto oh ClrIO Disp xfr falsem If getType(l1)=l:max(l1)>0m ""u l5[14]q ClrIO For i,1,5 If i=1 and m or i=q or i=5 or q=9 Then u&":SendCalc l"&string(i)u Disp lst[i] EndIf EndFor Try:expr(u) Else:"d6"err:Goto lbad:EndTry Disp pen:Pause ClrIO Goto oh Lbl a6 ClrIO For i,1,3:setGraph(cgr[i],cgr[4]):EndFor PlotsOff PxlText ap,2,0 l5[2]c PopUp ut,c cl5[2] 0l5[13] 1b PopUp {dt[1]&mat,dt[2]&mat,"Ball Bounce",mm},b {"u1","u2","a7","Oh"}r:r[b]gt Goto #gt Lbl a7 1l5[1]:0l5[3]:4l5[4] 1l5[6]:0l5[7]:1l5[13] 0l5[16] Goto q Lbl b1 18q expr(nl) il5l5 If l6[1]1:Goto a 0l6[1] Goto x Lbl q If l5[16]=1:Goto u1 If l5[16]=2:Goto u2 l5[3]+1l5[9] 4*l5[1]-l5[2]l5[15] ClrIO Lbl qi Try:expr(s7g):Send {1,0} Else:"qi"err:Goto lbad EndTry If l6[3]>0:Text "ALERT: CBR Batteries low" 94q expr(nl) If l5[13]1:Disp "Point CBR at target." If l5[6]1 Then If l5[6]=2:Disp "","Sampling begins 10 Seconds","after pressing "&en&"." If l5[6]=0:Disp "","To start "&pen,"on TI-89." Pause EndIf Lbl q2 If l5[1]=2:Goto s Send {1,11,l5[15],2} expr(atr) Send {3,l5[4]/93,94,tr,0,0,0,0,1,l5[7]} If l5[6]=1 Then Disp "If desired, detach CBR." If l5[13]=1:Disp "Hold ball "&ug[l5[2]],"under CBR." Disp "",pen&"":Pause Lbl qii ClrIO Disp p&tf[2],tq,"","Repeat if desired, then","reattach CBR.",pen&" to get data." Pause 0l6[14] Try:expr(s7g) Else:Goto qii EndTry If l6[14]4:Goto qii EndIf Lbl r ClrIO Try:expr(s7g): Else:"r"err:Goto lbad:EndTry If l6[14]=1 or l6[10]94 Then Disp "First collect.","REALTIME=NO data" Pause :Goto oh EndIf Disp xfr 1l5[1] If l5[17]=8 Then:Send {6,6,f}:0l5[17] EndIf Get l2:Send {5,11,0,1,0} Get l2:Get l3:Get l4:Get l1 l1-l1[1]l1 9l5[14] If l5[13]=1 Then max(l2)-l2l2:l3l3:l4l4:1l5[9] EndIf "t"&string(l5[9])gt If gt="t0":"t1"gt Goto #gt Lbl s ClrDraw:PlotsOff setGraph(cgr[2],cgr[5]) 94q expr(nl) 0xmin:94xmax 6.2xscl 2*l5[2]-1q If l5[3]=0 Then:0ymin:15/qymax Else:3/qymax:ymaxymin EndIf 5*ymin/6a:5*ymax/6b expr(atr) Lbl s2 Try Send {1,0}:Send {1,11,l5[15]} Send {3,0.1,1,tr,0,0,0,0,0,l5[7]} Else:"s2"err:Goto lbad EndTry If tr=1 Then Disp "",p&tf[2],tq Get l6 EndIf l5[3]+1c 94q PxlText dva[l5[2],c],1,4 expr(tt&getit&al1) cl5[9] c+1l5[14] If c>1 Then If c=2 Then:l2l3:Else:l2l4:EndIf Fill 0,l2 EndIf Goto t9 Lbl t ClrIO If l5[14]=0 Then Text "Collect data before viewing plots" Goto oh EndIf Lbl toh 1b If l5[14]9 Then PopUp {"Show Plot","Select Domain",rs,mm,ex},b {"","t8","q","Oh","z"}r "t"&string(l5[14]-1)r[1] Else PopUp {dt[1]&t,dt[2]&t,dt[3]&t,"Plot Tools",rs,mm,ex},b {"t1","t2","t3","t5","q","Oh","z"}r EndIf r[b]gt Goto #gt Lbl t1 1l5[9]:max(l2)b:0.2*ba:Goto t9 Lbl t2 2l5[9]:min(l3)a:max(l3)b:Goto t9 Lbl t3 3l5[9]:min(l4)a:max(l4)b Lbl t9 PlotsOff setGraph(cgr[2],cgr[5]) a-0.2*abs(a)-0.01ymin b+0.2*abs(b)+0.01ymax min(l1)xmin:max(l1)xmax If xmin=xmax:xmin+xxmax 1xscl l5[14]q If q=9:l5[9]+1q expr("NewPlot 1,2,l1,l"&string(q)&",,,,5") If l5[13]=1 and l5[9]=1 Then PxlText dva[l5[2],4],1,5 Else:PxlText dva[l5[2],l5[9]],1,5 EndIf expr(tt) Trace Goto toh Lbl t5 1b PopUp {"Select Domain","Smooth Data","Plot Menu"},b {"t8","t6","t"}r:r[b]gt Goto #gt Lbl t6 8l5[17] l5[7]f PopUp fp,f If f4 Then:0f:Else:f+1f:EndIf Goto r Lbl t8 If l5[9]=0 Then Text "First view a plot" Goto toh EndIf Loop ClrDraw PlotsOn 1 For i,1,2 PxlText bn[i]&bn[3],6,16 Trace xcl5[10+i] LineVert l5[10+i] EndFor If l5[11]l5[12]:Goto t8a Dialog Text "Right bound must Left" EndDlog If ok=0:Goto t LineVert l5[11],1 EndLoop Lbl t8a PxlText "Analyzing",6,16 If l5[12]m:Goto t7 EndWhile Lbl t7 i-1i left(l1,i)l1:left(l2,i)l2:left(l3,i)l3:left(l4,i)l4 "t"&string(l5[9])gt Goto #gt Lbl u1 1a:0ymin:12/(l5[2])ymax Goto u3 Lbl u2 2a:3/(l5[2])ymax:ymaxymin Lbl u3 al5[16]:a-1l5[3] ClrIO Try:expr(s7g):Send {1,0} Else:"u3"err:Goto lbad EndTry setGraph(cgr[2],cgr[5]) 0xmin:40/(l5[16])xmax 4xscl Disp "Try to match the graph","on the next screen.","","Study the graph.",pen&" to start." Pause Lbl u4 2*l5[2]-1u:8-l5[2]l5[15] Send {1,11,l5[15]} If l5[16]=1 Then (9*rand()+1.5)/uk (9*rand()+1.8)/um (6*rand()+1.5)/un Else 0k (5*rand()-2.5)/um (5*rand()-2.5)/un EndIf ClrIO Lbl u5 ClrDraw PlotsOff l5[16]c 40/cq PxlText dva[l5[2],c],1,4 expr(tt) Line 0,k,q/3,m Line q/3,m,2*q/3,m Line 2*q/3,m,q,n Pause expr(nl) Try Send {1,11,l5[15]} Send {3,0.25,1,0,0,0,0,0,0,7} Else:"u5"err:Goto lbad EndTry expr(getit&al1) 0l5[9] c+1l5[14] If c=2 Then:l2l3:Fill 0,l2:EndIf Pause 1b PopUp {"Same"&mat,"New"&mat,ap,mm,ex},b {"u5","u4","a6","Oh","z"}r:r[b]gt Goto #gt Lbl z ClrIO setMode(cfg) For i,1,4:Disp lst[i]:EndFor Try:Send {6,2} Else:ClrDraw:ClrGraph:Stop EndTry ClrDraw ClrGraph Stop Lbl lbad If errornum=650 or errornum=180 Then If err="d6" Then Dialog:Title lr Text "Receiving TI-89 not attached" Text "or at Home Screen" EndDlog Else Dialog Title lr:Text lr1:Text lr2 EndDlog If err="d5":Text "Hint:"&p&tf[2]&" on CBR" EndIf ClrErr If ok1:Goto oh Else PassErr Goto z EndIf Goto #err EndPrgm