Community Forums

Share:

HP35s Programming Experts  

Page 1 / 2

summerprophet@hotmail.com
Posts: 360
(@summerprophet)
250+ posts
Joined: 5 years ago

Hi there,

I am working on a Hz Curve solver for my HP35s, where it prompts for any number of values (Delta/Arc Length/Radius/Tangent length....)

What I would like it for the calculator to tally up how many values have been entered, and as soon as 2 values are reached,  start the program to solve for the curve, rather than continue prompting for questions until it reaches the end. Is there a savvy way to sum up x=0? functions?

8 Replies
1 Reply
Field Dog
Member
(@field-dog)
Joined: 4 years ago

250+ posts
Posts: 293
Posted by: [email protected]

Is there a savvy way to sum up x=0? functions?

My post to the Museum of HP Calculators might help. It's from 06-19-2016. Search for "HP 35s Logic Operator AND."

 

 

Reply
Charles L. Dowdell
Posts: 786
(@charles-l-dowdell)
500+ posts
Joined: 9 years ago

Jason Foose had a number of programs that were published in The American Surveyor a year or so ago. Go online and check their archives and you will probably find what you're looking for.

Reply
Bill93
Posts: 5225
Member
(@bill93)
5,000+ posts
Joined: 9 years ago

I wrote a little program in VC++6  for Windows that does all practical combinations of parameters for a horizontal curve, arc and chord definition.  It lets you change anything and uses the last two changes to compute everything else.  I'll send you the source if that would help guide you. My email is in my profile.

CurveCalc.exe on Dropbox

Reply
A Harris
Posts: 7605
Member
(@a-harris)
5,000+ posts
Joined: 9 years ago

@ summerprophet

that is exactly what SMI does on the HP48GX

Reply
Steven Metelski
Posts: 112
Member
(@steven-metelsky)
100+ posts
Joined: 10 months ago

The way the HP35s works, you'd need one separate program for each two knowns.

Knowing R and D to get the program to spit everything else out would be one program.

Knowing R and L would be another

Knowing R and T would be another

You're basically creating many programs and would run out of room before you finished doing it that way.

You have to use existing routines to cheat. Angle Angle Side, Side Side Side, Angle Side Angle can be used to dissect a problem. The AZ add and AZ subtract are two others you'd need. The list goes on.

Then, you can plug into your curve solver with a Radius and Delta. This way, you also have the added benefit of having those routines that can be used for other stuff.

 

Reply
2 Replies
summerprophet@hotmail.com
(@summerprophet)
Joined: 5 years ago

250+ posts
Posts: 360

Steve,

This is actually incorrect. The program I currently have written to solve for curves asks for each of the possible variables, and if they are unknown the value is stored as 0. The X>0? Function can then be used as an If/Then statement to start the calculations. Within the program you can use XEQ to reference lines later in the same program. This keeps your program entirely within a single lettered key, rather occupying multiple keys.

What I am looking for is a way to count the amount of values that are non negative. I could store and recall each x>0? Return, and add them up, and then do a x=2? Prompt after each entry, but this would be a LOT of unnecessary code, and was wondering if a more elegant solution could be achieved.

The problem with my current program is it continues to asks for every variable, rather than triggering the calculation when 2 variables are achieved. 

The goal of course is saving valuable seconds during the exams.

Reply
Field Dog
Member
(@field-dog)
Joined: 4 years ago

250+ posts
Posts: 293
Posted by: [email protected]

The problem with my current program is it continues to asks for every variable, rather than triggering the calculation when 2 variables are achieved.

Flags 0 through 4 are general-purpose flags, for use as signals and in programs. Use 2 user flags, one for each variable. When 2 variables are achieved, 2 user flags will be set.

Reply
Page 1 / 2