(42S) Solvers: Automobiles - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: (42S) Solvers: Automobiles (/thread-13205.html) |
(42S) Solvers: Automobiles - Eddie W. Shore - 06-29-2019 03:29 PM Blog Entry: http://edspi31415.blogspot.com/2019/06/hp-42sdm42free-42-auto-solvers.html Download files for Free42/DM42: https://drive.google.com/file/d/1N4wpO9Q-Mhyp51kdubAh5guf2xZhp8Tc/view?usp=sharing 1. Displacement, Bore, Strokes (File: displacement.raw) Code: 00 { 79-Byte Prgm } Variables: (DISPM): displacement of the a cylinder (cubic inches) (BORE): diameter of the cylinder (inches) (STRO): distance traveled by the piston (inches) (#CYLI): number of cylinders Equation: π/4 * bore^2 * stroke * #cylinders - displacement = 0 Example: Bore = 4 in Stroke = 3.5 in 4-cylinder engine Result: Displacement = 175.9292 in^3 2. Gear Ratio, MPH, RPM (File: gearratio.raw) Code: 00 { 74-Byte Prgm } Variables: (RPM): the tire's revolution per minute (MPH): speed of the vehicle (miles/hour) (TIREDI): diameter of the tire (inches) (GEAR): gear ratio = transmission ratio * final drive ratio Equation: (RPM * π * tire_diameter) / (MPH * 1056) - gear_ratio = 0 Example: RPM = 3,400 rpm Tire Diameter = 28 in Gear Ratio = 3.85 Result: MPH = 73.5635 mph 3. Quarter Mile Estimation: Elapsed Time, Car's Weight, Horsepower (File: quartermile.raw) Code: 00 { 52-Byte Prgm } Variables: (ET): elapsed time for the car to travel 1/4 mile (seconds) (WEIG): weight of the car including passengers, drivers, fuel, and other items carried (pounds) (HP): horsepower Equation: (weight/horsepower)^(1/3) * 5.825 - elapsed_time = 0 Note: MPH = (horsepower/weight)^(1/3) * 234 = 1363.05/elapsed_time Example: Weight: 3,540 lb HP: 215 hp Result: ET: 14.8190 (MPH = 91.9802 mph, [SHIFT] (TOP.FCN) ( 1/X ) 1363.05 [ * ]) 4. Tire Sizes (file name: tiresize.raw) Code: 00 { 87-Byte Prgm } Variable: (SECW): section width (millimeter) (RIMDI): rim diameter (inches) (ASEPC): aspect ratio (TIREDI): tire diameter (inches) On a side of a tire, we can get three of the four values by from a code that looks like this: P235 / 75R17 P: passenger car (L for light trucks) 235: section width 75: aspect ratio R: radial tire 17: rim diameter Equation: (2 * section_width * aspect_ratio) / 2540 + rim_diameter - tire_diameter = 0 Example: Use the stats of the tire above to calculate tire diameter. Result: 30.8780 in |