HTML automatically generated with rman
Table of Contents

Name

orbit - binary format for stellar orbits

Synopsis


#include <stdinc.h>
#include <filestruct.h>
#include <potential.h>
#include <orbit.h>

Description

orbit(5NEMO) is a filestructure which utilizes the general binary structured fileformat as described in filestruct(3NEMO) . It is accompanied by a package of functions that make the calculation, display and analysis of 2- and 3D stellar orbits a simpler task.

Format


#define ORBIT_PHI
typedef struct {
    int   ndim;
    int   coordsys;
    real  mass;
    int   key;
    real  *iom;    
    real  *iom_err;
    int   maxsteps;
    int   nsteps;
    real  *time;
    real  *phase;
#ifdef ORBIT_PHI
    realptr _phi;
    realptr _acc;
#endif  
    a_potential pot;
} orbit, *orbitptr;

General access macro’s are available by including orbit.h.

#define Ndim(optr)      ((optr)->ndim)
#define CoordSys(optr)  ((optr)->coordsys)
#define Size(optr)      ((optr)->size)
#define Masso(optr)     ((optr)->mass)
#define Key(optr)       ((optr)->key)
#define IOM(optr)       ((optr)->iom)
#define IOMERR(optr)    ((optr)->iom_err)
#define Nsteps(optr)    ((optr)->nsteps)
#define MAXsteps(optr)  ((optr)->maxsteps)
#define TimePath(optr)  ((optr)->time)
#define PhasePath(optr) ((optr)->phase)
#define Potential(optr) ((optr)->pot)
#define I1(optr)        (*(IOM(optr)))
#define I2(optr)        (*(IOM(optr)+1))
#define I3(optr)        (*(IOM(optr)+2))
#define IE1(optr)        (*(IOMERR(optr)))
#define IE2(optr)        (*(IOMERR(optr)+1))
#define IE3(optr)        (*(IOMERR(optr)+2))
#define Torb(optr,i)    (*(TimePath(optr)+(i)))
#define Posorb(o,i,j)   (*(PhasePath(o)+Ndim(o)*2*(i)+j))
#define Velorb(o,i,j)   (*(PhasePath(o)+Ndim(o)*2*(i)+Ndim(o)+j))
#define Xorb(optr,i)    (*(PhasePath(optr)+Ndim(optr)*2*(i)))
#define Yorb(optr,i)    (*(PhasePath(optr)+Ndim(optr)*2*(i)+1))
#define Zorb(optr,i)    (*(PhasePath(optr)+Ndim(optr)*2*(i)+2))
#define Uorb(optr,i)    (*(PhasePath(optr)+Ndim(optr)*2*(i)+Ndim(optr)))
#define Vorb(optr,i)    (*(PhasePath(optr)+Ndim(optr)*2*(i)+Ndim(optr)+1))
#define Worb(optr,i)    (*(PhasePath(optr)+Ndim(optr)*2*(i)+Ndim(optr)+2))
#define Porb(optr,i)    (*(PhiPath(optr)+(i)))
#define AXorb(optr,i)   (*(AccPath(optr)+Ndim(optr)*(i)))
#define AYorb(optr,i)   (*(AccPath(optr)+Ndim(optr)*(i)+1))
#define AZorb(optr,i)   (*(AccPath(optr)+Ndim(optr)*(i)+2))
#define PotName(optr)   (Potential(optr).name)
#define PotPars(optr)   (Potential(optr).pars)
#define PotFile(optr)   (Potential(optr).file)

See Also

orbit(3NEMO) , filestruct(3NEMO) , potential(5NEMO)

Author

Peter Teuben

Files


src/orbit/io    orbit.c

Update History


13-Jul-87    V1.0: Original created    PJT
16-jul-87    V1.1: small mod      PJT
27-jul-87    V1.2: naming changed    PJT
24-may-92    V2.0: added potential    PJT
6-dec-93    V3.x: added maxsteps for re-allocation    PJT
1-mar-03    V3.3: added iom_error    PJT
24-jul-13    V4.0: added key        PJT
6-oct-21    V5.1: split Pos/Vel; support for PHI/ACC    PJT


Table of Contents