Showing posts with label angle. Show all posts
Showing posts with label angle. Show all posts

Monday, January 5, 2026

Casio fx-CG 100 Python: Clothoid Curve Analysis

Casio fx-CG 100 Python: Clothoid Curve Analysis



Introduction



The clothoid is a mathematical curve where its curvature is in proportion to the distance traveled from the origin. This property allows the curve to serve many applications including connecting railways, designing roller coasters, and traffic distribution.







Let:

L: arc length of the curve traveled

R: radius from the center of the clothoid to the point on the curve

(x, y): point on the clothoid curve with curve length L and radius R

A: parameter, where A = √(R * L)

Θ: angle between the radius and line of the center point and a point on the x-axis, where Θ = L^2 ÷ (2 * A^2)



The point on the curve is determined by a variation of the Fresnel Integrals:

x = A * √2 * ∫( cos(u^2) du, u = 0 to u = t)

y = A * √2 * ∫( sin(u^2) du, u = 0 to u = t)



The Python program uses infinite series to calculate the point (x, y).



The Clothoid curve is also known as the Cornu spiral or the Euler spiral.


Casio fx-CG 100 Program: clothoid.py


# Clothoid Curve Analysis

# template of infinite series

# Eddie W. Shore, 11/23/2025


from math import *


# factorial function

def fact(n):

  f=1

  if n<=1:

    return 1

  else:

    for i in range(2,n+1):

      f*=i

    return f


# main program

print("Clothiod Analysis\nCornu Spiral")

r=eval(input("radius: "))

l=eval(input("arc length: "))

a=sqrt(r*l)

t=l**2/(2*a**2)


# c: cosine, s=sine

c=0

s=0

# set term artificially high

w=100

# set counter at beginning

n=0

# series loop

while abs(w)>=1e-20:

  cc=(-1)**n*t**(4*n+1)/(fact(2*n)*(4*n+1))

  ss=(-1)**n*t**(4*n+3)/(fact(2*n+1)*(4*n+3))

  w=max(cc,ss)

  c+=cc

  s+=ss

  n+=1

# answer

x=a*sqrt(2)*c

y=a*sqrt(2)*s

print("constant: {0:.12f}".format(a))

print("angle: {0:.12f}".format(t))

print("x: {0:.12f}".format(x))

print("y: {0:.12f}".format(y))


Example


Input:

Radius: r = 1.75

Arc Length: l = 4.00


Results:

constant (a): 2.645751311065

angle (degrees): 1.142857142857°

x: 3.602081584381

y: 1.646831998544



Sources


Autodesk, Inc. “About Spiral Definitions” Autodesk Civil 3D Help. https://help.autodesk.com/view/CIV3D/2025/ENU/?guid=GUID-DD7C0EA1-8465-45BA-9A39-FC05106FD822. 2025. Retrieved November 19, 2025.


Constantin. “The Clothoid” A railway track blog. https://railwaytrackblog.com/2016/07/03/the-clothoid/comment-page-1/ March 7, 2016. Retrieved November 19, 2025.


Gombáu, Alberto. “The clothoid: geometry that unites mathematics, engineer and design”. https://medium.com/@gombau/the-clothoid-geometry-that-unites-mathematics-engineering-and-design-6323de37e979. April 11, 2025. Retrieved November 19, 2025.



Eddie


All original content copyright, © 2011-2026. 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.

Saturday, April 19, 2025

Sharp EL-512: Lorentz Factor, Table, Geometric Mean, 3D Vectors

Sharp EL-512: Lorentz Factor, Table, Geometric Mean, 3D Vectors


Blog entries now made in Windows 11. 


Two Sharp calculators. Left: EL-510RN (current) and EL-512 from 1984
Two Sharp calculators. Left: EL-510RN (current) and EL-512 from 1984


Today’s blog will feature the classic Sharp EL-512 from the 1980s. The Sharp EL-512 is a keystroke programming calculator. The EL-512 has four program slots with a memory of 128 programming steps. All programs on the EL-512 are “entered in the blind” and must be entered in full each time.


Program commands:


[ x ]: prompt for a number. When editing a program, we will need to enter a valid number to continue the program.

LOOK: Stops the program and shows the immediate results.


