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

sun.h

Go to the documentation of this file.
00001 /**********************************************************************
00002 ** Copyright (C) 2000 Trolltech AS.  All rights reserved.
00003 **
00004 ** This file is part of Qtopia Environment.
00005 **
00006 ** This file may be distributed and/or modified under the terms of the
00007 ** GNU General Public License version 2 as published by the Free Software
00008 ** Foundation and appearing in the file LICENSE.GPL included in the
00009 ** packaging of this file.
00010 **
00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00013 **
00014 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00015 **
00016 ** Contact info@trolltech.com if any conditions of this licensing are
00017 ** not clear to you.
00018 **
00019 **********************************************************************/
00020 /*
00021  * Sun clock definitions.
00022  */
00023 
00024 #include <stdio.h>
00025 #include <stdlib.h>
00026 #include <math.h>
00027 #include <time.h>
00028 
00029 #ifndef PI
00030 #define PI 3.14159265358979323846
00031 #endif
00032 
00033 #ifndef E
00034 #define E 2.7182818284590452354
00035 #endif
00036 
00037 #define abs(x) ((x) < 0 ? (-(x)) : x)                     /* Absolute value */
00038 #define sgn(x) (((x) < 0) ? -1 : ((x) > 0 ? 1 : 0))       /* Extract sign */
00039 #define dtr(x) ((x) * (PI / 180.0))                       /* Degree->Radian */
00040 #define rtd(x) ((x) / (PI / 180.0))                       /* Radian->Degree */
00041 #define fixangle(a) ((a) - 360.0 * (qFloor((a) / 360.0)))  /* Fix angle   */
00042 
00043 #define TERMINC  100               /* Circle segments for terminator */
00044 
00045 #define PROJINT  (60 * 10)         /* Frequency of seasonal recalculation */
00046 
00047 
00048 #ifdef __cplusplus
00049 extern "C" {
00050 #endif
00051 double jtime(struct tm *t);
00052 double kepler(double m, double ecc);
00053 void sunpos(double jd, int apparent, double *ra, double *dec, double *rv, double *slong);
00054 void projillum(short *wtab, int xdots, int ydots, double dec);
00055 #ifdef __cplusplus
00056 };
00057 #endif

Generated on Sat Nov 5 16:15:57 2005 for OPIE by  doxygen 1.4.2