Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

readeph0.c

Go to the documentation of this file.
00001 /*
00002    readeph0.c: Dummy version of 'readeph.c' for use with NOVAS-C
00003                Version 2.0
00004 
00005    U. S. Naval Observatory
00006    Astronomical Applications Dept.
00007    3450 Massachusetts Ave., NW
00008    Washington, DC  20392-5420
00009 
00010    The real version of 'readeph' provides a heliocentric state vector 
00011    (position and velocity) of a minor planet at a specified date.  
00012    This dummy version is for use with NOVAS-C when positions of the 
00013    minor planets are not of interest.
00014 */
00015 
00016 #include <stdlib.h>
00017 
00018 /*
00019    Function prototype.
00020 */
00021 
00022 double *readeph (int mp, char* name, double jd, int *error );
00023 
00024 
00025 /********readeph */
00026 /* comment out unused parameter names S. Kasahara 5/6/03 */
00027 double *readeph (int mp, char* name, double jd, int *error )
00028 /*
00029 ------------------------------------------------------------------------
00030 
00031    PURPOSE:
00032       This is a dummy version of function 'readeph'.  It serves as a 
00033       stub for the "real" 'readeph' (part of the USNO/AE98 minor 
00034       planet ephemerides) when NOVAS-C is used without the 
00035       minor planet ephemerides.
00036 
00037    REFERENCES:
00038       None.
00039 
00040    INPUT
00041    ARGUMENTS:
00042       mp (int)
00043          The number of the asteroid for which the position in desired.
00044       name (char*)
00045          The name of the asteroid.
00046       jd (double)
00047          The Julian date on which to find the position and velocity.
00048     
00049    OUTPUT
00050    ARGUEMENTS:
00051       *error (int)
00052          Error code; set equal to 9 (see note below).
00053 
00054    RETURNED
00055    VALUE:
00056       (double *)
00057          Pointer to the 6-element 'pv' array, with all elements set to
00058          zero.
00059 
00060    GLOBALS
00061    USED:
00062       None.
00063 
00064    FUNCTIONS
00065    CALLED:
00066       malloc      stdlib.c
00067 
00068    VER./DATE/
00069    PROGRAMMER:
00070       V1.0/06-97/JAB (USNO/AA)
00071       V1.1/08-98/JAB (USNO/AA): Support new 'readeph' argument list.
00072       V1.2/10-99/JAB (USNO/AA): Return a pointer to a double, rather 
00073                                 than an array of doubles.  Add error 
00074                                 9 on return.  Basic code courtesy JLH.
00075 
00076    NOTES:
00077       1.  This dummy function is not intended to be called.  It merely 
00078       serves as a stub for the "real" 'readeph' when NOVAS-C is used 
00079       without the minor planet ephemerides.  If this function is 
00080       called, an error of 9 will be returned.
00081 
00082 ------------------------------------------------------------------------
00083 */
00084 {
00085    int i;
00086 
00087   /* Add code to quite compiler warnings about unused variables. S.K. 5/6/03 */
00088    int tmpint;
00089    char* tmpchar;
00090    double tmpdouble;
00091    double *pv;
00092 
00093    tmpint = mp;
00094    tmpchar = name;
00095    tmpdouble = jd;
00096 
00097 
00098    pv = (double *) malloc (6L * sizeof (double));
00099 
00100    for (i = 0; i < 6; i++)
00101       pv[i] = 0.0;
00102 
00103    *error = 9;
00104 
00105    return pv;
00106 }

Generated on Mon Feb 15 11:07:29 2010 for loon by  doxygen 1.3.9.1