(Fwd) Re: programming the ti-85
[Prev][Next][Index][Thread]
I wasn't sure if this got out there so if this is a duplication - I
apoligize for the inconvenience.
------- Forwarded Message Follows -------
From: Self <MAILSERV1/BUCKLEYC>
To: ae607@DETROIT.FREENET.ORG
Subject: Re: programming the ti-85
Cc: calc-ti@lists.ppp.ti.com
Date: Fri, 9 Aug 1996 14:11:08 EST
Date: Fri, 9 Aug 1996 01:07:05 -0400
Reply-to: "P. Kolbus" <ae607@DETROIT.FREENET.ORG>
From: "P. Kolbus" <ae607@DETROIT.FREENET.ORG>
Subject: Re: programming the ti-85
To: Multiple recipients of list CALC-TI <CALC-TI@LISTS.PPP.TI.COM>
(FINALLY! Back to calculator stuff! YES!!! :-)
Hmmm...
The simultaneous equation solver (SIMULT) on the TI-85 would not be
appropriate for this program, as it only solves systems of LINEAR equations,
but the SOLVER should do the trick.
Use the home screen, or lines in your program, or the full-screen solver to
enter the equations
RTDELTA=R=T*tan(DELTA/2)
LRDELTA=L=\pi\*R*DELTA/180
LcRDELT=Lc=2R*sin(DELTA/2)
and so on...
(yes, exactly as you see them, with the exception of \pi\, which is, well,
you know...)
Then use
Solver(RTDELTA,DELTA,0)
to solve the RTDELTA equation for DELTA with an initial guess of DELTA=0.
That should help to clean up your program quite a bit.
I'd like to see the program, as you have it... it looks interesting, and I'd
be happy to help you make the changeover to the Solver().
At 22:09 8/8/96 EST, CHRISTOPHER M. BUCKLEY wrote:
>Hi, -
> I recently purchased a ti-85 to assist me in my work as
>a surveying engineering student here at Ferris State University in
>Michigan. I haven't been able to get the calculator to function as I would
>like and was hoping someone could lend a hand. I am trying to write
>a program to solve for the following equations;
>
>R=T*TAN (DELTA/2)
>L=((pi * R*DELTA)/180)
>LC=2*R*SIN(DELTA/2)
>E=R(1/COS(DELTA/2)-1
>M=R(1-COS(DELTA/2))
>Da=(5729.578/R)
>Dc=2*SIN^(-1)(50/R)
>
>Currently I have this set up to run using the menu function where I
>have rearranged the above formulas (which are used to solve
>horizontal curves in highway design in case you were wondering). The
>program works (and I'll post it if anyone is interested) but it is
>not written well and therefore takes alot of manual searching through menus and
>probably eats up more memory then it should.
>
>Here are the variables: DELTA, T, R, M, L, LC, Da, Dc, E
>
>Given DELTA or Da or Dc and one other of the components listed above, one
>should be able to solve for all other components of the horizontal curve with a
>simple program (as I have written).
>
>Instead of using the menu though, I was hoping to incorporate the simultaneous
>equation solver (which I know nothing about or how to access or use) or some
>other technique so that all of the variables would appear at once so that I
would
>just have to choose the two that I have and the program would solve for the
rest.
>
>Any help would be appreciated!
>(New to the list)-CMB
>BUCKLEYC@MAILSERV1.FERRIS.EDU
>
>
+--------------------------------------------------------+
| Peter Kolbus +1.810.474.0872 |
| ae607@detroit.freenet.org #include <disclaimer.h> |
+--------------------------------------------------------+
| "640K should be enough for anybody" |
| -Bill Gates, 1986 |
| |
| Who is General Failure, and why is he reading drive C? |
| |
| ***Written using 100% recycled electrons*** |
+--------------------------------------------------------+
Hi pete kolbus- chris buckley here - thanks for responding!
Pete, heres a copy of the" horizontal curve solution" program as it
now exists.
menu(1,"T,DELTA",A1,2,"R,DELTA",A2,3,"T,R",A3,
4,"E,DELTA"A4,5,"L,DELTA",A5)
:Lbl A1
:Prompt t:Prompt DELTA
:T sto> B7:DELTA sto>B8
:B1=B7/(TAN(B8/2))
:Disp "R =",B1
:B2=((pi*B1*B8)/180)
:Disp "L =",B2
:B3=2* B1 sin (B8/2)
:Disp "LC =",B3
:Pause
:B4=B1(1/cos (B8/2)-1)
:Disp "E =",B4
:B5=B1*(1-cos(B8/2))
:Disp "M =",B5
:B6=(5729.578/B1)
:Disp "Da =",B6>DMS
:Pause
:B9=2*sin^-1(50/B1)
:Disp "Dc =",B9>DMS
:Stop
:Lbl A2
:Prompt R:Prompt DELTA
:R sto>C7:DELTA sto>C8
:C1=C7(TAN(C8/2))
:Disp "T =",C1
:C2=((pi *C7*C8)/180)
:Disp "L =",C2
:C3=2*C7sin(C8/2)
:Disp "LC =",C3
:Pause
:C4 = C7*(1/cos(C8/2)-1)
:Disp "E =",C4
:C5=C7*(1-cos(C8/2))
:Disp "M =",C5
:C6 = (5729.578/C7)
:Disp "Da =",C6>DMS
:Pause
:C9=2*sin^-1(50/C7)
:Disp "Dc =",C9>DMS
:Stop
:Lbl A3
:Prompt T:Prompt R
:T sto>D7:R sto>D8
:D1=2*tan^-1(D7/D8)
:Disp "DELTA ="D1>DMS"
:D2=(pi*D8*D1)/180
:Disp "L =",D2
:D3=2*D8*sin(D1/2)
:Disp "LC =",D3
:Pause
:D4=D8(1/cos(D1/2)-1)
:Disp "E =",D4
:D5=D8*(1-cos (D1/2))
:Disp "M =",D5
:D6=5729.578/D8
:Disp "Da =",D6>DMS
:Pause
:D9=2*sin^-1(50/D8)
:Disp "Dc =",D9>DMS
:Stop
:Lbl A4
:Prompt Delta:Prompt E
:Delta sto>E7:E sto>E8
:E1=(E8/(1/cos (E7/2)-1))
:Disp "R =",E1
:E2=E1*tan(E7/2)
:Disp "T =",E2
:E3=(pi*E1*E7)/180
:Disp "L =",E3
:Pause
:E4=2*E1 sin (E7/2)
:Disp "LC =",E4
:E5=E1*(1-cos (E7/2))
:Disp "M =",E5
:E6=(5729.578/E1)
:Disp "Da =",E6>DMS
:Pause
:E9=2*sin^-1(50/E1)
:Disp "Dc =",E9>DMS
:Stop
:Lbl A5
:Prompt L:Prompt DELTA
:L sto>F7:DELTA sto>F8
:F1=(180*F7)/(pi*F8)
:Disp "R =",F1
:F2=F1*(tan(F8/2))
:Disp "T =",F2
:F3=2*F1sin(F8/2)
:Disp "LC =",F3
:Pause
:F4=F1(1/cos(F8/2)-1)
:Disp "E =",F4
:F5=F1(1-cos(F8/2))
:Disp "M =",F5
:F6=(5729.578/F1)
:Disp "Da =",F6>DMS
:Pause
:F9=2*sin^-1(50/F1)
:Disp "Dc =",F9>DMS
:Stop:End
I stored the equation symbols as I did so that if
I was to use "R or Tor E,etc in a future program, they would not
interfere with this program (I would probably also store R or T or E,
etc into another symbol ex. R sto>N99 , or N99 = ... : Disp "R
=",N99
The first label from the menu (as I'm sure you know
ea. of the 5 run independently and I therefore could have only
completed the program under Lbl 1 to solve for the components of the
Horizontal curve but it would only be helpful if I had T and DELTA
given) uses B1 as R, B2 as L, b3 as LC, B4 as E,B5 as M, B6 as Da,
and B9 as Dc.
Pete - following your suggestion I then inserted B1B7B8= in front of
B1=B7/(tan(B8/2)) to get :B1B7B8=B1=B7/(tan(B8/2)) and B2B1B8 in
front of B2=((pi*B1*B8)/180) to get :B2B1B8=B2=((pi*B1*B8)/180) and
so on into the body of the program.
Then I tried to enter "solver(B1B7B8,B8,0)" from the home page but I
keep recieving an "error 14 undefined " message when I attempt to do
this. Am I be doing something wrong?
Remember as an end result I would like to have all 9 variables appear
on screen - T,R,E,DELTA,Da,Dc,M,L,LC - I would then be forced to
first choose either Delta or Da or Dc and one of the other variables.
The program would then run and solve for all others. The program (in
its entirety) written above only solves for all components given
T,DELTA or R,DELTA or T,R or E,DELTA or L,DELTA as you can see this
covers only a fraction of the "given" possibilities and would require
several more menus to cover them.
Do you still think incorporation of the solver into the program is
the way to go - if so maybe you could give me some more guidance as
to why I am encountering the error undefined message and how can I
get rid of the menu and have all components appear at once so that I
need only choose 2 of the variables to have the program solve for the
rest. I would not have thought that the solver was the way to go
since from my experience the solver would only solve for 1 variable
(ex - given an equation with 5 variables, one would have to supply 5
of the 6 and the solver would solve for the 6th). I am basically trying to
have one program, given two variables, solve one equation (consisting
of three variables) who's solution and one of the components given
then solve a second equation, etc,etc,etc. Maybe I'm missing
something.
Any further help or alternative solutions would be appreciated!
Anyway the "Horizontal Curve Solution" provided above does work
and provide correct solutions and I hope It proves useful to someone
Many thanks - CMB
CBUCKLEY@Mailserv1.ferris.edu
P.S. Anyone in Civil Engineering or Land Surveying that has any
programs for the TI-85 to share - They would be very much
appreciated! Also I'm looking for an emulator for my 386 that
can act as a mathcoprocessor. The only thing out there that I've
seen on the web is a q87 which is only a demo that runs for 20
minutes (they charge $30.00 for the real thing). I was hoping to
get the real thing (preferably for free!).
References: