Table of Contents

Name

read_orbit, write_orbit, allocate_orbit, list_orbit - basic orbit i/o routines

Synopsis


#include <stdinc.h>#include <potential.h>#include <orbit.h>allocate_orbit(optr,ndim,nsteps)orbitptr
*optr;int ndim;int nsteps;
write_orbit(outstr,optr)stream outstr;orbitptr
optr;
read_orbit(instr,optr)stream instr;orbitptr *optr;
list_orbit(optr,tstart,tend,n)orbitptr
optr;double tstart;double tend;int n;

Description

orbit(3NEMO) provide a few utility functions which handle the i/o of orbit(5NEMO) datafile. They subsequently call lower level filestructure routines, as described in filestruct(3NEMO) .

write_orbit writes an orbit to an output stream, using standard binary filestructure.

read_orbit reads an orbit from an input stream into a pointer to an orbit. If that pointer is NULL, i.e. has not been initialized, this routine will take care of the allocation too.

allocate_orbit allocates an orbit. Note that optr is a pointer to an orbit, on entry normally initialized to NULL to signal that a new orbit must be allocated. If optr was already assigned a value (previous allocation), allocate_orbit checks if this one contains enough space. If not, new space is claimed and old space may be freed. Normally application programs do not need to call this routine, since read_orbit takes care of the allocation.

list_orbit lists the coordinates of an orbit between two given times.

See Also

orbit(5NEMO)

Bugs

No proper dynamic allocation of orbits yet; space has to be allocated before it’s used in the orbit calculation.

Author

Peter Teuben

Files


~/src/pjt/orbit      authors original sources

Update History


13-Jul-87    V1.0: Original created    PJT
28-jul-87    V2.0: new orbit(5) structure    PJT
24-may-92    V3.0: added potential to orbit    PJT


Table of Contents