The Museum of HP Calculators

HP Forum Archive 17

 My Aviation programs for 35sMessage #1 Posted by Vincze on 17 Aug 2007, 11:15 a.m. Okay, here is my listing of Aviation programs for the 35s. It is only for two two calculations right now, but I plan on extending it for others. It take me a while to write as I had a lot to learn about calculator, and also it takes me longer to write so it does not sound like a fool who does not speak english well wrote it. Here you go. Please let me know if there are any ways to optimize the programs. ``` Aeronautical Functions on the 35s Víncze ``` Aeronautics has many calculations that the pilot uses when flying. For many decades, many pilots have relied upon the tried and true E6-B flight computer to do these calculations. The E6-B is nothing more than a fancy slide rule device that can compute such as time, speed and distance problems, fuel consumption, conversions, altitude and speed corrections, wind and heading issues and a few more calculations. A disadvantage of the E6-B is that it is a manual process, and takes a bit of concentration while in flight. In recent years, computerized E6-B’s have come out that can perform some of these tricky manual calculations very precisely, and quickly. In fact, the HP41C series calculators had an expansion pack that could do these very nicely. My thought is why not use our trusty and inexpensive 35s to do these. I will present here, two of the programs that I have programmed on my unit. True Heading and Ground speed conversion When flying, just because you choose a certain course, it does not mean that is the true course that you must fly to reach your destination. Many factors affect the true heading that you must steer, and the true ground speed. One of the major factors is the wind direction and velocity. In this program, there will be four variables that you must know to determine the true heading and the ground speed. They are true wind direction, wind velocity, true course and true airspeed (TAS). I will indicate these as variables D, V, C, and T respectively. ```Program Listing H001 LBL H H002 CLVARS H003 SF 10 H004 WIND VEL H005 PSE H006 INPUT V H007 TAS H008 PSE H009 INPUT T H010 WIND DIR H011 PSE H012 INPUT D H013 COURSE H014 PSE H015 CF 10 H016 INPUT C H017 - H018 STO A H019 SIN H020 RCL V H021 * H022 RCL T H023 / H024 ASIN H025 STO+ C H026 RCL A H027 X<>Y H028 - H029 SIN H030 RCL A H031 SIN H032 / H033 RCL T H034 * H035 RCL C H036 X<>Y H037 RTN ``` Notes On lines H004, H007, H010, and H013 you will notice text. This is entered by pressing the EQN key, then RCL and the alpha key until the text is entered. After the text entry, press ENTER to exit EQN mode. More information may be found on pages 13-16 – 13-18 of the manual. SF 10 is set with left shift, 2.0. The . will input a 1. CF 10 is set with left shift, 3.0. If you need more explanation, see page13-17 or 14-11 in the manual. Example Let us assume that the Wind direction is 240°, the wind velocity is 38 knots, the true course is 300°, and the TAS is 165 knots. [One note, it does not matter if your wind speed or air speed are in knots, MPH, KMH, all that matters is that you are consistent between the two.] So, V= 38, T= 165, D = 240, and C = 300. When we run the program, we will notice that in the Y register, we have 288.49, this represents the True Heading in degrees, or what we must adjust to in order to compensate for the wind if we wish to have a true course of 300°. In the X register, we see 142.68, which is our true ground speed, with the effects of the wind. Distance Between Two Latitude/Longitude Points When planning a flight between two points, one must know the actual distance, in nautical miles, that you must fly. This is essential for fuel planning, time in flight and filing you flight plan. There are a number of ways that you can do this, but one thing that we must do is use great circles since the earth is round. Two formulas are generally relied upon. The first being the Haversine formula which tells us great-circle distances between two points. It is a bit more complicated, and we will not use it here. The second formula is the spherical law of cosines, which gives well conditioned results down to distance as small as 1 meter. The exact formula is: Spherical Law of Cosines Where d is the distance, and R is the earth’s radius, (we will use nautical miles). Lat and Lon will be in the format of ddd.mmmsss (or degrees.minutes seconds), so if out Latitude is 33° 57’ 00”, we would enter 33.5700. This should all be entered in the degree mode, as the program will convert everything to HMS and radians. ``` Program Listing D001 LBL D D002 CLVARS D003 RAD D004 SF 10 D005 LAT1 D006 PSE D007 INPUT A D008 HMS -> D009 ->RAD D010 STO A D011 LON1 D012 PSE D013 INPUT B D014 HMS -> D015 -> RAD D016 STO B D017 LAT2 D018 PSE D019 INPUT C D020 HMS -> D021 -> RAD D022 STO C D023 LON2 D024 PSE D025 CF 10 D026 INPUT D D027 HMS -> D028 -> RAD D029 STO D D030 RCL A D031 SIN D032 RCL C D033 SIN D034 * D035 RCL A D036 COS D037 RCL C D038 COS D039 * D040 RCL D D041 RCL B D042 - D043 COS D044 * D045 + D046 ACOS D047 3440.065 D048 * D049 DEG D050 RTN ``` You will notice in line D047 that there is a constant there. This will apply the answer towards the mean radius of the earth in nautical miles. If you wish to use kilometers, then the constant would be 6371. You will notice that there are four variables. They are defined as follows: A = Lat1, B = Lon1, C = Lat2, D = Lon2. Example Let us assume we are flying from LAX to JFK. LAX is located at 33° 57’ 00” N, 118° 24’ 00” W. JFX is located at 40° 38’ 00” N and 73° 47’ 00” W. Our variables would therefore be: ```A = 33.5700 B = 118.2400 C = 40.3800 D = 73.4700 ``` When entered into the program, it will return an answer of 2,145.17 nm. If you wish to convert that to km, then you would multiply that by 1.852 to get the kilometers. Special Thanks I would like to thank a number of people who have helped this Hungarian better understand how the unit works. Because I am fearful that I may forget someone, I will just say thank you to the folks over at moHP who have helped. They know who they are, and I thank you sincerely.

 Re: My Aviation programs for 35sMessage #2 Posted by Stefan Vorkoetter on 17 Aug 2007, 11:33 a.m.,in response to message #1 by Vincze Nice! Just one suggestion on using text prompts: If you're going to prompt with a message, then I wouldn't use INPUT after that. I would do either: ```INPUT W ``` or: ```SF 10 EQN "ENTER WIND DIR" CF 10 STO W ``` but not both: ```SF 10 EQN "ENTER WIND DIR" PSE CF 10 INPUT W ``` In the last example above, you're not likely to see the text prompt anyway, since it's only displayed briefly. By the way, to see how the wind calculations are done on the two different types of slide rule devices, take a look at my article: A Tale of Two Whiz Wheels Stefan

 Re: My Aviation programs for 35sMessage #3 Posted by Vincze on 17 Aug 2007, 11:50 a.m.,in response to message #2 by Stefan Vorkoetter I was not aware you could do that. That make more sense for input.

 Re: My Aviation programs for 35sMessage #4 Posted by Jeff Kearns on 18 Aug 2007, 7:35 p.m.,in response to message #3 by Vincze Hi Vincze, The following shortens the True Heading and Ground speed conversion program by 4 steps and takes advantage of the point Stefan made. It works as-is on my 32sii (I do not have a 35s... yet). H001 LBL H H002 CLVARS H003 SF 10 H004 WIND VEL = H005 STO V H006 ENTER TAS H007 STO T H008 WIND DIR = H009 STO D H010 COURSE = H011 CF 10 H012 STO C H013 - H014 STO A H015 SIN H016 RCL V H017 * H018 RCL T H019 / H020 ASIN H021 STO+ C H022 RCL A H023 X<>Y H024 - H025 SIN H026 RCL A H027 SIN H028 / H029 RCL T H030 * H031 RCL C H032 X<>Y H033 RTN Regards, Jeff

 Re: My Aviation programs for 35sMessage #5 Posted by Les Bell on 17 Aug 2007, 7:29 p.m.,in response to message #2 by Stefan Vorkoetter Nice explanation of the Jepp CR series, Stefan. I also remember finding the CR-5 a bit mind-boggling when I first tried to use it! Best, --- Les [http://www.lesbell.com.au]

Go back to the main exhibit hall