Post Reply 
Python to FOCAL Compiler
10-06-2015, 11:16 AM (This post was last modified: 10-06-2015 11:16 AM by Ángel Martin.)
Post: #4
RE: Python to FOCAL Compiler
Thanks for this one, very well put together - as usual with your contribution Thomas! Maybe I should start using Python, this is a good incentive...

Dont mean to hijaak this thread but the attached code does the calculation of the mutual inductance example using the SandMath's versions of the eliptic integrals (see lines 28 and 32) - just thought it would be fun to try and sure enough works as advertised.

Code:

01  LBL "MIND"
02  "R1=?"
03  PROMPT
04  STO 06
05  "R2=?"
06  PROMPT
07  STO 07
08  LBL 00
09  "d=?"
10  PROMPT
11  LBL C
12  STO 05
13  RCL 07
14  RCL 06
15  *
16  4
17  *
18  RCL 06
19  RCL 07
20  +
21  X^2
22  RCL 05
23  X^2
24  +
25  /
26  STO 05
27  90
28  ELIPF (SFL# 45)
29  STO 08
30  RCL 05
31  90
32  LEI2  (SFL# 46)
33  STO 09
34  E
35  RCL 05
36  2
37  /
38  -
39  RCL 08
40  *
41  RCL 09
42  -
43  PI
44  *
45  8 E-7
46  *
47  RCL 06
48  RCL 07
49  *
50  RCL 05
51  /
52  SQRT
53  *
54  "MI="
55  ARCL X
56  PROMPT
57  GTO 00
58  END

I added the text prompts and an entry for repeat calculation at different distances. Should be obvious reading the examples in page 83 of the NASA document.

Cheers,
ÁM

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Python to FOCAL Compiler - Thomas Klemm - 10-05-2015, 10:58 PM
RE: Python to FOCAL Compiler - Sukiari - 10-06-2015, 03:36 AM
RE: Python to FOCAL Compiler - Ángel Martin - 10-06-2015 11:16 AM
Java to FOCAL Compiler - Thomas Klemm - 10-07-2015, 04:38 PM



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