Main Page | Class List | Directories | File List | Class Members | File Members

sid.h

Go to the documentation of this file.
00001 
00015  /*
00016  * Copyright (C) 2001-2003 Klaus Reif (reif@astro.uni-bonn.de)
00017  *
00018  *      This program is free software; you can redistribute it and/or
00019  *      modify it under the terms of the GNU General Public License as
00020  *      published by the Free Software Foundation, version 2.
00021  *
00022  */
00023 
00024 
00025 /****************************************************************************/
00026 /*                            sid. H                             */
00027 /****************************************************************************/
00028 /* should be loaded only once */
00029 #if !defined(SID_H)
00030 #define         SID_H   1
00031 
00032 typedef unsigned char BYTE;                     /* custom byte BYTE type*/
00033 typedef BYTE BOOL;                                 /* custom BOOLEAN type */
00034 
00035 #define PI     3.14159265          /* M_PI */
00036 
00037 typedef struct uzeit {
00038                      BYTE  std,                                  /* hours */
00039                            min,                                  /* minutes */
00040                            sec;                                 /* seconds */
00041                      float fract;                     /* fractions of a second */
00042                      float rad;                    /* time in radians */
00043                      } UHRZEIT;
00044 
00045 typedef struct datm {
00046                     BYTE tag,                          /* day */
00047                          monat;                        /* month*/
00048                     int  jahr;                          /* year*/
00049                     } DATUM;
00050 
00051 typedef double WINKEL;/* angle in radians 0<=...<2*PI  */
00052 
00053 /*SIDSIDSIDSID Winkelkonversionen */
00054 
00055 #define WTOF(w) (FULLTURN) ( ( w ) * 8388608.0 / PI ) /* WINKEL to FULLTURN */
00056 #define FTOW(f) (WINKEL)   ( ( f ) / 8388608.0 * PI ) /* FULLTURN to WINKEL */
00057 #define N_BYTE(l,n) (BYTE) ( 0x000000FF & ( ( l ) >> ( 8 * ( n ) ) ) )
00058                                                         /* n-tes Byte von l */
00059 #define WTOR(w) (WINKEL)   ( ( w ) * PI / 180.0 )   /* von Grad nach Radian */
00060 #define RTOW(r) (WINKEL)   ( ( r ) * 180.0 / PI )   /* von Radian nach Grad */
00061 
00062 /*SIDSIDSIDSID Funktionsdeklarationen */
00063 
00064 void UhrNachAscii( UHRZEIT *z, char *c );
00065 void DatumNachAscii( DATUM *d, char *c );
00066 double rednew21( double alpha );
00067 void sitnew( DATUM *dat, UHRZEIT *zeit, UHRZEIT *sid );
00068 double djl( int IY, BYTE IM, BYTE ID );
00069 void mjdnew( double dj, UHRZEIT *sid );
00070 char* MjdNachAscii( double mjd);
00071 #endif

Generated on Fri Dec 16 22:23:35 2005 for gboccia by  doxygen 1.4.2