FACT++  1.0
void eraLdn ( int  n,
eraLDBODY  b[],
double  ob[3],
double  sc[3],
double  sn[3] 
)

Definition at line 3 of file ldn.c.

References eraCp(), eraLd(), eraPdp(), eraPmp(), eraPn(), eraPpsp(), ERFA_AULT, ERFA_DAYSEC, ERFA_GMIN, and i.

Referenced by eraAtciqn(), eraAticqn(), and t_ldn().

84 {
85 /* Light time for 1 AU (days) */
86  const double CR = ERFA_AULT/ERFA_DAYSEC;
87 
88  int i;
89  double v[3], dt, ev[3], em, e[3];
90 
91 /* Star direction prior to deflection. */
92  eraCp(sc, sn);
93 
94 /* Body by body. */
95  for ( i = 0; i < n; i++ ) {
96 
97  /* Body to observer vector at epoch of observation (au). */
98  eraPmp ( ob, b[i].pv[0], v );
99 
100  /* Minus the time since the light passed the body (days). */
101  dt = eraPdp(sn,v) * CR;
102 
103  /* Neutralize if the star is "behind" the observer. */
104  dt = ERFA_GMIN(dt, 0.0);
105 
106  /* Backtrack the body to the time the light was passing the body. */
107  eraPpsp(v, -dt, b[i].pv[1], ev);
108 
109  /* Body to observer vector as magnitude and direction. */
110  eraPn(ev, &em, e);
111 
112  /* Apply light deflection for this body. */
113  eraLd ( b[i].bm, sn, sn, e, em, b[i].dl, sn );
114 
115  /* Next body. */
116  }
117 
118 /* Finished. */
119 
120 }
double eraPdp(double a[3], double b[3])
Definition: pdp.c:3
#define ERFA_AULT
Definition: erfam.h:108
void eraLd(double bm, double p[3], double q[3], double e[3], double em, double dlim, double p1[3])
Definition: ld.c:3
int i
Definition: db_dim_client.c:21
#define ERFA_DAYSEC
Definition: erfam.h:75
void eraPmp(double a[3], double b[3], double amb[3])
Definition: pmp.c:3
void eraPn(double p[3], double *r, double u[3])
Definition: pn.c:3
#define ERFA_GMIN(A, B)
Definition: erfam.h:137
void eraPpsp(double a[3], double s, double b[3], double apsb[3])
Definition: ppsp.c:3
void eraCp(double p[3], double c[3])
Definition: cp.c:3

+ Here is the call graph for this function:

+ Here is the caller graph for this function: