~ubuntu-branches/ubuntu/lucid/wmmoonclock/lucid

« back to all changes in this revision

Viewing changes to Src/Moon.c

  • Committer: Bazaar Package Importer
  • Author(s): Denis Briand
  • Date: 2009-07-26 10:30:00 UTC
  • Revision ID: james.westby@ubuntu.com-20090726103000-2y5ws6okikxakvfp
Tags: 1.27-28
* Add southern hemisphere support (Closes: #537480).
  Thanks to Alvaro Steiger.
* Bump standards version to 3.8.2.0
* Add quilt patch system.
* Add patches:
  + 01_all_previous_diff.diff
  + 02_update_time.diff
  + 03_add_southern_hemisphere_support.diff
  + 04_fix_hyphen_used_as_minus_sign.diff
* Add debhelper 7 build depends.
* Add debian/compat file.
* Remove trailing whitespaces in changelog.upstream.
* Add an empty watch file (no upstream repository).
* Improve rules file by using more debhelper commands.
* Remove Martin A. Godisch from uploaders field
  Thanks to him to have sponsored wmmoonclock.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 
9
9
double angle360();
10
10
 
11
 
void addthe(double, double, double, double, double*, double*);
12
 
void addsol(double, double, double, double, int, int, int, int);
13
 
void addn(double, int, int, int, int);
14
 
void term(int, int, int, int, double*, double*);
15
11
 
16
12
double  TwoPi = 6.283185308;
17
13
double  ARC = 206264.81;
29
25
double  S1, S2, S3, S4, S5, S6, S7;
30
26
double  DL0, DL, DD, DGAM, DLS, DF;
31
27
double  L0, L, LS, F, D;
32
 
double  ARG = 0.0, FAC = 0.0;
33
 
int     MAX = 0, i, j;
 
28
double  ARG, FAC;
 
29
int     MAX, i, j;
34
30
double  S; 
35
31
 
36
32
 
278
274
 
279
275
 
280
276
 
281
 
void addsol(double COEFFL, double COEFFS, double COEFFG, double COEFFP, int P, int Q, int R, int S){
 
277
addsol(double COEFFL, double COEFFS, double COEFFG, double COEFFP, int P, int Q, int R, int S){
282
278
 
283
279
    double      X, Y;
284
280
 
293
289
 
294
290
 
295
291
 
296
 
void term(int P, int Q, int R, int S, double *X, double *Y){
 
292
term(int P, int Q, int R, int S, double *X, double *Y){
297
293
 
298
294
    double      XX, YY;
299
295
    int         k, I[5];
311
307
 
312
308
 
313
309
 
314
 
void addthe(double C1, double S1, double C2, double S2, double *C, double *S){
 
310
addthe(double C1, double S1, double C2, double S2, double *C, double *S){
315
311
 
316
312
    *C = C1*C2 - S1*S2;
317
313
    *S = S1*C2 + C1*S2;
320
316
}
321
317
 
322
318
 
323
 
void addn(double COEFFN, int P, int Q, int R, int S){
 
319
addn(double COEFFN, int P, int Q, int R, int S){
324
320
 
325
321
    double      X, Y;
326
322
 
385
381
 *            DEC: declination (in deg; equinox of date)    
386
382
 *
387
383
 */
388
 
void MiniMoon(double T, double *RA, double *DEC){
 
384
MiniMoon(double T, double *RA, double *DEC){
389
385
 
390
386
    double      L0,L,LS,F,D,H,S,N,DL,CB,L_MOON,B_MOON,V,W,X,Y,Z,RHO;
391
387
    double      frac(), cosEPS, sinEPS, P2, ARC;
428
424
    *RA   =  ( 48.0/P2)*atan2(Y, X+RHO); 
429
425
    if (*RA<0.0) *RA += 24.0;
430
426
 
 
427
    return(0);
431
428
 
432
429
 
433
430
}