Post Reply 
Distance, Speed, Time Calculator Using Units
07-18-2019, 04:15 AM (This post was last modified: 07-19-2019 11:59 PM by Gene222.)
Post: #1
Distance, Speed, Time Calculator Using Units
A distance, speed and time calculator that uses the Units, MKSA, and CONVERT functions of the HP Prime. Enter any two variables and solve for the third.

When solving for the unknown variable, you need to specify the units of the unknown variable. When using h°m′s'' units for time, you need to enter the degrees, minute, and seconds symbols. One hour, 30 minutes and 45 seconds is entered as 1°30′45"

[7/18/19] Added DistSpeedTime_Units4 program, which is a rewrite of the program. This program converts the input values to MKSA units, and then removes the MKSA unit tags before solving for the unknow variable. After the unknown variable is solved, the MKSA unit tag is applied, and the variables are converted back to the users units. This was done because only simple arithmetic equations can be solved with units. This is one way to work around that limitation. Requires software version (2018 10 16) or later. [7/19/19] Corrected the error with the "clear the inputs" in the Solve option. It was clearing the wrong variables.

[Image: Dist1.png]

[7/19/19] Attached is version 5 of the same program. The previous two programs printed the output to the print terminal. This third program shows the results on the INPUT screen. The program loops itself by simply calling the main program and displays the input screen with the answer. To flag the answer, the solved variable flag was added to the variable label of the INPUT statement, as shown below. To exit, press the cancel tab. To clear the inputs, select "clear the inputs" from the "Solved:" selection, and press OK.

[Image: Dist2.png]

Attached File(s)
.zip (Size: 2.23 KB / Downloads: 7)
.zip (Size: 2.67 KB / Downloads: 0)
.zip (Size: 2.26 KB / Downloads: 3)
Find all posts by this user
Quote this message in a reply
Post Reply 

User(s) browsing this thread: 1 Guest(s)