Sunday, October 15, 2023

HP 32SII: Glide Slope Calculations (and Memory Management)

HP 32SII:  Glide Slope Calculations (and Memory Management)


Note:   These programs should work on the Swiss Micros DM32.  


Introduction


The following program calculates the forces and angle for a flight of a glider, an aircraft without a engine:


*  Weight

*  Lift Force

*  Drag Force


SI units are used.


With inputs glide distance (G), height (H), and mass (M):


Angle:  A = arcsin(H ÷ G)


Weight:  W = M × 9.80665


Lift:  L = W × sin A


Drag:  D = W × cos A


The program uses the polar-to-rectangular conversion to calculate lift and drag. 



HP 32SII Programs:  Glide Slope Calculations


Code 1:


G01  LBL G

G02  DEG

G03  INPUT G

G04  INPUT H

G05  INPUT M

G06  R↓

G07  x<>y

G08  ÷

G09  ASIN

G10  STO A

G11  VIEW A

G12  R↑

G13  9.80665

G14  ×

G15  STO W

G16  VIEW W

G17  θ,r→y,x

G18  STO L

G19  VIEW L

G20  x<>y

G21  STO D

G22  VIEW D

G23  RTN


Bytes:  42.5

Checksum:  4717


Notes:


*  This version has prompts and view commands to guide the user.  We don't have to preload registers as the INPUT commands guide us.


*  All inputs and outputs are stored to variables.   7 variables are used, which will require 56 bytes.  On the HP 32SII, each variable that contains non-zero values takes 8 bytes of memory.  If you want to make the variables local, insert a CLVARS command for G23 and line G24 becomes RTN.


Variables:


Input:


G = Glide Distance.  The distance that glider climbs to it's peak.   Think of the hypotenuse of a right triangle.   Distance is in meters.  


H = Height.  The height that the glider reaches.  Distance is in meters.


M = Mass.  Mass of the glider in kilograms.


Output:


A = Angle.  Angle of the of glider's flight in degrees. 


W = Weight.  Weight of the glider, which is Newtons.


L = Lift force of the glider, in Newtons.


D = Drag force of the glider, in Newtons.


Code 2:


Code 2 is a shorter code which does not store anything into variables.   The program starts with G (glide distance), H (height), and M (mass) on the stack.  


L01   LBL L

L02   DEG

L03   R↓

L04   x<>y

L05   ÷

L06   ASIN

L07   STOP  (display A)

L08   R↑

L09   9.80665

L10   ×

L11   STOP  (display W)

L12   θ,r→y,x

L13   RTN    (L is on the x stack, D is on the y stack)


Bytes:  27.5 bytes

Checksum:  6446



Examples


Example 1:

Glider distance:  G = 178 m

Height:  H = 23 m

Mass of the glider:  M = 55 kg


Output:

Angle:  A ≈ 7.4241°

Weight:  W ≈ 539.3658 N

Lift:  L ≈ 534.8441 N

Drag:  D ≈ 69.6933 N



Example 2: 

Glider distance:  G = 200 m

Height:  H = 30 m

Mass of the glider:  M = 39 kg


Output:

Angle:  A ≈ 8.6269°

Weight:  W ≈ 382.4594 N

Lift:  L ≈ 378.1322 N

Drag:  D ≈ 57.3689 N



Source


National Museum of the United States Air Force.  "Mathematics of Flight:  Glide Slope II"  September 2020.  Retrieved August 2023.   

https://www.nationalmuseum.af.mil/Portals/7/Mathematics%20of%20Flight%20Glide%20Slope%20II.pdf



Eddie 


All original content copyright, © 2011-2023.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.