Post Reply 
is my program too big to edit?
07-30-2015, 05:48 AM
Post: #7
RE: is my program too big to edit?
(07-30-2015 05:10 AM)cyrille de brébisson Wrote:  Hello,

Do you get the same crashes on the emulator and the calculator or only on the calc?
If the later, then it might be a memory issue...
Could you share a crashing piece of text so that I can use it to debug the code?

Cyrille

hi Cyrille,
thank you for help.
I haven't tried on emulator.
Here below the last function. Now it works, but for example, when I wrote "0,0034*sin(2*Mprime)" instead of "0.0034*sin(2*Mprime)" the Prime editor crashed or hanged, after hitting the soft key for checking errors.
Also writing a non existent variable hanged.
When the file was about 210-220 kB I could use editor without issues. So I though about file dimension, but who know it?

In the code you can comment this two function (they are working in the rest of program)

Code:

  nowdate:= makeDateList(datelist);
  yy:= nowdate(1);
  doy:= dayOfYear(datelist);

Salvo

Code:

EXPORT moonNodes(datelist)
BEGIN
  LOCAL nowdate, yy, doy, k, T, jde, jde1;
  LOCAL D, M, Mprime, omega, V, P;
  LOCAL asc, desc, ee;
  nowdate:= makeDateList(datelist);
  yy:= nowdate(1);
  doy:= dayOfYear(datelist);
  yy:= yy+doy/365.25; // "fractional year"
  k:= (yy-2000.05)*13.4223;  // perigee
  k:= IP(k); // ascending node
  T:= k/1342.23;
  ee:= 1-0.002516*T-0.0000074*T^2;  // multiply those w/ M *ee
  D:= 183.6380+331.73735682*k+0.0014852*(T^2)+0.00000209*(T^3)-0.000000010*(T^4); // elongation
  D:= simp_angle(D);
  M:= 17.4006+26.82037250*k+0.0001186*(T^2)+0.00000006*(T^3); // Sun anomaly
  M:= simp_angle(M);
  Mprime:= 38.3776+355.52747313*k+0.0123499*(T^2)+0.000014627*(T^3)-0.000000069*(T^4); // Moon anomaly
  Mprime:= simp_angle(Mprime);
  omega:= 123.9767-1.44098956*k+0.0020608*(T^2)+0.00000214*(T^3)-0.000000016*(T^4); // node
  omega:= simp_angle(omega);
  V:= 299.75+132.85*T-0.009173*(T^2);
  P:= omega+272.75-2.3*T;
  jde:= 2451565.1619+27.21222087*k+0.0002762*(T^2)+0.000000021*(T^3)-0.000000000088*(T^4)-0.4721*sin(Mprime);
  jde:= jde - 0.1649*sin(2*D)-0.0868*sin(2*D-Mprime)+0.0084*sin(2*D+Mprime)-0.0083*sin(2*D-M)*ee;
  jde:= jde - 0.0039*sin(2*D-M-Mprime)*ee+0.0034*sin(2*Mprime)-0.0031*sin(2*D-2*Mprime)+0.0030*sin(2*D+M)*ee;
  jde:= jde + 0.0028*sin(M-Mprime)*ee+0.0026*sin(M)*ee+0.0025*sin(4*D)+0.0024*sin(D)+0.0022*sin(M+Mprime)*e​e;
  jde:= jde + 0.0017*sin(omega)+0.0014*sin(4*D-Mprime)+0.0005*sin(2*D-M-Mprime)*ee+0.0004*sin(2*D-M+Mprime)*ee;
  jde:= jde - 0.0003*sin(2*D-2*M)+0.0003*sin(4*D-M)+0.0003*sin(V)+0.0003*sin(P);
  asc:= makeDateList(dateFromJD(jde));
  k:= k+0.5; // descending node
  T:= k/1342.23;
  ee:= 1-0.002516*T-0.0000074*T^2;  // multiply those w/ M *ee
  D:= 183.6380+331.73735682*k+0.0014852*(T^2)+0.00000209*(T^3)-0.000000010*(T^4); // elongation
  D:= simp_angle(D);
  M:= 17.4006+26.82037250*k+0.0001186*(T^2)+0.00000006*(T^3); // Sun anomaly
  M:= simp_angle(M);
  Mprime:= 38.3776+355.52747313*k+0.0123499*(T^2)+0.000014627*(T^3)-0.000000069*(T^4); // Moon anomaly
  Mprime:= simp_angle(Mprime);
  omega:= 123.9767-1.44098956*k+0.0020608*(T^2)+0.00000214*(T^3)-0.000000016*(T^4); // node
  omega:= simp_angle(omega);
  V:= 299.75+132.85*T-0.009173*(T^2);
  P:= omega+272.75-2.3*T;
  jde1:= 2451565.1619+27.21222087*k+0.0002762*(T^2)+0.000000021*(T^3)-0.000000000088*(T^4)-0.4721*sin(Mprime);
  jde1:= jde1 - 0.1649*sin(2*D)-0.0868*sin(2*D-Mprime)+0.0084*sin(2*D+Mprime)-0.0083*sin(2*D-M)*ee;
  jde1:= jde1 - 0.0039*sin(2*D-M-Mprime)*ee+0.0034*sin(2*Mprime)-0.0031*sin(2*D-2*Mprime)+0.0030*sin(2*D+M)*ee;
  jde1:= jde1 + 0.0028*sin(M-Mprime)*ee+0.0026*sin(M)*ee+0.0025*sin(4*D)+0.0024*sin(D)+0.0022*sin(M+Mprime)*e​e;
  jde1:= jde1 + 0.0017*sin(omega)+0.0014*sin(4*D-Mprime)+0.0005*sin(2*D-M-Mprime)*ee+0.0004*sin(2*D-M+Mprime)*ee;
  jde1:= jde1 - 0.0003*sin(2*D-2*M)+0.0003*sin(4*D-M)+0.0003*sin(V)+0.0003*sin(P);
  desc:= makeDateList(dateFromJD(jde1)); 
  RETURN({asc, desc});
END;

∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
is my program too big to edit? - salvomic - 07-29-2015, 09:56 AM
RE: is my program too big to edit? - DrD - 07-29-2015, 10:43 AM
RE: is my program too big to edit? - salvomic - 07-30-2015 05:48 AM
RE: is my program too big to edit? - eried - 09-08-2015, 06:34 PM
RE: is my program too big to edit? - eried - 09-09-2015, 10:39 AM



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