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

jpleph.cpp File Reference

#include <fstream>
#include <iomanip>
#include <cstdio>
#include <cassert>
#include <celutil/bytes.h>
#include <celutil/basictypes.h>
#include "jpleph.h"

Include dependency graph for jpleph.cpp:

Go to the source code of this file.

Functions

static double readDouble (istream &in)
static int32 readUint (istream &in)

Variables

static const unsigned int ConstantNameLength = 6
static const unsigned int DE200RecordSize = 826
static const unsigned int DE405RecordSize = 1018
static const unsigned int DE406RecordSize = 728
static const int LabelSize = 84
static const unsigned int MaxChebyshevCoeffs = 32
static const unsigned int NConstants = 400


Function Documentation

static double readDouble istream &  in  )  [static]
 

Definition at line 48 of file jpleph.cpp.

Referenced by JPLEphemeris::load().

00049 {
00050     unsigned char buf[8];
00051     char c;
00052     
00053     in.read((char*)buf, 8);
00054     c = buf[0]; buf[0] = buf[7]; buf[7] = c;
00055     c = buf[1]; buf[1] = buf[6]; buf[6] = c;
00056     c = buf[2]; buf[2] = buf[5]; buf[5] = c;
00057     c = buf[3]; buf[3] = buf[4]; buf[4] = c;
00058         
00059     return *((double*) buf);
00060 }

static int32 readUint istream &  in  )  [static]
 

Definition at line 36 of file jpleph.cpp.

References BE_TO_CPU_INT32.

Referenced by DumpOldStarDatabase(), DumpStarDatabase(), JPLEphemeris::load(), BinaryModelLoader::loadMesh(), BinaryModelLoader::loadVertices(), and readFloat().

00037 {
00038     int32 ret;
00039     in.read((char*) &ret, sizeof(int32));
00040     BE_TO_CPU_INT32(ret, ret);
00041     return (uint32) ret;
00042 }


Variable Documentation

const unsigned int ConstantNameLength = 6 [static]
 

Definition at line 28 of file jpleph.cpp.

Referenced by JPLEphemeris::load().

const unsigned int DE200RecordSize = 826 [static]
 

Definition at line 23 of file jpleph.cpp.

Referenced by JPLEphemeris::load().

const unsigned int DE405RecordSize = 1018 [static]
 

Definition at line 24 of file jpleph.cpp.

Referenced by JPLEphemeris::load().

const unsigned int DE406RecordSize = 728 [static]
 

Definition at line 25 of file jpleph.cpp.

Referenced by JPLEphemeris::load().

const int LabelSize = 84 [static]
 

Definition at line 32 of file jpleph.cpp.

Referenced by JPLEphemeris::load().

const unsigned int MaxChebyshevCoeffs = 32 [static]
 

Definition at line 30 of file jpleph.cpp.

Referenced by JPLEphemeris::getPlanetPosition().

const unsigned int NConstants = 400 [static]
 

Definition at line 27 of file jpleph.cpp.

Referenced by JPLEphemeris::load().


Generated on Sat Jan 14 22:30:54 2006 for Celestia by  doxygen 1.4.1