HP Forums
I rediscovered a comet using the HP Prime - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: I rediscovered a comet using the HP Prime (/thread-4824.html)



I rediscovered a comet using the HP Prime - StephenG1CMZ - 09-28-2015 02:43 PM

In order to investigate how practical it would be to process astronomical data on the HP Prime, I wrote a small prototype program to list the comets from a readable list obtained from the Minor Planets Centre.

Whilst checking this program, it became apparent that comet 138P was missing from the data.
Here is the relevant fragment of the file downloaded last week.
Code:
Number Name                                      Prov. Desig.

 327P  Van Ness                                  P/2002 Q1
 326P  Hill                                      P/2007 V2

 139P  Vaisala-Oterma                            P/1939 TN
 137P  Shoemaker-Levy                            P/1990 UL3

   1P  Halley                                    P/1682 Q1
They are in numerical order and there was no 138.

Checking Wikipedia and other sources suggested this was 138P Shoemaker Levy.

Comets can disappear but they would then normally be listed 138D, 138X etc., not just deleted.

So I emailed the centre, and now the latest file is showing the comet - confirming that it is still a periodic comet.

So as far as I am concerned, I rediscovered a missing comet using this little program on the HP Prime - and if the Prime were not such fun to use, that comet might still be missing.
Code:

 EXPORT COML:=Notes("MPC");
 LOCAL LF:=CHAR(10);
 LOCAL CNTD:=0;
 LOCAL CNTP:=0;

 RDALL()
 BEGIN
  LOCAL CN,DN,PS,LIN,LFPS,CTYP,YP,YRS; 
  //LOCAL CNTP:=0;
  //LOCAL CNTD:=0;

  FOR CN FROM 327  DOWNTO 1 DO
    IF CN<0 THEN
      MSGBOX(CN);
    END;
   PS:=INSTRING(COML," "+CN+"P ");
   IF PS==0 THEN
    PS:=INSTRING(COML," "+CN+"D ");
   END;

   IF PS==0 THEN
    L7(CN):=CN+" [DATA MISSING]";
    IF CN==138 THEN
     L7(CN):=CN+"P  Shoemaker-Levy-Lewkowicz G1CMZ";
    END;
    ELSE
     DN:=IP(LOG(CN))+1;
     LIN:=MID(COML,PS+DN+1);
     LFPS:=INSTRING(LIN,LF);
     LIN:=MID(LIN,1,LFPS);
     CTYP:=MID(LIN,1,2);
     LIN:=MID(LIN,3);
     IF CTYP=="P "  OR CTYP=="D " THEN
      CASE
       IF CTYP=="P " THEN CNTP:=CNTP+1 END;
       IF CTYP=="D " THEN CNTD:=CNTD+1 END;
       DEFAULT
      END; 
     YP:=INSTRING(LIN,"/")+1;
     YRS:=MID(LIN,YP,4);
     L7(CN):=CN+CTYP+YRS+LIN;
     //WAIT(0.001);
    END;
   END;
  END;//FOR
 END;

 COMETRY()
 BEGIN
  LOCAL TTL;
  RDALL();
  TTL:="COMETS ("+CNTP+"P:PERIODIC "+CNTD+"D:DEFUNCT)";
  
  //WHILE 1 DO
   CHOOSE(V,TTL,L7);
  //END;
 END;

 EXPORT COMETS()
 BEGIN
  COMETRY();
  WAIT;
  RETURN CNTP;
 END;

If you are still using the old data file, you will discover that this program interpolates the missing data for entry 138P. Though if you download the latest data you will see I have not been credited with the rediscovery :-(


RE: I rediscovered a comet using the HP Prime - StephenG1CMZ - 10-15-2015 05:31 PM

Just for the record, the data file with the missing comet was the one updated 2015 Sept 1.