Memory and recall:


STO: Stores the number in the display to memory register 1-9

x → M: Store the number in the display to memory M

M+: add to memory M

RM: recall memory M

Kn:

After a clear or an arithmetic key, just recalls the contents of memory register 1-9.

After entering a number, multiplies the number in the display by the contents of the memory register 1-9 (like RCL× K#)


To recall a register without alteration, it is always safe to multiply the register by 1:

1 Kn #


My review from 2020:

https://edspi31415.blogspot.com/2020/09/retro-review-sharp-el-512-scientific.html



Lorenz Factor


LF = (√(1-v²/c²))⁻¹

c = Speed of light in a vacuum = 299,792,452 m/s


Program:

÷

299792458

+/-

1

=

1/x


Examples:

v = 2.1E8 (2.1 * 10^8) m/s; Result: 1.401212716

v = 2,456,000 m/s; Result: 1.000033559

v = 1,000,000 m/s; Result: 1.060752


Table: Quadratic Polynomial


Generate a table using the function:


f(x) = K3 × x² + K2 × x + K1

where x increases by 1.


Before running the program, store the following:


x² coefficient: K3

x coefficient: K2

constant coefficient: K1

beginning value: Subtract 1, then store the starting value in M. For example, if we want to start with x = 1, store 0 in M.


Program:

1

M+

RM

Kn 3

+

RM

Kn 2

+

1

Kn 1

=


Example:

f(x) = 0.3 × x² + 4 × x – 2.01

Start with x = 1


0.3 STO 3

4 STO 2

-2.01 STO 1

1-1 = 0 x→M

Run the program:


f(1) = 2.29

f(2) = 7.19

f(3) = 12.69

f(4) = 18.79

f(5) = 25.49



Geometric Mean


This program calculates the geometric mean (Π(x_i)^(1/n)) by the formula:

GM = 1/n × Σ(ln x_i) (x≠0)


This will require two program slots, so I’m using program slots 1: and 2:.


Memory registers used:

K1 = Σ(ln x_i)

M = n


Steps:

1. Store 0 to memory M (x→M) and memory 1 (STO 1)

2. Enter x_i and press 1:. Continue until you enter all the data. The number of data points is shown.

3. Press 2: to get the geometric mean.



Program 1:

ENT (enter a valid number)

LN

+

Kn 1

=

STO 1

1

M+

RM


Program 2:

RM

1/x

Kn 1

e^x


Example:

Find the geometric mean of 4, 9, 3, 7, 2, 8, 8, 5, and 6. 9 data points.


0 x→M, 0 STO 1

4 [1:], 9 [1:], 3 [1:], 7 [1:], 2 [1:], 8 [1:], 8 [1:], 5 [1:], 6 [1:]

[2:]

Result (geometric mean): 5.2254102087



3D Vectors: Norm of Two Vectors, Dot Product, Angle between Vectors


For this, I presume that the calculator is set to the desired angle setting (DRG). For the example, I have the EL-512 set to degree mode.


Store the vectors as follows:

First vector: [ register 1, register 2, register 3 ]

Second vector: [ register 4, register 5, register 6 ]


The program returns four values:

Norm of the first vector, stored in register 7

Norm of the second vector, stored in register 8

Dot product, stored in registered in M

Angle between two vectors, stored in register 9


Program:

1

Kn 1

1

Kn 2

→rθ

1

Kn 3

→rθ

STO 7

LOOK


1

Kn 4

1

Kn 5

→rθ

1

Kn 6

→rθ

STO 8

LOOK


1

Kn 1

Kn 4

x→M

1

Kn 2

Kn 5

M+

1

Kn 3

Kn 6

M+

RM

LOOK


÷

(

1

Kn 7

Kn 8

)

=

cos⁻¹

STO 9


Example:

First vector: [ 70, 64, 36 ]

Second vector: [ 55, 18, 94 ]

Results:

Norm of first vector: 101.4494948

Norm of second vector: 110.3856875

Dot product: 8386

Angle: 41.50953299°


Hope you enjoyed this trip down memory lane. Did you have or do you have a Sharp EL-512 or any similar calculator?


Eddie


All original content copyright, © 2011-2025. 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.

Sunday, May 5, 2024

Circular Sector: Finding the Radius and Angle

 Circular Sector: Finding the Radius and Angle





Here is the problem:


We are given the area of the circular segment, A, and the arc length of the segment, s. What is the radius, r, and the angle, θ?


The arc length is calculated as: s = θ * r


The area is calculated as: A = ½ * θ * r^2


We have the system of equations:


A = ½ * θ * r^2

s = θ * r


Divide A by s:


A / s= (½ * θ * r^2) / (θ * r)

A / s = r / 2

2 * A / s = r


Then

s = r * θ

θ = s / r = s^2 / (2 * A)


In summary:

r = 2 * A / s

θ = s / r = s^2 / (2 * A)


Note that the angle is in radians.

Example


Example 1:

s = 4, A = 30


r = (2 * 30) / 4 = 15

θ = 4 / 15 ≈ 0.266666667


Example 2:

s = 10.5, A = 31.8


r = (2 * 30) / 4 = 212/35 ≈ 6.057142857

θ = 10.5 / (212/35) = 735/424 ≈ 1.733490566


Eddie


All original content copyright, © 2011-2024. 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.

Saturday, June 17, 2023

Areas of Right Triangle Knowing the Hypotenuse and the Angle

Areas of Right Triangle Knowing the Hypotenuse and the Angle



General Right Triangle


Let:


D = the length of a hypotenuse

A = the length of side A opposite of angle α°

B = the length of side B opposite of angle β°


Let's assume that we only know of hypotenuse D and angle α°.  Find the area:


Area = 1/2 × A × B


Determined by trigonometric ratios: 

 A = H × sin α° and B = H × cos α°


Then:


Area = 1/2 × A × B

Area = 1/2 × H × sin α° × H × cos α°

Area = 1/2 × H^2 × sin α° × cos α°


Let's assume that we only know the angle β° instead:


Area = 1/2 × H^2 × sin α° × cos α°


Since α° + β° = 90°,


Area = 1/2 × H^2 × sin (90° - β°) × cos (90° - β°)


With the trigonometric identities:

sin(90° - θ°) = cos θ°, and cos(90° - θ°) = sin θ°


Area = 1/2 × H^2 × cos β° × sin β°


In a remarkable conclusion:


Area = 1/2 × H^2 × sin α° × cos α° = 1/2 × H^2 × cos β° × sin β°


Let's look at specific right triangles.




Area of 30°-60°-90° Triangles





Assume that α = 60° and β = 30°.  Then:


Area = 1/2 × H^2 × sin 60° × cos 60° 

Area = 1/2 × H^2 × √3/2 × 1/2

Area = (H^2 × √3) / 8


Similarly,


Area = 1/2 × H^2 × sin 30° × cos 30° 

Area = 1/2 × H^2 × 1/2 × √3/2

Area = (H^2 × √3) / 8



Area of 45°-45°-90° Triangles





On a 45-45-90 triangle, the measures A and B are equal.  Then:


Area = 1/2 × H^2 × sin 45° × cos 45° 

Area = 1/2 × H^2 × √2 / 2 × √2 / 2 

Area = H^2 / 4



Area of 75°-15°-90° Triangles





Assume that α = 75° and β = 15°.  Then:


Area = 1/2 × H^2 × sin 75° × cos 75° 

Area = 1/2 × H^2 × (√6 + √2)/4 × (√6 - √2)/4

Area = 1/32 × H^2 × (√6 + √2) × (√6 - √2)

Area = 1/32 × H^2 × (6 - √6 × √2 + √6 × √2 - 2)

Area = 1/32 × H^2 × 4

Area = H^2 / 8


Similarly,


Area = 1/2 × H^2 × sin 15° × cos 15° 

Area = 1/2 × H^2 × (√6 - √2)/4 × (√6 + √2)/4

Area = 1/32 × H^2 × (6 + √6 × √2 - √6 × √2 - 2)

Area = 1/32 × H^2 × 4

Area = H^2 / 8



Summary


Area of a Right Triangles knowing only the Hypotenuse and One (does not matter which one as it turns out) Angle:


Area = 1/2 × H^2 × sin θ × cos θ


Area of 30°-60°-90° Triangles: (H^2 × √3) / 8


Area of 45°-45°-90° Triangles: H^2 / 4


Area of 75°-15°-90° Triangles: H^2 / 8



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. 


Saturday, April 30, 2022

Casio fx-CG 50: Solar Panel Calculations

 Casio fx-CG 50: Solar Panel Calculations


Note:  The calculator programs can be modified for the monochrome Casio graphing calculators by removing the Color commands (Black, Blue, etc.).  The programs use ClrText and Locate to generate a result screen.


Optimum Tilt of a Solar Panel


The program SLRPANEL estimates the optimum tilt of a solar panel given your latitude (North/South), time of day, and day of the year.  The program assumes a 365 day year.   


For the time of day, enter the time in hours before noon.  Example:  For 9:00 AM, enter 3.   For 3:00 PM, enter -3.   


The declination of the sun is estimated at:


δ ≈ -23.44° * (cos(360°/365° * (n + 10)))

n = number of days from January 1, n = 0 for January 1.  


The program is listed in text file mode.


Casio fx-CG50 Program: SLRPANEL

(464 bytes)


'ProgramMode:RUN

Deg

ClrText

Locate 1,1,"SOLAR PANEL TILT"

Yellow Locate 1,3,"EWS 2022"

For 1->I To 750:Next


ClrText

"365 DAY YEAR ASSUMED"

"MONTH"?->M

"DAY"?->D

"HOURS FROM NOON"?->T

"LATITUDE (N//S)"?->L

0->X

M>2=>Int (0.4*M+2.3)->X

31*(M-1)+D-X-1->N

(-)23.44*(cos (360/365*(N+10)))->E

sin^-1 (sin L*sin E+cos E*cos L*cos (15*T))->H

sin^-1 (sin (15*T)*cos E/cos H)->Z

Z=0=>1Exp(-)9->Z

2/3*(tan^-1 (tan H/tan Z)-30)->P

ClrText

Black Locate 1,1,"MONTH:"

Blue Locate 8,1,M

Black Locate 11,1,"DAY:"

Blue Locate 16,1,D

Black Locate 1,3,"DEC:"

Blue Locate 7,3,E

Blue Locate 21,3,"_deg_"

Black Locate 1,5,"TILT:"

Blue Locate 7,5,P

Blue Locate 21,5,"_deg_"


Example:


April 30, 11:30 AM, at Latitude 40°20'11"


Inputs:

Month:  4

Day:  30

Hours From Noon:  0.5

Latitude:  40°20°11°   ( [ OPTN ], [ F6 ] ( > ), [ F5 ] (ANGLE), [ F4 ] ( ° ' " ))


Result Screen:

MONTH:  4   DAY: 30


DEC:  14.18251427 °


TILT:  34.39287954 °


Solar Energy Reflected


Given an incidence angle and the type of material, the program SOLARENG estimates the ratio of solar reflected.   The program offers three types of material:


Glass, average index of refraction of 1.52 is used

Silicon, average index of refraction of 3.45 is used

Diamond, average index of refraction of 2.417 is used


The program is listed in text file mode.


Casio fx-CG50 Program: SOLARENG

(324 bytes)


'ProgramMode:RUN

Deg

"INCIDENCE ANGLE"?->I

Menu "MATERIAL","GLASS",1,"SILICON",2,"DIAMOND",3

Lbl 1:1.52->R:Goto 4

Lbl 2:3.45->R:Goto 4

Lbl 3:2.417->R:Goto 4

Lbl 4

sin^-1 (sin I/R)->W

0.5*((sin (I-W))^<2>/(sin (I+W))^<2>+(tan (I-W))^<2>/(tan (I+W))^<2>)*100->P

ClrText

Black Locate 1,1,"AT ANGLE "

Black Locate 10,1,I

Black Locate 21,1,"_deg_"

Green Locate 1,2,"INDEX="

Red Locate 9,2,R

Green Locate 1,3,"REFLECT="

Red Locate 9,3,P

Red Locate 21,3,"%"


Example:


Incidence Angle: 6°, glass


Inputs:

INCIDENCE ANGLE: 6

MATERIAL: 1: GLASS


Result Screen:

AT ANGLE 6 °

INDEX = 1.52

REFLECT = 4.25820312 %


HP 32S and HP 32SII Week:  May 2, 2022 - May 6, 2022


Source:


Rosenstein, Morton.  Computing With the Scientific Calculator Casio 1986  ISBN-13:  978-1124161433


Eddie


All original content copyright, © 2011-2022.  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. 


Sunday, March 7, 2021

Fun with the TI-73 Part II: Rolling Two Dice, Numerical Derivative, Rectangular/Polar Conversions

Fun with the TI-73 Part II: Rolling Two Dice, Numerical Derivative, Rectangular/Polar Conversions


TI-73 Program:  TWODICE - Rolling Two Dice


Introduction:


The program TWODICE will roll two regular dice and give the sum of those dice in three lists:


L_1: die 1

L_2: die 2

L_3: total


If there are seven rolls or less, the program displays the rolls.  In any case, the results are stored in the above lists.


Access L_1 by pressing [ 2nd ] [ STAT ] (LIST), 1

Access L_2 by pressing [ 2nd ] [ STAT ] (LIST), 2

Access L_3 by pressing [ 2nd ] [ STAT ] (LIST), 3


Program:


"EWS 2021"

Disp "ROLL THE DICE"

Input "ROLLS? ",X

dice(X)→L_1

dice(X)→L_2

L_1+L_2→L_3

If X≤7

Then

ClrScreen

For(A,1,X)

Output(A,1,L_1(A))

Output(A,3,L_2(A))

Output(A,6,L_3(A))

End

Pause

End

ClrScreen

Disp "L_1 = DIE 1","L_2 = DIE 2","L_3 = TOTAL"

Pause


Your results will vary.


TI-73 Program:  DERIVY1 - Numerical Derivative of y1(x)


The simple program DERIVY1 calculates the numerical derivatives of the equation stored in Y_1.  


Access Y_1 by pressing [ 2nd ] [ APPS ] (VARS), 2, 1


Program:


"EWS 2021"

Disp "D/DX Y_1"

Prompt X

10^(-8)→H

(2*H)^-1*(Y_1(X+H)-Y_1(X-H))→D

Disp "APPROX D/DX"

Pause D


Example:


Y_1 = (X^2-3)^2 + 1

Derivative at x = 0.95, Result:  -7.9705

Derivative at x = 2, Result:  8


Y_1 = e^(X^3/4)

Derivative at x = 0.46, Result: 0.16261

Derivative at x = 1.55, Result:  4.571295


TI-73 Program: RECPOL - Rectangular/Polar Conversion


This program has two conversions:


1.  >RECT:  Polar (r, θ) to Rectangular (x, y)

2.  >POLAR:  Rectangular (x, y) to Polar (r, θ)


This program works in either Degree or Radian mode.


I take a different approach to calculate angle than the atan2 method.  Approached this as calculating the angle between the vectors [ x, 0 ] and [ x, y].  The angle between vectors v1 and v2 is:


θ = acos( dot(v1, v2) / ( norm(v1) * norm(v2) ) = acos( x / √(x^2 + y^2))


The angle is negative if y<0.   


Like the argument and angle conversions, the point (0,0) is defined to have an angle of 0.


Since there is no theta character (θ) on the TI-73, I use the variable A instead.


Program:


"EWS 2021"

Lbl 0

Menu("MENU",">RECT",1,">POLAR",2,"EXIT",3)

Lbl 1

Input "R? ",R

Input "ANG? ",A

R*cos(A)→X

R*sin(A)→Y

Disp "X= ",X,"Y= ",Y

Pause

Goto 0

Lbl 2

Input "X? ",X

Input "Y? ",Y

√(X^2+Y^2)→R

If X=0 and Y=0

Then

0→A

Else

cos^-1(X/√(X^2+Y^2))→A

If Y<0

-A→A

End

Disp "R=",R,"ANG=",A

Pause

Goto 0

Lbl 3


Examples:


Examples are in Degree mode.


R = 19, ANG = 87.3°

Result:  X = 0.8950225635, Y = 18.97890762


X = -11.5, Y = 2.4

Result:  R = 1.74776575, ANG = 168.2118167



Eddie


All original content copyright, © 2011-2021.  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. 


Monday, February 8, 2021

An Alternative Way of Finding the Angle in a Rectangular to Polar Conversion

An Alternative Way of Finding the Angle in a Rectangular to Polar Conversion


Welcome to a special Monday edition of Eddie’s Math and Calculator Blog. 


The Traditional Method


Often we are required to find polar coordinates of a given point (x,y).   Finding the radius, r, is fairly simple:


r = √(x^2 + y^2) 


When talking about complex numbers, r represents the absolute value of x + yi where i = √-1.


Finding the angle, θ, often uses the formula:


θ = atan(y/x)


In complex numbers, θ represents the argument (arg) function.


On a scientific calculator the range of the arctangent function is ( -90°, 90° ).  (open interval).   In finding the true angle, adjustments will be required:





Let a = atan(y/x). Then: 


Quadrant I (x and y are both positive):  θ = a

Quadrant II (x is negative, y is positive): θ = a + 180°

Quadrant III (x and y are both negative):  θ = a - 180°

Quadrant IV (x is positive, y is negative):  θ = a 


If you are working with radian angle measures, know that 90° = π/2, and 180° = π.


This does not take into consideration situations where either x or y is 0:


If x > 0 and y = 0:  θ = 0°

If x = 0 and y > 0:  θ = 90°

If x < 0 and y = 0:  θ = 180°

If x = 0 and y < 0:  θ = -90°


Is there a shorter way to calculate θ?  


The Vector Method


Consider the point (x, y) as a vector [x, y].   Now draw another vector [x, 0].  In a regular Cartesian coordinate system, angles are measured from the x-axis counter clockwise.  





Let a and b represent two vectors.  Then the angle between two vectors are:


cos θ = (a ● b) / ( ||a|| ||b|| ) = dot(a,b) / ( norm(a) * norm(b) )


with:

dot(a,b) = a1 * b1 + a2 * b2

norm(a) = √(a1^2 + a2^2)

norm(b) = √(b1^2 + b2^2)


Let a = [x, y] and b = [x, 0].  Then:


cos θ = (x^2) / (√(x^2 + y^2) * √(x^2))

cos θ = (x^2) / (√(x^2 + y^2) * x)

cos θ = x / √(x^2 + y^2)

θ = acos( x / √(x^2 + y^2) )


The range of the arccosine function of a calculator is [ 0°, 180° ].  


If y < 0, the angle would be measured clockwise, and therefore I would make the adjustment:

θ = -acos( x / √(x^2 + y^2) )


In summary:

If y ≥ 0, θ = acos( x / √(x^2 + y^2) )

If y < 0, then θ = -acos( x / √(x^2 + y^2) )


Examples:


Find the angle, in degrees, in a rectangular to polar conversions:


Quadrant I  (2, 4):  y ≥ 0:   θ = acos( 2 / √(2^2 + 4^2) ) ≈ 63.43494882°


Quadrant II (-2, 4):  y ≥ 0:    θ = acos( -2 / √((-2)^2 + 4^2) ) ≈ 116.5650512°


Quadrant II (-2, -4):  y < 0:  θ = -acos( (-2) / √((-2)^2 + (-4)^2) ) ≈ -116.5650512°


Quadrant IV (2, -4):  y < 0:  θ = -acos( 2) / √(2^2 + (-4)^2) ) ≈ -63.43494882°


Vector Method for Navigation


In navigation, angles start from true North (up) and rotate clockwise towards East (right).  Angles are measured from 0° to 360°.


Use the vectors [0, N] and [E, N], then the angle between these vectors are:

If E ≥ 0,  θ = acos( N / √(E^2 + N^2))

If E < 0, θ = 360° - acos( N / √(E^2 + N^2))


Note:  This is the first blog entry that I have typed on Google Docs.  I have been using Windows app Wordpad for the last three years.   I am testing Google apps as I am considering buying a Chromebook.


Eddie


All original content copyright, © 2011-2021.  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.


Python – Earth’s Radius and Gravity in US Units

Python – Earth’s Radius and Gravity in US Units Introduction The following script, gravus2.py, estimates the Earth’s gravity i...