How to turn contents of a .txt file into a .g1m
1 post
• Page 1 of 1
- Stavros Purdie
- Junior Member
- Posts: 1
- Joined: Fri Oct 08, 2021 11:55 pm
- Calculators: Casio fx-9750GII (SH4), Casio fx-9860GII
How to turn contents of a .txt file into a .g1m
Hi everyone.
I found this project https://community.casiocalc.org/topic/7071-program-for-fx-9860gii-to-locate-comets-or-planets-in-the-sky/ (unfortunatly all of the google drive links are down) and I wanted to know how to turn the code show at the top of the forum into a .g1m file
all my attempts have failed and I would like to know of a solution.
BELOW IS THE CODE
"2014.0106, 12:00:00"→Str 1↵
{-4693.4,1.0000026666,61.7852,295.7508,345.5009,2456625.3147}→List 1↵
Exp(StrLeft(Str 1,4))→Y↵
Exp(StrMid(Str 1,6,2))→M↵
Exp(StrMid(Str 1,8,2))→D↵
Exp(StrMid(Str 1,12,2))+Exp(StrMid(Str 1,15,2))÷60+Exp(StrMid(Str 1,18,2))÷3600→T↵
Int ((M−14)÷12)→A↵
Int ((1461(Y+4800+A))÷4)→B↵
Int ((367(M−2−12A))÷12)→C↵
Int ((Y+4900+A)÷100)→E↵
Int ((3E)÷4)→F↵
B+C−F+D−32075.5→J↵
J+T÷24→T¸
If List 1[1]=0 Or List 1[2]≤0 Or List 1[2]=1:Then Stop:IfEnd↵
If List 1[1]>0 And List 1[2]>1:Then Stop:IfEnd↵
If List 1[1]<0 And List 1[2]<1:Then Stop:IfEnd↵
(π÷180)List 1[3]→List 1[3]↵
(π÷180)List 1[4]→List 1[4]↵
(π÷180)List 1[5]→List 1[5]↵
If List 1[1]>0:Then Goto 2:IfEnd↵
1.32712440018ᴇ20→G↵
1.49597870691ᴇ11→O↵
86400√(G÷(-OList 1[1])^3)→M↵
M(T−List 1[6])→M↵
0→U↵
1→V↵
While Abs (V−U)>1ᴇ-12↵
U→V↵
List 1[2]sinh V−V−M→F↵
List 1[2]cosh V−1→G↵
List 1[2]sinh V→H↵
List 1[2]cosh V→I↵
-F÷G→A↵
-F÷(G+AH÷2)→B↵
-F÷(G+AH÷2+B²I÷6)→C↵
V+C→U↵
WhileEnd↵
cos⁻¹ ((List 1[2]−cosh U)÷(List 1[2]cosh U−1))→F↵
If U<0:Then 2π−F→F:IfEnd↵
List 1[1](1−List 1[2]cosh U)→R¸
Rcos F→List 2[1]↵
Rsin F→List 2[2]↵
List 2[1]cos List 1[5]−List 2[2]sin List 1[5]→List 3[1]↵
List 2[1]sin List 1[5]+List 2[2]cos List 1[5]→List 3[2]↵
List 3[1]→List 2[1]↵
List 3[2]cos List 1[3]→List 2[2]↵
List 3[2]sin List 1[3]→List 2[3]↵
List 2[1]cos List 1[4]−List 2[2]sin List 1[4]→List 3[1]↵
List 2[1]sin List 1[4]+List 2[2]cos List 1[4]→List 3[2]↵
List 2[3]→List 3[3]↵
Goto 3↵
Lbl 2↵
365.256898326List 1[1]^1.5→P↵
(T−List 1[6])÷P→M↵
M−Int M→M↵
If M<0:Then M+1→M:IfEnd↵
2πM→M↵
M→U↵
9→V↵
While Abs (V−U)>1ᴇ-12↵
U→V↵
V−List 1[2]sin V−M→F↵
1−List 1[2]cos V→G↵
List 1[2]sin V→H↵
List 1[2]cos V→I↵
-F÷G→A↵
-F÷(G+AH÷2)→B↵
-F÷(G+AH÷2+B²I÷6)→C↵
V+C→U↵
WhileEnd↵
List 1[1](cos U−List 1[2])→List 2[1]↵
List 1[1]√(1−List 1[2]²)sin U→List 2[2]↵
√(List 2[1]²+List 2[2]²)→R¸
List 2[1]cos List 1[5]−List 2[2]sin List 1[5]→List 3[1]↵
List 2[1]sin List 1[5]+List 2[2]cos List 1[5]→List 3[2]↵
List 3[1]→List 2[1]↵
List 3[2]cos List 1[3]→List 2[2]↵
List 3[2]sin List 1[3]→List 2[3]↵
List 2[1]cos List 1[4]−List 2[2]sin List 1[4]→List 3[1]↵
List 2[1]sin List 1[4]+List 2[2]cos List 1[4]→List 3[2]↵
List 2[3]→List 3[3]↵
Lbl 3↵
{1.000003,0.016701,0,0,103.154,2456294.541}→List 4↵
(π÷180)List 4[3]→List 4[3]↵
(π÷180)List 4[4]→List 4[4]↵
(π÷180)List 4[5]→List 4[5]↵
365.2563496155List 4[1]^1.5→P↵
(T−List 4[6])÷P→M↵
M−Int M→M↵
If M<0:Then M+1→M:IfEnd↵
2πM→M↵
M→U↵
9→V↵
While Abs (V−U)>1ᴇ-12↵
U→V↵
V−List 4[2]sin V−M→F↵
1−List 4[2]cos V→G↵
List 4[2]sin V→H↵
List 4[2]cos V→I↵
-F÷G→A↵
-F÷(G+AH÷2)→B↵
-F÷(G+AH÷2+B²I÷6)→C↵
V+C→U↵
WhileEnd↵
List 4[1](cos U−List 4[2])→List 2[1]↵
List 4[1]√(1−List 4[2]²)sin U→List 2[2]↵
√(List 2[1]²+List 2[2]²)→R¸
List 2[1]cos List 4[5]−List 2[2]sin List 4[5]→List 5[1]↵
List 2[1]sin List 4[5]+List 2[2]cos List 4[5]→List 5[2]↵
List 5[1]→List 2[1]↵
List 5[2]cos List 4[3]→List 2[2]↵
List 5[2]sin List 4[3]→List 2[3]↵
List 2[1]cos List 4[4]−List 2[2]sin List 4[4]→List 5[1]↵
List 2[1]sin List 4[4]+List 2[2]cos List 4[4]→List 5[2]↵
List 2[3]→List 5[3]↵
List 3[1]−List 5[1]→List 6[1]↵
List 3[2]−List 5[2]→List 6[2]↵
List 3[3]−List 5[3]→List 6[3]↵
(T−2451545)÷36525→W
84381.448−46.84024W−5.9ᴇ-4W²+1.813ᴇ-3W^3→θ↵
πθ÷648000→θ↵
List 6[1]→X↵
List 6[2]cos θ−List 6[3]sin θ→Y↵
List 6[2]sin θ+List 6[3]cos θ→Z↵
√(X²+Y²+Z²)→R↵
tan⁻¹ (Y÷X)→A↵
If X<0:Then A+π→A:IfEnd↵
If X>0 And Y<0:Then A+2π→A:IfEnd↵
(12÷π)A→A↵
(180÷π)sin⁻¹ (Z÷R)→D↵
R¸
θ¸
A¸
D¸
Locate 1,1,"t(JD)"↵
Locate 1,2,"r(AU)"↵
Locate 1,3,"R(AU)"↵
Locate 1,4,"ε(rad)"↵
Locate 1,5,"a(h)"↵
Locate 1,6,"δ(°)"↵
I found this project https://community.casiocalc.org/topic/7071-program-for-fx-9860gii-to-locate-comets-or-planets-in-the-sky/ (unfortunatly all of the google drive links are down) and I wanted to know how to turn the code show at the top of the forum into a .g1m file
![Eh :eh:](./images/smilies/icon_eh.gif)
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
BELOW IS THE CODE
"2014.0106, 12:00:00"→Str 1↵
{-4693.4,1.0000026666,61.7852,295.7508,345.5009,2456625.3147}→List 1↵
Exp(StrLeft(Str 1,4))→Y↵
Exp(StrMid(Str 1,6,2))→M↵
Exp(StrMid(Str 1,8,2))→D↵
Exp(StrMid(Str 1,12,2))+Exp(StrMid(Str 1,15,2))÷60+Exp(StrMid(Str 1,18,2))÷3600→T↵
Int ((M−14)÷12)→A↵
Int ((1461(Y+4800+A))÷4)→B↵
Int ((367(M−2−12A))÷12)→C↵
Int ((Y+4900+A)÷100)→E↵
Int ((3E)÷4)→F↵
B+C−F+D−32075.5→J↵
J+T÷24→T¸
If List 1[1]=0 Or List 1[2]≤0 Or List 1[2]=1:Then Stop:IfEnd↵
If List 1[1]>0 And List 1[2]>1:Then Stop:IfEnd↵
If List 1[1]<0 And List 1[2]<1:Then Stop:IfEnd↵
(π÷180)List 1[3]→List 1[3]↵
(π÷180)List 1[4]→List 1[4]↵
(π÷180)List 1[5]→List 1[5]↵
If List 1[1]>0:Then Goto 2:IfEnd↵
1.32712440018ᴇ20→G↵
1.49597870691ᴇ11→O↵
86400√(G÷(-OList 1[1])^3)→M↵
M(T−List 1[6])→M↵
0→U↵
1→V↵
While Abs (V−U)>1ᴇ-12↵
U→V↵
List 1[2]sinh V−V−M→F↵
List 1[2]cosh V−1→G↵
List 1[2]sinh V→H↵
List 1[2]cosh V→I↵
-F÷G→A↵
-F÷(G+AH÷2)→B↵
-F÷(G+AH÷2+B²I÷6)→C↵
V+C→U↵
WhileEnd↵
cos⁻¹ ((List 1[2]−cosh U)÷(List 1[2]cosh U−1))→F↵
If U<0:Then 2π−F→F:IfEnd↵
List 1[1](1−List 1[2]cosh U)→R¸
Rcos F→List 2[1]↵
Rsin F→List 2[2]↵
List 2[1]cos List 1[5]−List 2[2]sin List 1[5]→List 3[1]↵
List 2[1]sin List 1[5]+List 2[2]cos List 1[5]→List 3[2]↵
List 3[1]→List 2[1]↵
List 3[2]cos List 1[3]→List 2[2]↵
List 3[2]sin List 1[3]→List 2[3]↵
List 2[1]cos List 1[4]−List 2[2]sin List 1[4]→List 3[1]↵
List 2[1]sin List 1[4]+List 2[2]cos List 1[4]→List 3[2]↵
List 2[3]→List 3[3]↵
Goto 3↵
Lbl 2↵
365.256898326List 1[1]^1.5→P↵
(T−List 1[6])÷P→M↵
M−Int M→M↵
If M<0:Then M+1→M:IfEnd↵
2πM→M↵
M→U↵
9→V↵
While Abs (V−U)>1ᴇ-12↵
U→V↵
V−List 1[2]sin V−M→F↵
1−List 1[2]cos V→G↵
List 1[2]sin V→H↵
List 1[2]cos V→I↵
-F÷G→A↵
-F÷(G+AH÷2)→B↵
-F÷(G+AH÷2+B²I÷6)→C↵
V+C→U↵
WhileEnd↵
List 1[1](cos U−List 1[2])→List 2[1]↵
List 1[1]√(1−List 1[2]²)sin U→List 2[2]↵
√(List 2[1]²+List 2[2]²)→R¸
List 2[1]cos List 1[5]−List 2[2]sin List 1[5]→List 3[1]↵
List 2[1]sin List 1[5]+List 2[2]cos List 1[5]→List 3[2]↵
List 3[1]→List 2[1]↵
List 3[2]cos List 1[3]→List 2[2]↵
List 3[2]sin List 1[3]→List 2[3]↵
List 2[1]cos List 1[4]−List 2[2]sin List 1[4]→List 3[1]↵
List 2[1]sin List 1[4]+List 2[2]cos List 1[4]→List 3[2]↵
List 2[3]→List 3[3]↵
Lbl 3↵
{1.000003,0.016701,0,0,103.154,2456294.541}→List 4↵
(π÷180)List 4[3]→List 4[3]↵
(π÷180)List 4[4]→List 4[4]↵
(π÷180)List 4[5]→List 4[5]↵
365.2563496155List 4[1]^1.5→P↵
(T−List 4[6])÷P→M↵
M−Int M→M↵
If M<0:Then M+1→M:IfEnd↵
2πM→M↵
M→U↵
9→V↵
While Abs (V−U)>1ᴇ-12↵
U→V↵
V−List 4[2]sin V−M→F↵
1−List 4[2]cos V→G↵
List 4[2]sin V→H↵
List 4[2]cos V→I↵
-F÷G→A↵
-F÷(G+AH÷2)→B↵
-F÷(G+AH÷2+B²I÷6)→C↵
V+C→U↵
WhileEnd↵
List 4[1](cos U−List 4[2])→List 2[1]↵
List 4[1]√(1−List 4[2]²)sin U→List 2[2]↵
√(List 2[1]²+List 2[2]²)→R¸
List 2[1]cos List 4[5]−List 2[2]sin List 4[5]→List 5[1]↵
List 2[1]sin List 4[5]+List 2[2]cos List 4[5]→List 5[2]↵
List 5[1]→List 2[1]↵
List 5[2]cos List 4[3]→List 2[2]↵
List 5[2]sin List 4[3]→List 2[3]↵
List 2[1]cos List 4[4]−List 2[2]sin List 4[4]→List 5[1]↵
List 2[1]sin List 4[4]+List 2[2]cos List 4[4]→List 5[2]↵
List 2[3]→List 5[3]↵
List 3[1]−List 5[1]→List 6[1]↵
List 3[2]−List 5[2]→List 6[2]↵
List 3[3]−List 5[3]→List 6[3]↵
(T−2451545)÷36525→W
84381.448−46.84024W−5.9ᴇ-4W²+1.813ᴇ-3W^3→θ↵
πθ÷648000→θ↵
List 6[1]→X↵
List 6[2]cos θ−List 6[3]sin θ→Y↵
List 6[2]sin θ+List 6[3]cos θ→Z↵
√(X²+Y²+Z²)→R↵
tan⁻¹ (Y÷X)→A↵
If X<0:Then A+π→A:IfEnd↵
If X>0 And Y<0:Then A+2π→A:IfEnd↵
(12÷π)A→A↵
(180÷π)sin⁻¹ (Z÷R)→D↵
R¸
θ¸
A¸
D¸
Locate 1,1,"t(JD)"↵
Locate 1,2,"r(AU)"↵
Locate 1,3,"R(AU)"↵
Locate 1,4,"ε(rad)"↵
Locate 1,5,"a(h)"↵
Locate 1,6,"δ(°)"↵
1 post
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 5 guests