Merge branch 'develop' of openspace.itn.liu.se:/openspace into develop

This commit is contained in:
Jonas Strandstedt
2014-12-15 17:11:58 +01:00
2828 changed files with 1 additions and 1324118 deletions
+1 -1
View File
@@ -26,7 +26,7 @@
#########################################################################################
# General Settings
#########################################################################################
cmake_minimum_required (VERSION 2.8)
project (OpenSpace)
-36
View File
@@ -1,36 +0,0 @@
cmake_minimum_required (VERSION 2.8)
project (Spice)
if (NOT SPICE_ROOT_DIR)
set(SPICE_ROOT_DIR ${PROJECT_SOURCE_DIR})
endif ()
file(GLOB cspice_SRC
"src/cspice/*.c"
)
file(GLOB csupport_SRC
"src/csupport/*.c"
)
include_directories ("${SPICE_ROOT_DIR}/include")
if(NOT UNIX)
add_definitions( -DKR_headers )
endif(NOT UNIX)
if(MSVC)
add_definitions( -DMSDOS )
elseif(APPLE)
add_definitions( -Wno-return-type )
endif(MSVC)
add_definitions( -w )
#add_library( Spice ${cspice_SRC} ${csupport_SRC} )
add_library( Spice STATIC ${cspice_SRC} )
#SET_TARGET_PROPERTIES(cspice PROPERTIES LINKER_LANGUAGE C)
#SET_TARGET_PROPERTIES(csupport PROPERTIES LINKER_LANGUAGE C)
-155
View File
@@ -1,155 +0,0 @@
/*
-Header_File SpiceCK.h ( CSPICE CK definitions )
-Abstract
Perform CSPICE definitions to support CK wrapper interfaces.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Particulars
This header defines types that may be referenced in
application code that calls CSPICE CK functions.
Typedef
=======
Name Description
---- ----------
SpiceCK05Subtype Typedef for enum indicating the
mathematical representation used
in an CK type 05 segment. Possible
values and meanings are:
C05TP0:
Hermite interpolation, 8-
element packets containing
q0, q1, q2, q3,
dq0/dt, dq1/dt, dq2/dt dq3/dt
where q0, q1, q2, q3 represent
quaternion components and dq0/dt,
dq1/dt, dq2/dt, dq3/dt represent
quaternion time derivative components.
Quaternions are unitless. Quaternion
time derivatives have units of
1/second.
C05TP1:
Lagrange interpolation, 4-
element packets containing
q0, q1, q2, q3,
where q0, q1, q2, q3 represent
quaternion components. Quaternion
derivatives are obtained by
differentiating interpolating
polynomials.
C05TP2:
Hermite interpolation, 14-
element packets containing
q0, q1, q2, q3,
dq0/dt, dq1/dt, dq2/dt dq3/dt,
av0, av1, av2,
dav0/dt, dav1/dt, dav2/dt
where q0, q1, q2, q3 represent
quaternion components and dq0/dt,
dq1/dt, dq2/dt, dq3/dt represent
quaternion time derivative components,
av0, av1, av2 represent angular
velocity components, and
dav0/dt, dav1/dt, dav2/dt represent
angular acceleration components.
C05TP3:
Lagrange interpolation, 7-
element packets containing
q0, q1, q2, q3,
av0, av1, av2
where q0, q1, q2, q3 represent
quaternion components and
av0, av1, av2 represent angular
velocity components.
Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
-Restrictions
None.
-Version
-CSPICE Version 1.0.0, 20-AUG-2002 (NJB)
*/
#ifndef HAVE_SPICE_CK_H
#define HAVE_SPICE_CK_H
/*
CK type 05 subtype codes:
*/
enum _SpiceCK05Subtype { C05TP0, C05TP1, C05TP2, C05TP3 };
typedef enum _SpiceCK05Subtype SpiceCK05Subtype;
#endif
-441
View File
@@ -1,441 +0,0 @@
/*
-Header_File SpiceCel.h ( CSPICE Cell definitions )
-Abstract
Perform CSPICE definitions for the SpiceCell data type.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
CELLS
-Particulars
This header defines structures, macros, and enumerated types that
may be referenced in application code that calls CSPICE cell
functions.
CSPICE cells are data structures that implement functionality
parallel to that of the cell abstract data type in SPICELIB. In
CSPICE, a cell is a C structure containing bookkeeping information,
including a pointer to an associated data array.
For numeric data types, the data array is simply a SPICELIB-style
cell, including a valid control area. For character cells, the data
array has the same number of elements as the corresponding
SPICELIB-style cell, but the contents of the control area are not
maintained, and the data elements are null-terminated C-style
strings.
CSPICE cells should be declared using the declaration macros
provided in this header file. See the table of macros below.
Structures
==========
Name Description
---- ----------
SpiceCell Structure containing CSPICE cell metadata.
The members are:
dtype: Data type of cell: character,
integer, or double precision.
dtype has type
SpiceCellDataType.
length: For character cells, the
declared length of the
cell's string array.
size: The maximum number of data
items that can be stored in
the cell's data array.
card: The cell's "cardinality": the
number of data items currently
present in the cell.
isSet: Boolean flag indicating whether
the cell is a CSPICE set.
Sets have no duplicate data
items, and their data items are
stored in increasing order.
adjust: Boolean flag indicating whether
the cell's data area has
adjustable size. Adjustable
size cell data areas are not
currently implemented.
init: Boolean flag indicating whether
the cell has been initialized.
base: is a void pointer to the
associated data array. base
points to the start of the
control area of this array.
data: is a void pointer to the
first data slot in the
associated data array. This
slot is the element following
the control area.
ConstSpiceCell A const SpiceCell.
Declaration Macros
==================
Name Description
---- ----------
SPICECHAR_CELL ( name, size, length ) Declare a
character CSPICE
cell having cell
name name,
maximum cell
cardinality size,
and string length
length. The
macro declares
both the cell and
the associated
data array. The
name of the data
array begins with
"SPICE_".
SPICEDOUBLE_CELL ( name, size ) Like SPICECHAR_CELL,
but declares a
double precision
cell.
SPICEINT_CELL ( name, size ) Like
SPICECHAR_CELL,
but declares an
integer cell.
Assignment Macros
=================
Name Description
---- ----------
SPICE_CELL_SET_C( item, i, cell ) Assign the ith
element of a
character cell.
Arguments cell
and item are
pointers.
SPICE_CELL_SET_D( item, i, cell ) Assign the ith
element of a
double precision
cell. Argument
cell is a
pointer.
SPICE_CELL_SET_I( item, i, cell ) Assign the ith
element of an
integer cell.
Argument cell is
a pointer.
Fetch Macros
==============
Name Description
---- ----------
SPICE_CELL_GET_C( cell, i, lenout, item ) Fetch the ith
element from a
character cell.
Arguments cell
and item are
pointers.
Argument lenout
is the available
space in item.
SPICE_CELL_GET_D( cell, i, item ) Fetch the ith
element from a
double precision
cell. Arguments
cell and item are
pointers.
SPICE_CELL_GET_I( cell, i, item ) Fetch the ith
element from an
integer cell.
Arguments cell
and item are
pointers.
Element Pointer Macros
======================
Name Description
---- ----------
SPICE_CELL_ELEM_C( cell, i ) Macro evaluates
to a SpiceChar
pointer to the
ith data element
of a character
cell. Argument
cell is a
pointer.
SPICE_CELL_ELEM_D( cell, i ) Macro evaluates
to a SpiceDouble
pointer to the
ith data element
of a double
precision cell.
Argument cell is
a pointer.
SPICE_CELL_ELEM_I( cell, i ) Macro evaluates
to a SpiceInt
pointer to the
ith data element
of an integer
cell. Argument
cell is a
pointer.
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
-Restrictions
None.
-Version
-CSPICE Version 1.0.0, 22-AUG-2002 (NJB)
*/
#ifndef HAVE_SPICE_CELLS_H
#define HAVE_SPICE_CELLS_H
/*
Data type codes:
*/
typedef enum _SpiceDataType SpiceCellDataType;
/*
Cell structure:
*/
struct _SpiceCell
{ SpiceCellDataType dtype;
SpiceInt length;
SpiceInt size;
SpiceInt card;
SpiceBoolean isSet;
SpiceBoolean adjust;
SpiceBoolean init;
void * base;
void * data; };
typedef struct _SpiceCell SpiceCell;
typedef const SpiceCell ConstSpiceCell;
/*
SpiceCell control area size:
*/
#define SPICE_CELL_CTRLSZ 6
/*
Declaration macros:
*/
#define SPICECHAR_CELL( name, size, length ) \
\
static SpiceChar SPICE_CELL_##name[SPICE_CELL_CTRLSZ + size][length]; \
\
static SpiceCell name = \
\
{ SPICE_CHR, \
length, \
size, \
0, \
SPICETRUE, \
SPICEFALSE, \
SPICEFALSE, \
(void *) &(SPICE_CELL_##name), \
(void *) &(SPICE_CELL_##name[SPICE_CELL_CTRLSZ]) }
#define SPICEDOUBLE_CELL( name, size ) \
\
static SpiceDouble SPICE_CELL_##name [SPICE_CELL_CTRLSZ + size]; \
\
static SpiceCell name = \
\
{ SPICE_DP, \
0, \
size, \
0, \
SPICETRUE, \
SPICEFALSE, \
SPICEFALSE, \
(void *) &(SPICE_CELL_##name), \
(void *) &(SPICE_CELL_##name[SPICE_CELL_CTRLSZ]) }
#define SPICEINT_CELL( name, size ) \
\
static SpiceInt SPICE_CELL_##name [SPICE_CELL_CTRLSZ + size]; \
\
static SpiceCell name = \
\
{ SPICE_INT, \
0, \
size, \
0, \
SPICETRUE, \
SPICEFALSE, \
SPICEFALSE, \
(void *) &(SPICE_CELL_##name), \
(void *) &(SPICE_CELL_##name[SPICE_CELL_CTRLSZ]) }
/*
Access macros for individual elements:
*/
/*
Data element pointer macros:
*/
#define SPICE_CELL_ELEM_C( cell, i ) \
\
( ( (SpiceChar *) (cell)->data ) + (i)*( (cell)->length ) )
#define SPICE_CELL_ELEM_D( cell, i ) \
\
( ( (SpiceDouble *) (cell)->data )[(i)] )
#define SPICE_CELL_ELEM_I( cell, i ) \
\
( ( (SpiceInt *) (cell)->data )[(i)] )
/*
"Fetch" macros:
*/
#define SPICE_CELL_GET_C( cell, i, lenout, item ) \
\
{ \
SpiceInt nBytes; \
\
nBytes = brckti_c ( (cell)->length, 0, (lenout-1) ) \
* sizeof ( SpiceChar ); \
\
memmove ( (item), SPICE_CELL_ELEM_C((cell), (i)), nBytes ); \
\
item[nBytes] = NULLCHAR; \
}
#define SPICE_CELL_GET_D( cell, i, item ) \
\
( (*item) = ( (SpiceDouble *) (cell)->data)[i] )
#define SPICE_CELL_GET_I( cell, i, item ) \
\
( (*item) = ( (SpiceInt *) (cell)->data)[i] )
/*
Assignment macros:
*/
#define SPICE_CELL_SET_C( item, i, cell ) \
\
{ \
SpiceChar * sPtr; \
SpiceInt nBytes; \
\
nBytes = brckti_c ( strlen(item), 0, (cell)->length - 1 ) \
* sizeof ( SpiceChar ); \
\
sPtr = SPICE_CELL_ELEM_C((cell), (i)); \
\
memmove ( sPtr, (item), nBytes ); \
\
sPtr[nBytes] = NULLCHAR; \
}
#define SPICE_CELL_SET_D( item, i, cell ) \
\
( ( (SpiceDouble *) (cell)->data)[i] = (item) )
#define SPICE_CELL_SET_I( item, i, cell ) \
\
( ( (SpiceInt *) (cell)->data)[i] = (item) )
/*
The enum SpiceTransDir is used to indicate language translation
direction: C to Fortran or vice versa.
*/
enum _SpiceTransDir { C2F = 0, F2C = 1 };
typedef enum _SpiceTransDir SpiceTransDir;
#endif
-448
View File
@@ -1,448 +0,0 @@
/*
-Header_File SpiceEK.h ( CSPICE EK-specific definitions )
-Abstract
Perform CSPICE EK-specific definitions, including macros and user-
defined types.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Particulars
This header defines macros, enumerated types, structures, and
typedefs that may be referenced in application code that calls CSPICE
EK functions.
Macros
======
General limits
--------------
Name Description
---- ----------
SPICE_EK_MXCLSG Maximum number of columns per segment.
SPICE_EK_TYPLEN Maximum length of a short string
indicating a data type (one of
{"CHR", "DP", "INT", "TIME"}). Such
strings are returned by some of the
Fortran SPICELIB EK routines, hence also
by their f2c'd counterparts.
Sizes of EK objects
-------------------
Name Description
---- ----------
SPICE_EK_CNAMSZ Maximum length of column name.
SPICE_EK_CSTRLN Length of string required to hold column
name.
SPICE_EK_TNAMSZ Maximum length of table name.
SPICE_EK_TSTRLN Length of string required to hold table
name.
Query-related limits
--------------------
Name Description
---- ----------
SPICE_EK_MAXQRY Maximum length of an input query. This
value is currently equivalent to
twenty-five 80-character lines.
SPICE_EK_MAXQSEL Maximum number of columns that may be
listed in the `SELECT clause' of a query.
SPICE_EK_MAXQTAB Maximum number of tables that may be
listed in the `FROM clause' of a query.
SPICE_EK_MAXQCON Maximum number of relational expressions
that may be listed in the `constraint
clause' of a query.
This limit applies to a query when it is
represented in `normalized form': that
is, the constraints have been expressed
as a disjunction of conjunctions of
relational expressions. The number of
relational expressions in a query that
has been expanded in this fashion may be
greater than the number of relations in
the query as orginally written. For
example, the expression
( ( A LT 1 ) OR ( B GT 2 ) )
AND
( ( C NE 3 ) OR ( D EQ 4 ) )
which contains 4 relational expressions,
expands to the equivalent normalized
constraint
( ( A LT 1 ) AND ( C NE 3 ) )
OR
( ( A LT 1 ) AND ( D EQ 4 ) )
OR
( ( B GT 2 ) AND ( C NE 3 ) )
OR
( ( B GT 2 ) AND ( D EQ 4 ) )
which contains eight relational
expressions.
SPICE_EK_MAXQJOIN Maximum number of tables that can be
joined.
SPICE_EK_MAXQJCON Maximum number of join constraints
allowed.
SPICE_EK_MAXQORD Maximum number of columns that may be
used in the `order-by clause' of a query.
SPICE_EK_MAXQTOK Maximum number of tokens in a query.
Tokens
are reserved words, column names,
parentheses, and values. Literal strings
and time values count as single tokens.
SPICE_EK_MAXQNUM Maximum number of numeric tokens in a
query.
SPICE_EK_MAXQCLN Maximum total length of character tokens
in a query.
SPICE_EK_MAXQSTR Maximum length of literal string values
allowed in queries.
Codes
-----
Name Description
---- ----------
SPICE_EK_VARSIZ Code used to indicate variable-size
objects. Usually this is used in a
context where a non-negative integer
indicates the size of a fixed-size object
and the presence of this code indicates a
variable-size object.
The value of this constant must match the
parameter IFALSE used in the Fortran
library SPICELIB.
Enumerated Types
================
Enumerated code values
----------------------
Name Description
---- ----------
SpiceEKDataType Codes for data types used in the EK
interface: character, double precision,
integer, and "time."
The values are:
{ SPICE_CHR = 0,
SPICE_DP = 1,
SPICE_INT = 2,
SPICE_TIME = 3 }
SpiceEKExprClass Codes for types of expressions that may
appear in the SELECT clause of EK
queries. Values and meanings are:
SPICE_EK_EXP_COL Selected item was a
column. The column
may qualified by a
table name.
SPICE_EK_EXP_FUNC Selected item was
a simple function
invocation of the
form
F ( <column> )
or else was
COUNT(*)
SPICE_EK_EXP_EXPR Selected item was a
more general
expression than
those shown above.
Numeric values are:
{ SPICE_EK_EXP_COL = 0,
SPICE_EK_EXP_FUNC = 1,
SPICE_EK_EXP_EXPR = 2 }
Structures
==========
EK API structures
-----------------
Name Description
---- ----------
SpiceEKAttDsc EK column attribute descriptor. Note
that this object is distinct from the EK
column descriptors used internally in
the EK routines; those descriptors
contain pointers as well as attribute
information.
The members are:
cclass: Column class code.
dtype: Data type code: has type
SpiceEKDataType.
strlen: String length. Applies to
SPICE_CHR type. Value is
SPICE_EK_VARSIZ for
variable-length strings.
size: Column entry size; this is
the number of array
elements in a column
entry. The value is
SPICE_EK_VARSIZ for
variable-size columns.
indexd: Index flag; value is
SPICETRUE if the column is
indexed, SPICEFALSE
otherwise.
nullok: Null flag; value is
SPICETRUE if the column
may contain null values,
SPICEFALSE otherwise.
SpiceEKSegSum EK segment summary. This structure
contains user interface level descriptive
information. The structure contains the
following members:
tabnam The name of the table to
which the segment belongs.
nrows The number of rows in the
segment.
ncols The number of columns in
the segment.
cnames An array of names of
columns in the segment.
Column names may contain
as many as SPICE_EK_CNAMSZ
characters. The array
contains room for
SPICE_EK_MXCLSG column
names.
cdescrs An array of column
attribute descriptors of
type SpiceEKAttDsc.
The array contains room
for SPICE_EK_MXCLSG
descriptors. The Ith
descriptor corresponds to
the column whose name is
the Ith element of the
array cnames.
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
-Restrictions
None.
-Version
-CSPICE Version 2.0.0 27-JUL-2002 (NJB)
Defined SpiceEKDataType using SpiceDataType. Removed declaration
of enum _SpiceEKDataType.
-CSPICE Version 1.0.0, 05-JUL-1999 (NJB)
Renamed _SpiceEKAttDsc member "class" to "cclass." The
former name is a reserved word in C++.
-CSPICE Version 1.0.0, 24-FEB-1999 (NJB)
*/
#ifndef HAVE_SPICE_EK_H
#define HAVE_SPICE_EK_H
/*
Constants
*/
/*
Sizes of EK objects:
*/
#define SPICE_EK_CNAMSZ 32
#define SPICE_EK_CSTRLN ( SPICE_EK_CNAMSZ + 1 )
#define SPICE_EK_TNAMSZ 64
#define SPICE_EK_TSTRLN ( SPICE_EK_TNAMSZ + 1 )
/*
Maximum number of columns per segment:
*/
#define SPICE_EK_MXCLSG 100
/*
Maximum length of string indicating data type:
*/
#define SPICE_EK_TYPLEN 4
/*
Query-related limits (see header for details):
*/
#define SPICE_EK_MAXQRY 2000
#define SPICE_EK_MAXQSEL 50
#define SPICE_EK_MAXQTAB 10
#define SPICE_EK_MAXQCON 1000
#define SPICE_EK_MAXQJOIN 10
#define SPICE_EK_MAXQJCON 100
#define SPICE_EK_MAXQORD 10
#define SPICE_EK_MAXQTOK 500
#define SPICE_EK_MAXQNUM 100
#define SPICE_EK_MAXQCLN SPICE_EK_MAXQRY
#define SPICE_EK_MAXQSTR 1024
/*
Code indicating "variable size":
*/
#define SPICE_EK_VARSIZ (-1)
/*
Data type codes:
*/
typedef SpiceDataType SpiceEKDataType;
/*
SELECT clause expression type codes:
*/
enum _SpiceEKExprClass{ SPICE_EK_EXP_COL = 0,
SPICE_EK_EXP_FUNC = 1,
SPICE_EK_EXP_EXPR = 2 };
typedef enum _SpiceEKExprClass SpiceEKExprClass;
/*
EK column attribute descriptor:
*/
struct _SpiceEKAttDsc
{ SpiceInt cclass;
SpiceEKDataType dtype;
SpiceInt strlen;
SpiceInt size;
SpiceBoolean indexd;
SpiceBoolean nullok; };
typedef struct _SpiceEKAttDsc SpiceEKAttDsc;
/*
EK segment summary:
*/
struct _SpiceEKSegSum
{ SpiceChar tabnam [SPICE_EK_TSTRLN];
SpiceInt nrows;
SpiceInt ncols;
SpiceChar cnames [SPICE_EK_MXCLSG][SPICE_EK_CSTRLN];
SpiceEKAttDsc cdescrs[SPICE_EK_MXCLSG]; };
typedef struct _SpiceEKSegSum SpiceEKSegSum;
#endif
-115
View File
@@ -1,115 +0,0 @@
/*
-Header_File SpiceEll.h ( CSPICE Ellipse definitions )
-Abstract
Perform CSPICE definitions for the SpiceEllipse data type.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Particulars
This header defines structures and typedefs that may be referenced in
application code that calls CSPICE Ellipse functions.
Structures
==========
Name Description
---- ----------
SpiceEllipse Structure representing an ellipse in 3-
dimensional space.
The members are:
center: Vector defining ellipse's
center.
semiMajor: Vector defining ellipse's
semi-major axis.
semiMinor: Vector defining ellipse's
semi-minor axis.
The ellipse is the set of points
{X: X = center
+ cos(theta) * semiMajor
+ sin(theta) * semiMinor,
theta in [0, 2*Pi) }
ConstSpiceEllipse A const SpiceEllipse.
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
-Restrictions
None.
-Version
-CSPICE Version 1.0.0, 04-MAR-1999 (NJB)
*/
#ifndef HAVE_SPICE_ELLIPSES
#define HAVE_SPICE_ELLIPSES
/*
Ellipse structure:
*/
struct _SpiceEllipse
{ SpiceDouble center [3];
SpiceDouble semiMajor [3];
SpiceDouble semiMinor [3]; };
typedef struct _SpiceEllipse SpiceEllipse;
typedef const SpiceEllipse ConstSpiceEllipse;
#endif
-141
View File
@@ -1,141 +0,0 @@
/*
-Header_File SpiceErr.h ( CSPICE error handling definitions )
-Abstract
Perform CSPICE definitions for error handling APIs.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Particulars
This header defines constants that may be referenced in
application code that calls CSPICE error handling functions.
CONSTANTS
==========
Name Description
---- ----------
SPICE_ERROR_LMSGLN Maximum length of a long error message,
including the null terminator.
SPICE_ERROR_SMSGLN Maximum length of a short error message,
including the null terminator.
SPICE_ERROR_XMSGLN Maximum length of a short error
explanation message, including the null
terminator.
SPICE_ERROR_MODLEN Maximum length of a module name
appearing in the traceback message,
including the null terminator.
SPICE_ERROR_MAXMOD Maximum count of module names
appearing in the traceback message.
SPICE_ERROR_TRCLEN Maximum length of a traceback message,
including the null terminator.
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
-Restrictions
None.
-Version
-CSPICE Version 1.0.0, 05-NOV-2013 (NJB)
*/
#ifndef HAVE_SPICE_ERROR_HANDLING
#define HAVE_SPICE_ERROR_HANDLING
/*
Local constants
*/
#define ARROWLEN 5
/*
Public constants
*/
/*
Long error message length, which is equal to
( 23 * 80 ) + 1
*/
#define SPICE_ERROR_LMSGLN 1841
/*
Short error message length:
*/
#define SPICE_ERROR_SMSGLN 26
/*
Short error message explanation length:
*/
#define SPICE_ERROR_XMSGLN 81
/*
Module name length for traceback entries:
*/
#define SPICE_ERROR_MODLEN 33
/*
Maximum module count for traceback string:
*/
#define SPICE_ERROR_MAXMOD 100
/*
Maximum length of traceback string returned
by qcktrc_c.
*/
#define SPICE_ERROR_TRCLEN ( ( SPICE_ERROR_MAXMOD \
* ( SPICE_ERROR_MODLEN-1 ) ) \
+ ( ARROWLEN \
* ( SPICE_ERROR_MAXMOD-1 ) ) \
+ 1 )
#endif
-193
View File
@@ -1,193 +0,0 @@
/*
-Header_File SpiceFrm.h ( CSPICE frame subsystem definitions )
-Abstract
Perform CSPICE definitions for frame subsystem APIs.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
CK
FRAMES
PCK
-Particulars
This header defines constants that may be referenced in
application code that calls CSPICE frame subsystem APIs.
CONSTANTS
==========
Frame counts
------------
The following parameter are counts of built-in frames. These
parameters correspond to those defined in the SPICELIB Fortran
INCLUDE files
ninert.inc
nninrt.inc
Name Description
---- ----------
SPICE_NFRAME_NINERT Number of built-in inertial frames.
SPICE_NFRAME_NNINRT Number of built-in non-inertial frames.
Frame classes
-------------
The following parameters identify SPICE frame classes. These
parameters correspond to those defined in the SPICELIB Fortran
INCLUDE file frmtyp.inc. See the Frames Required Reading for a
detailed discussion of frame classes.
Name Description
---- ----------
SPICE_FRMTYP_INERTL an inertial frame that is listed in the
f2c'd routine chgirf_ and that requires
no external file to compute the
transformation from or to any other
inertial frame.
SPICE_FRMTYP_PCK is a frame that is specified relative
to some built-in, inertial frame (of
class SPICE_FRMTYP_INERTL) and that has
an IAU model that may be retrieved from
the PCK system via a call to the
routine tisbod_c.
SPICE_FRMTYP_CK is a frame defined by a C-kernel.
SPICE_FRMTYP_TK is a "text kernel" frame. These frames
are offset from their associated
"relative" frames by a constant
rotation.
SPICE_FRMTYP_DYN is a "dynamic" frame. These currently
are limited to parameterized frames
where the full frame definition depends
on parameters supplied via a frame
kernel.
SPICE_FRMTYP_ALL indicates any of the above classes.
This parameter is used in APIs that
fetch information about frames of a
specified class.
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
-Restrictions
None.
-Version
-CSPICE Version 1.0.0, 23-MAY-2012 (NJB)
*/
#ifndef HAVE_SPICE_FRAME_DEFS
#define HAVE_SPICE_FRAME_DEFS
/*
Frame counts:
*/
/*
Number of built-in inertial frames. This number must be kept in
sync with that defined in the SPICELIB include file ninert.inc.
*/
#define SPICE_NFRAME_NINERT 21
/*
Number of built-in non-inertial frames. This number must be kept in
sync with that defined in the SPICELIB include file nninrt.inc.
*/
#define SPICE_NFRAME_NNINRT 105
/*
The frame class codes defined here are identical
to those used in SPICELIB.
*/
/*
Inertial, built-in frames:
*/
#define SPICE_FRMTYP_INERTL 1
/*
PCK frames:
*/
#define SPICE_FRMTYP_PCK 2
/*
CK frames:
*/
#define SPICE_FRMTYP_CK 3
/*
TK frames:
*/
#define SPICE_FRMTYP_TK 4
/*
Dynamic frames:
*/
#define SPICE_FRMTYP_DYN 5
/*
All frame classes:
*/
#define SPICE_FRMTYP_ALL ( -1 )
#endif
-341
View File
@@ -1,341 +0,0 @@
/*
-Header_File SpiceGF.h ( CSPICE GF-specific definitions )
-Abstract
Perform CSPICE GF-specific definitions.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
GF
-Keywords
GEOMETRY
SEARCH
-Exceptions
None
-Files
None
-Particulars
This header defines macros that may be referenced in application
code that calls CSPICE GF functions.
Macros
======
Workspace parameters
--------------------
CSPICE applications normally don't declare workspace arguments
and therefore don't directly reference workspace size parameters.
However, CSPICE GF APIs dealing with numeric constraints
dynamically allocate workspace memory; the amount allocated
depends on the number of intervals the workspace windows can
hold. This amount is an input argument to the GF numeric quantity
APIs.
The parameters below are used to calculate the amount of memory
required. Each workspace window contains 6 double precision
numbers in its control area and 2 double precision numbers for
each interval it can hold.
Name Description
---- ----------
SPICE_GF_NWMAX Maximum number of windows required for
a user-defined workspace array.
SPICE_GF_NWDIST Number of workspace windows used by
gfdist_c and the underlying SPICELIB
routine GFDIST.
SPICE_GF_NWILUM Number of workspace windows used by
gfilum_c and the underlying SPICELIB
routine GFILUM.
SPICE_GF_NWSEP Number of workspace windows used by
gfsep_c and the underlying SPICELIB
routine GFSEP.
SPICE_GF_NWRR Number of workspace windows used by
gfrr_c and the underlying SPICELIB
routine GFRR.
SPICE_GF_NWPA Number of workspace windows used by
gfpa_c and the underlying SPICELIB
routine GFPA.
Field of view (FOV) parameters
------------------------------
Name Description
---- ----------
SPICE_GF_MAXVRT Maximum allowed number of boundary
vectors for a polygonal FOV.
SPICE_GF_CIRFOV Parameter identifying a circular FOV.
SPICE_GF_ELLFOV Parameter identifying a elliptical FOV.
SPICE_GF_POLFOV Parameter identifying a polygonal FOV.
SPICE_GF_RECFOV Parameter identifying a rectangular FOV.
SPICE_GF_SHPLEN Parameter specifying maximum length of
a FOV shape name.
SPICE_GF_MARGIN is a small positive number used to
constrain the orientation of the
boundary vectors of polygonal FOVs. Such
FOVs must satisfy the following
constraints:
1) The boundary vectors must be
contained within a right circular
cone of angular radius less than
than (pi/2) - MARGIN radians; in
other words, there must be a vector
A such that all boundary vectors
have angular separation from A of
less than (pi/2)-MARGIN radians.
2) There must be a pair of boundary
vectors U, V such that all other
boundary vectors lie in the same
half space bounded by the plane
containing U and V. Furthermore, all
other boundary vectors must have
orthogonal projections onto a plane
normal to this plane such that the
projections have angular separation
of at least 2*MARGIN radians from
the plane spanned by U and V.
MARGIN is currently set to 1.D-12.
Occultation parameters
----------------------
SPICE_GF_ANNULR Parameter identifying an "annular
occultation." This geometric condition
is more commonly known as a "transit."
The limb of the background object must
not be blocked by the foreground object
in order for an occultation to be
"annular."
SPICE_GF_ANY Parameter identifying any type of
occultation or transit.
SPICE_GF_FULL Parameter identifying a full
occultation: the foreground body
entirely blocks the background body.
SPICE_GF_PARTL Parameter identifying an "partial
occultation." This is an occultation in
which the foreground body blocks part,
but not all, of the limb of the
background body.
Target shape parameters
-----------------------
SPICE_GF_EDSHAP Parameter indicating a target object's
shape is modeled as an ellipsoid.
SPICE_GF_PTSHAP Parameter indicating a target object's
shape is modeled as a point.
SPICE_GF_RYSHAP Parameter indicating a target object's
"shape" is modeled as a ray emanating
from an observer's location. This model
may be used in visibility computations
for targets whose direction, but not
position, relative to an observer is
known.
SPICE_GF_SPSHAP Parameter indicating a target object's
shape is modeled as a point.
Search parameters
-----------------
These parameters affect the manner in which GF searches are
performed.
SPICE_GF_ADDWIN is a parameter used in numeric quantity
searches that use an equality
constraint. This parameter is used to
expand the confinement window (the
window over which the search is
performed) by a small amount at both
ends. This expansion accommodates the
case where a geometric quantity is equal
to a reference value at a boundary point
of the original confinement window.
SPICE_GF_CNVTOL is the default convergence tolerance
used by GF routines that don't support a
user-supplied tolerance value. GF
searches for roots will terminate when a
root is bracketed by times separated by
no more than this tolerance. Units are
seconds.
Configuration parameter
-----------------------
SPICE_GFEVNT_MAXPAR Parameter indicating the maximum number of
elements needed for the 'qnames' and 'q*pars'
arrays used in gfevnt_c.
SpiceChar qcpars[SPICE_GFEVNT_MAXPAR][LNSIZE];
SpiceDouble qdpars[SPICE_GFEVNT_MAXPAR];
SpiceInt qipars[SPICE_GFEVNT_MAXPAR];
SpiceBoolean qlpars[SPICE_GFEVNT_MAXPAR];
-Examples
None
-Restrictions
None.
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
L.S. Elson (JPL)
-Version
-CSPICE Version 2.1.0, 23-FEB-2012 (NJB)
Added parameters:
SPICE_GF_NWILUM
SPICE_GF_NWRR
SPICE_GF_NWPA
-CSPICE Version 2.0.0, 23-JUN-2009 (NJB)
Added parameter for maximum length of FOV shape string.
-CSPICE Version 1.0.0, 11-MAR-2009 (NJB)
*/
#ifndef HAVE_SPICE_GF_H
#define HAVE_SPICE_GF_H
/*
See the Particulars section above for parameter descriptions.
*/
/*
Workspace parameters
*/
#define SPICE_GF_NWMAX 15
#define SPICE_GF_NWDIST 5
#define SPICE_GF_NWILUM 5
#define SPICE_GF_NWSEP 5
#define SPICE_GF_NWRR 5
#define SPICE_GF_NWPA 5
/*
Field of view (FOV) parameters
*/
#define SPICE_GF_MAXVRT 10000
#define SPICE_GF_CIRFOV "CIRCLE"
#define SPICE_GF_ELLFOV "ELLIPSE"
#define SPICE_GF_POLFOV "POLYGON"
#define SPICE_GF_RECFOV "RECTANGLE"
#define SPICE_GF_SHPLEN 10
#define SPICE_GF_MARGIN ( 1.e-12 )
/*
Occultation parameters
*/
#define SPICE_GF_ANNULR "ANNULAR"
#define SPICE_GF_ANY "ANY"
#define SPICE_GF_FULL "FULL"
#define SPICE_GF_PARTL "PARTIAL"
/*
Target shape parameters
*/
#define SPICE_GF_EDSHAP "ELLIPSOID"
#define SPICE_GF_PTSHAP "POINT"
#define SPICE_GF_RYSHAP "RAY"
#define SPICE_GF_SPSHAP "SPHERE"
/*
Search parameters
*/
#define SPICE_GF_ADDWIN 1.0
#define SPICE_GF_CNVTOL 1.e-6
/*
Configuration parameters.
*/
#define SPICE_GFEVNT_MAXPAR 10
#endif
/*
End of header file SpiceGF.h
*/
-147
View File
@@ -1,147 +0,0 @@
/*
-Header_File SpiceOccult.h ( CSPICE Occultation specific definitions )
-Abstract
Perform CSPICE occultation specific definitions.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Keywords
OCCULTATION
GEOMETRY
ELLIPSOID
-Exceptions
None
-Files
None
-Particulars
The following integer codes indicate the geometric relationship
of the three bodies.
The meaning of the sign of each code is given below.
Code sign Meaning
--------- ------------------------------
> 0 The second ellipsoid is
partially or fully occulted
by the first.
< 0 The first ellipsoid is
partially of fully
occulted by the second.
= 0 No occultation.
The meanings of the codes are given below. The variable names
indicate the type of occultation and which target is in the back.
For example, SPICE_OCCULT_TOTAL1 represents a total occultation in which
the first target is in the back (or occulted by) the second target.
Name Code Meaning
------ ----- ------------------------------
SPICE_OCCULT_TOTAL1 -3 Total occultation of first
target by second.
SPICE_OCCULT_ANNLR1 -2 Annular occultation of first
target by second. The second
target does not block the limb
of the first.
SPICE_OCCULT_PARTL1 -1 Partial occultation of first
target by second target.
SPICE_OCCULT_NOOCC 0 No occultation or transit: both
objects are completely visible
to the observer.
SPICE_OCCULT_PARTL2 1 Partial occultation of second
target by first target.
SPICE_OCCULT_ANNLR2 2 Annular occultation of second
target by first.
SPICE_OCCULT_TOTAL2 3 Total occultation of second
target by first.
-Examples
None
-Restrictions
None.
-Literature_References
None.
-Author_and_Institution
S.C. Krening (JPL)
N.J. Bachman (JPL)
-Version
-CSPICE Version 1.0.0, 23-FEB-2012 (SCK)
*/
#ifndef HAVE_SPICE_OCCULT_H
#define HAVE_SPICE_OCCULT_H
/*
See the Particulars section above for parameter descriptions.
*/
/*
Occultation parameters
*/
#define SPICE_OCCULT_TOTAL1 -3
#define SPICE_OCCULT_ANNLR1 -2
#define SPICE_OCCULT_PARTL1 -1
#define SPICE_OCCULT_NOOCC 0
#define SPICE_OCCULT_PARTL2 1
#define SPICE_OCCULT_ANNLR2 2
#define SPICE_OCCULT_TOTAL2 3
#endif
-106
View File
@@ -1,106 +0,0 @@
/*
-Header_File SpicePln.h ( CSPICE Plane definitions )
-Abstract
Perform CSPICE definitions for the SpicePlane data type.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Particulars
This header defines structures and typedefs that may be referenced in
application code that calls CSPICE Plane functions.
Structures
==========
Name Description
---- ----------
SpicePlane Structure representing a plane in 3-
dimensional space.
The members are:
normal: Vector normal to plane.
constant: Constant of plane equation
Plane =
{X: <normal,X> = constant}
ConstSpicePlane A const SpicePlane.
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
-Restrictions
None.
-Version
-CSPICE Version 1.0.0, 04-MAR-1999 (NJB)
*/
#ifndef HAVE_SPICE_PLANES
#define HAVE_SPICE_PLANES
/*
Plane structure:
*/
struct _SpicePlane
{ SpiceDouble normal [3];
SpiceDouble constant; };
typedef struct _SpicePlane SpicePlane;
typedef const SpicePlane ConstSpicePlane;
#endif
-128
View File
@@ -1,128 +0,0 @@
/*
-Header_File SpiceSPK.h ( CSPICE SPK definitions )
-Abstract
Perform CSPICE definitions to support SPK wrapper interfaces.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Particulars
This header defines types that may be referenced in
application code that calls CSPICE SPK functions.
Typedef
=======
Name Description
---- ----------
SpiceSPK18Subtype Typedef for enum indicating the
mathematical representation used
in an SPK type 18 segment. Possible
values and meanings are:
S18TP0:
Hermite interpolation, 12-
element packets containing
x, y, z, dx/dt, dy/dt, dz/dt,
vx, vy, vz, dvx/dt, dvy/dt, dvz/dt
where x, y, z represent Cartesian
position components and vx, vy, vz
represent Cartesian velocity
components. Note well: vx, vy, and
vz *are not necessarily equal* to the
time derivatives of x, y, and z.
This packet structure mimics that of
the Rosetta/MEX orbit file from which
the data are taken.
Position units are kilometers,
velocity units are kilometers per
second, and acceleration units are
kilometers per second per second.
S18TP1:
Lagrange interpolation, 6-
element packets containing
x, y, z, dx/dt, dy/dt, dz/dt
where x, y, z represent Cartesian
position components and vx, vy, vz
represent Cartesian velocity
components.
Position units are kilometers;
velocity units are kilometers per
second.
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
-Restrictions
None.
-Version
-CSPICE Version 1.0.0, 16-AUG-2002 (NJB)
*/
#ifndef HAVE_SPICE_SPK_H
#define HAVE_SPICE_SPK_H
/*
SPK type 18 subtype codes:
*/
enum _SpiceSPK18Subtype { S18TP0, S18TP1 };
typedef enum _SpiceSPK18Subtype SpiceSPK18Subtype;
#endif
-240
View File
@@ -1,240 +0,0 @@
/*
-Header_File SpiceUsr.h ( CSPICE user interface definitions )
-Abstract
Perform CSPICE user interface declarations, including type
definitions and function prototype declarations.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Particulars
This file is an umbrella header that includes all header files
required to support the CSPICE application programming interface
(API). Users' application code that calls CSPICE need include only
this single header file. This file includes function prototypes for
the entire set of CSPICE routines. Typedef statements used to create
SPICE data types are also included.
About SPICE data types
======================
To assist with long-term maintainability of CSPICE, NAIF has elected
to use typedefs to represent data types occurring in argument lists
and as return values of CSPICE functions. These are:
SpiceBoolean
SpiceChar
SpiceDouble
SpiceInt
ConstSpiceBoolean
ConstSpiceChar
ConstSpiceDouble
ConstSpiceInt
The SPICE typedefs map in an arguably natural way to ANSI C types:
SpiceBoolean -> enum { SPICEFALSE = 0, SPICETRUE = 1 }
SpiceChar -> char
SpiceDouble -> double
SpiceInt -> int or long
ConstX -> const X (X = any of the above types)
The type SpiceInt is a special case: the corresponding type is picked
so as to be half the size of a double. On all currently supported
platforms, type double occupies 8 bytes and type int occupies 4
bytes. Other platforms may require a SpiceInt to map to type long.
While other data types may be used internally in CSPICE, no other
types appear in the API.
About CSPICE function prototypes
================================
Because CSPICE function prototypes enable substantial compile-time
error checking, we recommend that user applications always reference
them. Including the header file SpiceUsr.h in any module that calls
CSPICE will automatically make the prototypes available.
About CSPICE C style
====================
CSPICE is written in ANSI C. No attempt has been made to support K&R
conventions or restrictions.
About C++ compatibility
=======================
The preprocessor directive -D__cplusplus should be used when
compiling C++ source code that includes this header file. This
directive will suppress mangling of CSPICE names, permitting linkage
to a CSPICE object library built from object modules produced by
an ANSI C compiler.
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
S.C. Krening (JPL)
E.D. Wright (JPL)
-Restrictions
The #include statements contained in this file are not part of
the CSPICE API. The set of files included may change without notice.
Users should not include these files directly in their own
application code.
-Version
-CSPICE Version 5.0.0, 11-MAY-2012 (NJB) (SCK)
Updated to include header files
SpiceErr.h
SpiceFrm.h
SpiceOccult.h
-CSPICE Version 4.0.0, 30-SEP-2008 (NJB)
Updated to include header file
SpiceGF.h
-CSPICE Version 3.0.0, 19-AUG-2002 (NJB)
Updated to include header files
SpiceCel.h
SpiceCK.h
SpiceSPK.h
-CSPICE Version 3.0.0, 17-FEB-1999 (NJB)
Updated to support suppression of name mangling when included in
C++ source code. Also now interface macros to intercept function
calls and perform automatic type casting.
Now includes platform macro definition header file.
References to types SpiceVoid and ConstSpiceVoid were removed.
-CSPICE Version 2.0.0, 06-MAY-1998 (NJB) (EDW)
*/
#ifdef __cplusplus
extern "C" {
#endif
#ifndef HAVE_SPICE_USER
#define HAVE_SPICE_USER
/*
Include CSPICE platform macro definitions.
*/
#include "SpiceZpl.h"
/*
Include CSPICE data type definitions.
*/
#include "SpiceZdf.h"
/*
Include the CSPICE error handling interface definitions.
*/
#include "SpiceErr.h"
/*
Include the CSPICE EK interface definitions.
*/
#include "SpiceEK.h"
/*
Include the CSPICE frame subsystem API definitions.
*/
#include "SpiceFrm.h"
/*
Include the CSPICE Cell interface definitions.
*/
#include "SpiceCel.h"
/*
Include the CSPICE CK interface definitions.
*/
#include "SpiceCK.h"
/*
Include the CSPICE SPK interface definitions.
*/
#include "SpiceSPK.h"
/*
Include the CSPICE GF interface definitions.
*/
#include "SpiceGF.h"
/*
Include the CSPICE occultation definitions.
*/
#include "SpiceOccult.h"
/*
Include CSPICE prototypes.
*/
#include "SpiceZpr.h"
/*
Define the CSPICE function interface macros.
*/
#include "SpiceZim.h"
#endif
#ifdef __cplusplus
}
#endif
-209
View File
@@ -1,209 +0,0 @@
/*
-Header_File SpiceZad.h ( CSPICE adapter definitions )
-Abstract
Perform CSPICE declarations to support passed-in function
adapters used in wrapper interfaces.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Particulars
This header file contains declarations used by the CSPICE
passed-in function adapter ("PFA") system. This system enables
CSPICE wrapper functions to support passed-in function
arguments whose prototypes are C-style, even when these
functions are to be called from f2c'd Fortran routines
expecting f2c-style interfaces.
This header declares:
- The prototype for the passed-in function argument
pointer storage and fetch routines
zzadsave_c
zzadget_c
- Prototypes for CSPICE adapter functions. Each passed-in
function argument in a CSPICE wrapper has a corresponding
adapter function. The adapter functions have interfaces
that match those of their f2c'd counterparts; this allows
the adapters to be called by f2c'd SPICELIB code. The
adapters look up saved function pointers for routines
passed in by the wrapper's caller and call these functions.
- Values for the enumerated type SpicePassedInFunc. These
values are used to map function pointers to the
functions they represent, enabling adapters to call
the correct passed-in functions.
Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
-Restrictions
None.
-Version
-CSPICE Version 2.2.0, 29-NOV-2011 (EDW)
Updated to support the user defined boolean function capability.
-CSPICE Version 2.1.0, 21-DEC-2009 (EDW)
Updated to support the user defined scalar function capability.
-CSPICE Version 2.0.0, 29-JAN-2009 (NJB)
Now conditionally includes SpiceZfc.h.
Updated to reflect new calling sequence of f2c'd
routine gfrefn_. Some header updates were made
as well.
-CSPICE Version 1.0.0, 29-MAR-2008 (NJB)
*/
/*
This file has dependencies defined in SpiceZfc.h. Include that
file if it hasn't already been included.
*/
#ifndef HAVE_SPICEF2C_H
#include "SpiceZfc.h"
#endif
#ifndef HAVE_SPICE_ZAD_H
#define HAVE_SPICE_ZAD_H
/*
Prototypes for GF adapters:
*/
logical zzadbail_c ( void );
int zzadstep_c ( doublereal * et,
doublereal * step );
int zzadrefn_c ( doublereal * t1,
doublereal * t2,
logical * s1,
logical * s2,
doublereal * t );
int zzadrepf_c ( void );
int zzadrepi_c ( doublereal * cnfine,
char * srcpre,
char * srcsuf,
ftnlen srcprelen,
ftnlen srcsuflen );
int zzadrepu_c ( doublereal * ivbeg,
doublereal * ivend,
doublereal * et );
int zzadfunc_c ( doublereal * et,
doublereal * value );
int zzadqdec_c ( U_fp udfunc,
doublereal * et,
logical * xbool );
/*
Define the enumerated type
SpicePassedInFunc
for names of passed-in functions. Using this type gives
us compile-time checking and avoids string comparisons.
*/
enum _SpicePassedInFunc {
UDBAIL,
UDREFN,
UDREPF,
UDREPI,
UDREPU,
UDSTEP,
UDFUNC,
UDQDEC,
};
typedef enum _SpicePassedInFunc SpicePassedInFunc;
/*
SPICE_N_PASSED_IN_FUNC is the count of SpicePassedInFunc values.
*/
#define SPICE_N_PASSED_IN_FUNC 8
/*
CSPICE wrappers supporting passed-in function arguments call
the adapter setup interface function once per each such argument;
these calls save the function pointers for later use within the
f2c'd code that calls passed-in functions. The saved pointers
will be used in calls by the adapter functions whose prototypes
are declared above.
Prototypes for adapter setup interface:
*/
void zzadsave_c ( SpicePassedInFunc functionID,
void * functionPtr );
void * zzadget_c ( SpicePassedInFunc functionID );
#endif
/*
End of header file SpiceZad.h
*/
-260
View File
@@ -1,260 +0,0 @@
/*
-Header_File SpiceZdf.h ( CSPICE definitions )
-Abstract
Define CSPICE data types via typedefs; also define some user-visible
enumerated types.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Particulars
CSPICE data types
=================
To assist with long-term maintainability of CSPICE, NAIF has elected
to use typedefs to represent data types occurring in argument lists
and as return values of CSPICE functions. These are:
SpiceBoolean
SpiceChar
SpiceDouble
SpiceInt
ConstSpiceBoolean
ConstSpiceChar
ConstSpiceDouble
ConstSpiceInt
The SPICE typedefs map in an arguably natural way to ANSI C types:
SpiceBoolean -> int
SpiceChar -> char
SpiceDouble -> double
SpiceInt -> int or long
ConstX -> const X (X = any of the above types)
The type SpiceInt is a special case: the corresponding type is picked
so as to be half the size of a double. On most currently supported
platforms, type double occupies 8 bytes and type long occupies 4
bytes. Other platforms may require a SpiceInt to map to type int.
The Alpha/Digital Unix platform is an example of the latter case.
While other data types may be used internally in CSPICE, no other
types appear in the API.
CSPICE enumerated types
=======================
These are provided to enhance readability of the code.
Type name Value set
--------- ---------
_Spicestatus { SPICEFAILURE = -1, SPICESUCCESS = 0 }
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
B.V. Semenov (JPL)
E.D. Wright (JPL)
-Restrictions
None.
-Version
-CSPICE Version 6.2.0, 10-MAR-2014 (BVS)
Updated for:
PC-CYGWIN-64BIT-GCC_C
environment. Added the corresponding tag:
CSPICE_PC_CYGWIN_64BIT_GCC
tag to the #ifdefs set.
-CSPICE Version 6.1.0, 14-MAY-2010 (EDW)(BVS)
Updated for:
MAC-OSX-64BIT-INTEL_C
SUN-SOLARIS-64BIT-NATIVE_C
SUN-SOLARIS-INTEL-64BIT-CC_C
environments. Added the corresponding tags:
CSPICE_MAC_OSX_INTEL_64BIT_GCC
CSPICE_SUN_SOLARIS_64BIT_NATIVE
CSPICE_SUN_SOLARIS_INTEL_64BIT_CC
tag to the #ifdefs set.
-CSPICE Version 6.0.0, 21-FEB-2006 (NJB)
Updated to support the PC Linux 64 bit mode/gcc platform.
-CSPICE Version 5.0.0, 27-JAN-2003 (NJB)
Updated to support the Sun Solaris 64 bit mode/gcc platform.
-CSPICE Version 4.0.0 27-JUL-2002 (NJB)
Added definition of SpiceDataType.
-CSPICE Version 3.0.0 18-SEP-1999 (NJB)
SpiceBoolean implementation changed from enumerated type to
typedef mapping to int.
-CSPICE Version 2.0.0 29-JAN-1999 (NJB)
Made definition of SpiceInt and ConstSpiceInt platform
dependent to accommodate the Alpha/Digital Unix platform.
Removed definitions of SpiceVoid and ConstSpiceVoid.
-CSPICE Version 1.0.0 25-OCT-1997 (KRG) (NJB) (EDW)
*/
#ifndef HAVE_SPICEDEFS_H
#define HAVE_SPICEDEFS_H
/*
Include platform definitions, if they haven't been executed already.
*/
#ifndef HAVE_PLATFORM_MACROS_H
#include "SpiceZpl.h"
#endif
/*
Basic data types. These are defined to be compatible with the
types used by f2c, and so they follow the Fortran notion of what
these things are. See the f2c documentation for the details
about the choices for the sizes of these types.
*/
typedef char SpiceChar;
typedef double SpiceDouble;
typedef float SpiceFloat;
#if ( defined(CSPICE_ALPHA_DIGITAL_UNIX ) \
|| defined(CSPICE_SUN_SOLARIS_64BIT_NATIVE) \
|| defined(CSPICE_SUN_SOLARIS_64BIT_GCC ) \
|| defined(CSPICE_MAC_OSX_INTEL_64BIT_GCC ) \
|| defined(CSPICE_SUN_SOLARIS_INTEL_64BIT_CC ) \
|| defined(CSPICE_PC_CYGWIN_64BIT_GCC ) \
|| defined(CSPICE_PC_LINUX_64BIT_GCC ) )
typedef int SpiceInt;
#else
typedef long SpiceInt;
#endif
typedef const char ConstSpiceChar;
typedef const double ConstSpiceDouble;
typedef const float ConstSpiceFloat;
#if ( defined(CSPICE_ALPHA_DIGITAL_UNIX ) \
|| defined(CSPICE_SUN_SOLARIS_64BIT_NATIVE) \
|| defined(CSPICE_SUN_SOLARIS_64BIT_GCC ) \
|| defined(CSPICE_MAC_OSX_INTEL_64BIT_GCC ) \
|| defined(CSPICE_SUN_SOLARIS_INTEL_64BIT_CC ) \
|| defined(CSPICE_PC_CYGWIN_64BIT_GCC ) \
|| defined(CSPICE_PC_LINUX_64BIT_GCC ) )
typedef const int ConstSpiceInt;
#else
typedef const long ConstSpiceInt;
#endif
/*
More basic data types. These give mnemonics for some other data
types in C that are not used in Fortran written by NAIF or
supported by ANSI Fortran 77. These are for use in C functions
but should not be passed to any C SPICE wrappers, ``*_c.c''
since they are not Fortran compatible.
*/
typedef long SpiceLong;
typedef short SpiceShort;
/*
Unsigned data types
*/
typedef unsigned char SpiceUChar;
typedef unsigned int SpiceUInt;
typedef unsigned long SpiceULong;
typedef unsigned short SpiceUShort;
/*
Signed data types
*/
typedef signed char SpiceSChar;
/*
Other basic types
*/
typedef int SpiceBoolean;
typedef const int ConstSpiceBoolean;
#define SPICETRUE 1
#define SPICEFALSE 0
enum _Spicestatus { SPICEFAILURE = -1, SPICESUCCESS = 0 };
typedef enum _Spicestatus SpiceStatus;
enum _SpiceDataType { SPICE_CHR = 0,
SPICE_DP = 1,
SPICE_INT = 2,
SPICE_TIME = 3,
SPICE_BOOL = 4 };
typedef enum _SpiceDataType SpiceDataType;
#endif
File diff suppressed because it is too large Load Diff
-980
View File
@@ -1,980 +0,0 @@
/*
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
*/
/*
CSPICE private macro file.
-Particulars
Current list of macros (spelling counts)
BLANK
C2F_MAP_CELL
C2F_MAP_CELL2
C2F_MAP_CELL3
CELLINIT
CELLINIT2
CELLINIT3
CELLISSETCHK
CELLISSETCHK2
CELLISSETCHK2_VAL
CELLISSETCHK3
CELLISSETCHK3_VAL
CELLISSETCHK_VAL
CELLMATCH2
CELLMATCH2_VAL
CELLMATCH3
CELLMATCH3_VAL
CELLTYPECHK
CELLTYPECHK2
CELLTYPECHK2_VAL
CELLTYPECHK3
CELLTYPECHK3_VAL
CELLTYPECHK_VAL
CHKFSTR
CHKFSTR_VAL
CHKOSTR
CHKOSTR_VAL
CHKPTR
Constants
Even
F2C_MAP_CELL
Index values
MOVED
MOVEI
MaxAbs
MaxVal
MinAbs
MinVal
Odd
SpiceError
TolOrFail
-Restrictions
This is a private macro file for use within CSPICE.
Do not use or alter any entry. Or else!
-Author_and_Institution
N.J. Bachman (JPL)
E.D. Wright (JPL)
-Version
-CSPICE Version 4.3.0, 18-SEP-2013 (NJB)
Bug fix: missing comma was added to argument list
in body of macro CELLTYPECHK3_VAL.
-CSPICE Version 4.2.0, 16-FEB-2005 (NJB)
Bug fix: in the macro C2F_MAP_CELL, error checking has been
added after the sequence of calls to ssizec_ and scardc_.
If either of these routines signals an error, the dynamically
allocated memory for the "Fortran cell" is freed.
-CSPICE Version 4.1.0, 06-DEC-2002 (NJB)
Bug fix: added previous missing, bracketing parentheses to
references to input cell pointer argument in macro
CELLINIT.
Changed CELLINIT macro so it no longer initializes to zero
length all strings in data array of a character cell. Instead,
strings are terminated with a null in their final element.
-CSPICE Version 4.0.0, 22-AUG-2002 (NJB)
Added macro definitions to support CSPICE cells and sets:
C2F_MAP_CELL
C2F_MAP_CELL2
C2F_MAP_CELL3
CELLINIT
CELLINIT2
CELLINIT3
CELLISSETCHK
CELLISSETCHK2
CELLISSETCHK2_VAL
CELLISSETCHK3
CELLISSETCHK3_VAL
CELLISSETCHK_VAL
CELLMATCH2
CELLMATCH2_VAL
CELLMATCH3
CELLMATCH3_VAL
CELLTYPECHK
CELLTYPECHK2
CELLTYPECHK2_VAL
CELLTYPECHK3
CELLTYPECHK3_VAL
CELLTYPECHK_VAL
F2C_MAP_CELL
-CSPICE Version 3.0.0, 09-JAN-1998 (NJB)
Added output string check macros CHKOSTR and CHKOSTR_VAL.
Removed variable name arguments from macros
CHKPTR
CHKPTR_VAL
CHKFSTR
CHKRSTR_VAL
The strings containing names of the checked variables are now
generated from the variables themselves via the # operator.
-CSPICE Version 2.0.0, 03-DEC-1997 (NJB)
Added pointer check macro CHKPTR and Fortran string check macro
CHKFSTR.
-CSPICE Version 1.0.0, 25-OCT-1997 (EDW)
*/
#include <math.h>
#include <string.h>
#include "SpiceZdf.h"
#define MOVED( arrfrm, ndim, arrto ) \
\
( memmove ( (void*) (arrto) , \
(void*) (arrfrm), \
sizeof (SpiceDouble) * (ndim) ) )
#define MOVEI( arrfrm, ndim, arrto ) \
\
( memmove ( (void*) (arrto) , \
(void*) (arrfrm), \
sizeof (SpiceInt) * (ndim) ) )
/*
Define a tolerance test for those pesky double precision reals.
True if the difference is less than the tolerance, false otherwise.
The tolerance refers to a percentage. x, y and tol should be declared
double. All values are assumed to be non-zero. Okay?
*/
#define TolOrFail( x, y, tol ) \
\
( fabs( x-y ) < ( tol * fabs(x) ) )
/*
Simple error output through standard SPICE error system . Set the error
message and the type
*/
#define SpiceError( errmsg, errtype ) \
\
{ \
setmsg_c ( errmsg ); \
sigerr_c ( errtype ); \
}
/*
Return a value which is the maximum/minimum of the absolute values of
two values.
*/
#define MaxAbs(a,b) ( fabs(a) >= fabs(b) ? fabs(a) : fabs(b) )
#define MinAbs(a,b) ( fabs(a) < fabs(b) ? fabs(a) : fabs(b) )
/*
Return a value which is the maximum/minimum value of two values.
*/
#define MaxVal(A,B) ( (A) >= (B) ? (A) : (B) )
#define MinVal(A,B) ( (A) < (B) ? (A) : (B) )
/*
Determine whether a value is even or odd
*/
#define Even( x ) ( ( (x) & 1 ) == 0 )
#define Odd ( x ) ( ( (x) & 1 ) != 0 )
/*
Array indexes for vectors.
*/
#define SpiceX 0
#define SpiceY 1
#define SpiceZ 2
#define SpiceVx 3
#define SpiceVy 4
#define SpiceVz 5
/*
Physical constants and dates.
*/
#define B1900 2415020.31352
#define J1900 2415020.0
#define JYEAR 31557600.0
#define TYEAR 31556925.9747
#define J1950 2433282.5
#define SPD 86400.0
#define B1950 2433282.42345905
#define J2100 2488070.0
#define CLIGHT 299792.458
#define J2000 2451545.0
/*
Common literal values.
*/
#define NULLCHAR ( (SpiceChar ) 0 )
#define NULLCPTR ( (SpiceChar * ) 0 )
#define BLANK ( (SpiceChar ) ' ' )
/*
Macro CHKPTR is used for checking for a null pointer. CHKPTR uses
the constants
CHK_STANDARD
CHK_DISCOVER
CHK_REMAIN
to control tracing behavior. Values and meanings are:
CHK_STANDARD Standard tracing. If an error
is found, signal it, check out
and return.
CHK_DISCOVER Discovery check-in. If an
error is found, check in, signal
the error, check out, and return.
CHK_REMAIN If an error is found, signal it.
Do not check out or return. This
would allow the caller to clean up
before returning, if necessary.
In such cases the caller must test
failed_c() after the macro call.
CHKPTR should be used in void functions. In non-void functions,
use CHKPTR_VAL, which is defined below.
*/
#define CHK_STANDARD 1
#define CHK_DISCOVER 2
#define CHK_REMAIN 3
#define CHKPTR( errHandling, modname, pointer ) \
\
if ( (void *)(pointer) == (void *)0 ) \
{ \
if ( (errHandling) == CHK_DISCOVER ) \
{ \
chkin_c ( modname ); \
} \
\
setmsg_c ( "Pointer \"#\" is null; a non-null " \
"pointer is required." ); \
errch_c ( "#", (#pointer) ); \
sigerr_c ( "SPICE(NULLPOINTER)" ); \
\
if ( ( (errHandling) == CHK_DISCOVER ) \
|| ( (errHandling) == CHK_STANDARD ) ) \
{ \
chkout_c ( modname ); \
return; \
} \
}
#define CHKPTR_VAL( errHandling, modname, pointer, retval ) \
\
if ( (void *)(pointer) == (void *)0 ) \
{ \
if ( (errHandling) == CHK_DISCOVER ) \
{ \
chkin_c ( modname ); \
} \
\
setmsg_c ( "Pointer \"#\" is null; a non-null " \
"pointer is required." ); \
errch_c ( "#", (#pointer) ); \
sigerr_c ( "SPICE(NULLPOINTER)" ); \
\
if ( ( (errHandling) == CHK_DISCOVER ) \
|| ( (errHandling) == CHK_STANDARD ) ) \
{ \
chkout_c ( modname ); \
return ( retval ); \
} \
}
/*
Macro CHKFSTR checks strings that are to be passed to Fortran or
f2c'd Fortran routines. Such strings must have non-zero length,
and their pointers must be non-null.
CHKFSTR should be used in void functions. In non-void functions,
use CHKFSTR_VAL, which is defined below.
*/
#define CHKFSTR( errHandling, modname, string ) \
\
CHKPTR ( errHandling, modname, string ); \
\
if ( ( (void *)string != (void *)0 ) \
&& ( strlen(string) == 0 ) ) \
{ \
if ( (errHandling) == CHK_DISCOVER ) \
{ \
chkin_c ( modname ); \
} \
\
setmsg_c ( "String \"#\" has length zero." ); \
errch_c ( "#", (#string) ); \
sigerr_c ( "SPICE(EMPTYSTRING)" ); \
\
if ( ( (errHandling) == CHK_DISCOVER ) \
|| ( (errHandling) == CHK_STANDARD ) ) \
{ \
chkout_c ( modname ); \
return; \
} \
}
#define CHKFSTR_VAL( errHandling, modname, string, retval ) \
\
CHKPTR_VAL( errHandling, modname, string, retval); \
\
if ( ( (void *)string != (void *)0 ) \
&& ( strlen(string) == 0 ) ) \
{ \
if ( (errHandling) == CHK_DISCOVER ) \
{ \
chkin_c ( modname ); \
} \
\
setmsg_c ( "String \"#\" has length zero." ); \
errch_c ( "#", (#string) ); \
sigerr_c ( "SPICE(EMPTYSTRING)" ); \
\
if ( ( (errHandling) == CHK_DISCOVER ) \
|| ( (errHandling) == CHK_STANDARD ) ) \
{ \
chkout_c ( modname ); \
return ( retval ); \
} \
}
/*
Macro CHKOSTR checks output string pointers and the associated
string length values supplied as input arguments. Output string
pointers must be non-null, and the string lengths must be at
least 2, so Fortran routine can write at least one character to
the output string, and so a null terminator can be appended.
CHKOSTR should be used in void functions. In non-void functions,
use CHKOSTR_VAL, which is defined below.
*/
#define CHKOSTR( errHandling, modname, string, length ) \
\
CHKPTR ( errHandling, modname, string ); \
\
if ( ( (void *)string != (void *)0 ) \
&& ( length < 2 ) ) \
{ \
if ( (errHandling) == CHK_DISCOVER ) \
{ \
chkin_c ( modname ); \
} \
\
setmsg_c ( "String \"#\" has length #; must be >= 2." ); \
errch_c ( "#", (#string) ); \
errint_c ( "#", (length) ); \
sigerr_c ( "SPICE(STRINGTOOSHORT)" ); \
\
if ( ( (errHandling) == CHK_DISCOVER ) \
|| ( (errHandling) == CHK_STANDARD ) ) \
{ \
chkout_c ( modname ); \
return; \
} \
}
#define CHKOSTR_VAL( errHandling, modname, string, length, retval ) \
\
CHKPTR_VAL( errHandling, modname, string, retval ); \
\
if ( ( (void *)string != (void *)0 ) \
&& ( length < 2 ) ) \
{ \
if ( (errHandling) == CHK_DISCOVER ) \
{ \
chkin_c ( modname ); \
} \
\
setmsg_c ( "String \"#\" has length #; must be >= 2." ); \
errch_c ( "#", (#string) ); \
errint_c ( "#", (length) ); \
sigerr_c ( "SPICE(STRINGTOOSHORT)" ); \
\
if ( ( (errHandling) == CHK_DISCOVER ) \
|| ( (errHandling) == CHK_STANDARD ) ) \
{ \
chkout_c ( modname ); \
return ( retval ); \
} \
}
/*
Definitions for Cells and Sets
*/
/*
Cell initialization macros
*/
#define CELLINIT( cellPtr ) \
\
if ( !( (cellPtr)->init ) ) \
{ \
if ( (cellPtr)->dtype == SPICE_CHR ) \
{ \
/* \
Make sure all elements of the data array, including \
the control area, start off null-terminated. We place \
the null character in the final element of each string, \
so as to avoid wiping out data that may have been \
assigned to the data array prior to initialization. \
*/ \
SpiceChar * sPtr; \
SpiceInt i; \
SpiceInt nmax; \
\
nmax = SPICE_CELL_CTRLSZ + (cellPtr)->size; \
\
for ( i = 1; i <= nmax; i++ ) \
{ \
sPtr = (SpiceChar *)((cellPtr)->base) \
+ i * (cellPtr)->length \
- 1; \
\
*sPtr = NULLCHAR; \
} \
} \
else \
{ \
zzsynccl_c ( C2F, (cellPtr) ); \
} \
\
(cellPtr)->init = SPICETRUE; \
}
#define CELLINIT2( cellPtr1, cellPtr2 ) \
\
CELLINIT ( cellPtr1 ); \
CELLINIT ( cellPtr2 );
#define CELLINIT3( cellPtr1, cellPtr2, cellPtr3 ) \
\
CELLINIT ( cellPtr1 ); \
CELLINIT ( cellPtr2 ); \
CELLINIT ( cellPtr3 );
/*
Data type checking macros:
*/
#define CELLTYPECHK( errHandling, modname, dType, cellPtr1 ) \
\
if ( (cellPtr1)->dtype != (dType) ) \
{ \
SpiceChar * typstr[3] = \
{ \
"character", "double precision", "integer" \
}; \
\
if ( (errHandling) == CHK_DISCOVER ) \
{ \
chkin_c ( modname ); \
} \
\
setmsg_c ( "Data type of # is #; expected type " \
"is #." ); \
errch_c ( "#", (#cellPtr1) ); \
errch_c ( "#", typstr[ (cellPtr1)->dtype ] ); \
errch_c ( "#", typstr[ dType ] ); \
sigerr_c ( "SPICE(TYPEMISMATCH)" ); \
\
if ( ( (errHandling) == CHK_DISCOVER ) \
|| ( (errHandling) == CHK_STANDARD ) ) \
{ \
chkout_c ( modname ); \
return; \
} \
}
#define CELLTYPECHK_VAL( errHandling, modname, \
dType, cellPtr1, retval ) \
\
if ( (cellPtr1)->dtype != (dType) ) \
{ \
SpiceChar * typstr[3] = \
{ \
"character", "double precision", "integer" \
}; \
\
if ( (errHandling) == CHK_DISCOVER ) \
{ \
chkin_c ( modname ); \
} \
\
setmsg_c ( "Data type of # is #; expected type " \
"is #." ); \
errch_c ( "#", (#cellPtr1) ); \
errch_c ( "#", typstr[ (cellPtr1)->dtype ] ); \
errch_c ( "#", typstr[ dType ] ); \
sigerr_c ( "SPICE(TYPEMISMATCH)" ); \
\
if ( ( (errHandling) == CHK_DISCOVER ) \
|| ( (errHandling) == CHK_STANDARD ) ) \
{ \
chkout_c ( modname ); \
return (retval); \
} \
}
#define CELLTYPECHK2( errHandling, modname, dtype, \
cellPtr1, cellPtr2 ) \
\
CELLTYPECHK( errHandling, modname, dtype, cellPtr1 ); \
CELLTYPECHK( errHandling, modname, dtype, cellPtr2 );
#define CELLTYPECHK2_VAL( errHandling, modname, dtype, \
cellPtr1, cellPtr2, retval ) \
\
CELLTYPECHK_VAL( errHandling, modname, dtype, cellPtr1, \
retval ); \
CELLTYPECHK_VAL( errHandling, modname, dtype, cellPtr2, \
retval );
#define CELLTYPECHK3( errHandling, modname, dtype, \
cellPtr1, cellPtr2, cellPtr3 ) \
\
CELLTYPECHK( errHandling, modname, dtype, cellPtr1 ); \
CELLTYPECHK( errHandling, modname, dtype, cellPtr2 ); \
CELLTYPECHK( errHandling, modname, dtype, cellPtr3 );
#define CELLTYPECHK3_VAL( errHandling, modname, dtype, \
cellPtr1, cellPtr2, cellPtr3, \
retval ) \
\
CELLTYPECHK_VAL( errHandling, modname, dtype, cellPtr1, \
retval ); \
CELLTYPECHK_VAL( errHandling, modname, dtype, cellPtr2, \
retval ); \
CELLTYPECHK_VAL( errHandling, modname, dtype, cellPtr3, \
retval );
#define CELLMATCH2( errHandling, modname, cellPtr1, cellPtr2 ) \
\
if ( (cellPtr1)->dtype != (cellPtr2)->dtype ) \
{ \
SpiceChar * typstr[3] = \
{ \
"character", "double precision", "integer" \
}; \
\
if ( (errHandling) == CHK_DISCOVER ) \
{ \
chkin_c ( modname ); \
} \
\
setmsg_c ( "Data type of # is #; data type of # " \
"is #, but types must match." ); \
errch_c ( "#", (#cellPtr1) ); \
errch_c ( "#", typstr[ (cellPtr1)->dtype ] ); \
errch_c ( "#", (#cellPtr2) ); \
errch_c ( "#", typstr[ (cellPtr2)->dtype ] ); \
sigerr_c ( "SPICE(TYPEMISMATCH)" ); \
\
if ( ( (errHandling) == CHK_DISCOVER ) \
|| ( (errHandling) == CHK_STANDARD ) ) \
{ \
chkout_c ( modname ); \
return; \
} \
}
#define CELLMATCH2_VAL( errHandling, modname, \
cellPtr1, cellPtr2, retval ) \
\
if ( (cellPtr1)->dtype != (cellPtr2)->dtype ) \
{ \
SpiceChar * typstr[3] = \
{ \
"character", "double precision", "integer" \
}; \
\
if ( (errHandling) == CHK_DISCOVER ) \
{ \
chkin_c ( modname ); \
} \
\
setmsg_c ( "Data type of # is #; data type of # " \
"is #, but types must match." ); \
errch_c ( "#", (#cellPtr1) ); \
errch_c ( "#", typstr [ (cellPtr1)->dtype ] ); \
errch_c ( "#", (#cellPtr2) ); \
errch_c ( "#", typstr [ (cellPtr2)->dtype ] ); \
sigerr_c ( "SPICE(TYPEMISMATCH)" ); \
\
if ( ( (errHandling) == CHK_DISCOVER ) \
|| ( (errHandling) == CHK_STANDARD ) ) \
{ \
chkout_c ( modname ); \
return ( retval ); \
} \
}
#define CELLMATCH3( errHandling, modname, \
cellPtr1, cellPtr2, cellPtr3 ) \
\
CELLMATCH2 ( errHandling, modname, cellPtr1, cellPtr2 ); \
CELLMATCH2 ( errHandling, modname, cellPtr2, cellPtr3 );
#define CELLMATCH3_VAL( errHandling, modname, cellPtr1, \
cellPtr2, cellPtr3, retval ) \
\
CELLMATCH2_VAL ( errHandling, modname, \
cellPtr1, cellPtr2, retval ); \
\
CELLMATCH2_VAL ( errHandling, modname, \
cellPtr2, cellPtr3, retval );
/*
Set checking macros:
*/
#define CELLISSETCHK( errHandling, modname, cellPtr1 ) \
\
if ( !(cellPtr1)->isSet ) \
{ \
if ( (errHandling) == CHK_DISCOVER ) \
{ \
chkin_c ( modname ); \
} \
\
setmsg_c ( "Cell # must be sorted and have unique " \
"values in order to be a CSPICE set. " \
"The isSet flag in this cell is SPICEFALSE, " \
"indicating the cell may have been modified " \
"by a routine that doesn't preserve these " \
"properties." ); \
errch_c ( "#", (#cellPtr1) ); \
sigerr_c ( "SPICE(NOTASET)" ); \
\
if ( ( (errHandling) == CHK_DISCOVER ) \
|| ( (errHandling) == CHK_STANDARD ) ) \
{ \
chkout_c ( modname ); \
return; \
} \
}
#define CELLISSETCHK_VAL( errHandling, modname, \
cellPtr1, retval ) \
\
if ( !(cellPtr1)->isSet ) \
{ \
if ( (errHandling) == CHK_DISCOVER ) \
{ \
chkin_c ( modname ); \
} \
\
setmsg_c ( "Cell # must be sorted and have unique " \
"values in order to be a CSPICE set. " \
"The isSet flag in this cell is SPICEFALSE, " \
"indicating the cell may have been modified " \
"by a routine that doesn't preserve these " \
"properties." ); \
errch_c ( "#", (#cellPtr1) ); \
sigerr_c ( "SPICE(NOTASET)" ); \
\
if ( ( (errHandling) == CHK_DISCOVER ) \
|| ( (errHandling) == CHK_STANDARD ) ) \
{ \
chkout_c ( modname ); \
return (retval); \
} \
}
#define CELLISSETCHK2( errHandling, modname, \
cellPtr1, cellPtr2 ) \
\
CELLISSETCHK( errHandling, modname, cellPtr1 ); \
CELLISSETCHK( errHandling, modname, cellPtr2 );
#define CELLISSETCHK2_VAL( errHandling, modname, \
cellPtr1, cellPtr2, retval ) \
\
CELLISSETCHK_VAL( errHandling, modname, cellPtr1, retval ); \
CELLISSETCHK_VAL( errHandling, modname, cellPtr2, retval ); \
#define CELLISSETCHK3( errHandling, modname, \
cellPtr1, cellPtr2, cellPtr3 ) \
\
CELLISSETCHK ( errHandling, modname, cellPtr1 ); \
CELLISSETCHK ( errHandling, modname, cellPtr2 ); \
CELLISSETCHK ( errHandling, modname, cellPtr3 );
#define CELLISSETCHK3_VAL( errHandling, modname, cellPtr1, \
cellPtr2, cellPtr3, retval ) \
\
CELLISSETCHK_VAL ( errHandling, modname, cellPtr1, retval ); \
CELLISSETCHK_VAL ( errHandling, modname, cellPtr2, retval ); \
CELLISSETCHK_VAL ( errHandling, modname, cellPtr3, retval );
/*
C-to-Fortran and Fortran-to-C character cell translation macros:
*/
/*
Macros that map one or more character C cells to dynamically
allocated Fortran-style character cells:
*/
#define C2F_MAP_CELL( caller, CCell, fCell, fLen ) \
\
{ \
/* \
fCell and fLen are to be passed by reference, as if this \
macro were a function. \
\
\
Caution: dynamically allocates array fCell, which is to be \
freed by caller! \
*/ \
SpiceInt ndim; \
SpiceInt lenvals; \
\
\
ndim = (CCell)->size + SPICE_CELL_CTRLSZ; \
lenvals = (CCell)->length; \
\
C2F_MapFixStrArr ( (caller), ndim, lenvals, \
(CCell)->base, (fLen), (fCell) ); \
\
if ( !failed_c() ) \
{ \
/* \
Explicitly set the control area info in the Fortran cell.\
*/ \
ssizec_ ( ( integer * ) &((CCell)->size), \
( char * ) *(fCell), \
( ftnlen ) *(fLen) ); \
\
scardc_ ( ( integer * ) &((CCell)->card), \
( char * ) *(fCell), \
( ftnlen ) *(fLen) ); \
\
if ( failed_c() ) \
{ \
/* \
Setting size or cardinality of the Fortran cell \
can fail, for example if the cell's string length \
is too short. \
*/ \
free ( *(fCell) ); \
} \
} \
}
#define C2F_MAP_CELL2( caller, CCell1, fCell1, fLen1, \
CCell2, fCell2, fLen2 ) \
\
{ \
C2F_MAP_CELL( caller, CCell1, fCell1, fLen1 ); \
\
if ( !failed_c() ) \
{ \
C2F_MAP_CELL( caller, CCell2, fCell2, fLen2 ); \
\
if ( failed_c() ) \
{ \
free ( *(fCell1) ); \
} \
} \
}
#define C2F_MAP_CELL3( caller, CCell1, fCell1, fLen1, \
CCell2, fCell2, fLen2, \
CCell3, fCell3, fLen3 ) \
\
{ \
C2F_MAP_CELL2( caller, CCell1, fCell1, fLen1, \
CCell2, fCell2, fLen2 ); \
\
if ( !failed_c() ) \
{ \
C2F_MAP_CELL( caller, CCell3, fCell3, fLen3 ); \
\
if ( failed_c() ) \
{ \
free ( *(fCell1) ); \
free ( *(fCell2) ); \
} \
} \
}
/*
Macro that maps a Fortran-style character cell to a C cell
(Note: this macro frees the Fortran cell):
*/
#define F2C_MAP_CELL( fCell, fLen, CCell ) \
\
{ \
SpiceInt card; \
SpiceInt lenvals; \
SpiceInt ndim; \
SpiceInt nBytes; \
SpiceInt size; \
void * array; \
\
ndim = (CCell)->size + SPICE_CELL_CTRLSZ; \
lenvals = (CCell)->length; \
array = (CCell)->base; \
\
/* \
Capture the size and cardinality of the Fortran cell. \
*/ \
if ( !failed_c() ) \
{ \
size = sizec_ ( ( char * ) (fCell), \
( ftnlen ) fLen ); \
\
card = cardc_ ( ( char * ) (fCell), \
( ftnlen ) fLen ); \
} \
\
\
/* \
Copy the Fortran array into the output array. \
*/ \
\
nBytes = ndim * fLen * sizeof(SpiceChar); \
memmove ( array, fCell, nBytes ); \
/* \
Convert the output array from Fortran to C style. \
*/ \
F2C_ConvertTrStrArr ( ndim, lenvals, (SpiceChar *)array ); \
\
/* \
Sync the size and cardinality of the C cell. \
*/ \
if ( !failed_c() ) \
{ \
(CCell)->size = size; \
(CCell)->card = card; \
} \
}
/*
End of header SpiceZmc.h
*/
-117
View File
@@ -1,117 +0,0 @@
/*
-Header_File SpiceZpl.h ( CSPICE platform macros )
-Abstract
Define macros identifying the host platform for which this
version of CSPICE is targeted.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Literature_References
None.
-Particulars
This header file defines macros that enable CSPICE code to be
compiled conditionally based on the identity of the host platform.
The macros defined here ARE visible in the macro name space of
any file that includes SpiceUsr.h. The names are prefixed with
the string CSPICE_ to help prevent conflicts with macros defined
by users' applications.
-Author_and_Institution
N.J. Bachman (JPL)
B.V. Semenov (JPL)
E.D. Wright (JPL)
-Version
-CSPICE Version 2.1.0, 10-MAR-2014 (BVS)
Updated for the:
PC-CYGWIN-64BIT-GCC_C
environment.
-CSPICE Version 2.2.0, 14-MAY-2010 (EDW)(BVS)
Updated for the:
MAC-OSX-64BIT-INTEL_C
PC-64BIT-MS_C
SUN-SOLARIS-64BIT-NATIVE_C
SUN-SOLARIS-INTEL-64BIT-CC_C
SUN-SOLARIS-INTEL-CC_C
environments.
-CSPICE Version 2.1.0, 15-NOV-2006 (BVS)
Updated for MAC-OSX-INTEL_C environment.
-CSPICE Version 2.0.0, 21-FEB-2006 (NJB)
Updated for PC-LINUX-64BIT-GCC_C environment.
-CSPICE Version 1.3.0, 06-MAR-2005 (NJB)
Updated for SUN-SOLARIS-64BIT-GCC_C environment.
-CSPICE Version 1.2.0, 03-JAN-2005 (BVS)
Updated for PC-CYGWIN_C environment.
-CSPICE Version 1.1.0, 27-JUL-2002 (BVS)
Updated for MAC-OSX-NATIVE_C environment.
-CSPICE Version 1.0.0, 26-FEB-1999 (NJB) (EDW)
-Index_Entries
platform ID defines for CSPICE
*/
#ifndef HAVE_PLATFORM_MACROS_H
#define HAVE_PLATFORM_MACROS_H
#define CSPICE_PC_MS
#endif
File diff suppressed because it is too large Load Diff
-82
View File
@@ -1,82 +0,0 @@
/*
-Header_File SpiceZrnm.h ( CSPICE rename assignments )
-Abstract
Reassign CSPICE symbol names to prevent symbol collisions.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Literature_References
None.
-Particulars
Compiled symbol names in CSPICE may collide with symbols in other,
non-SPICE libraries. This file redefines names which have or may
cause a collision.
-Author_and_Institution
N.J. Bachman (JPL)
E.D. Wright (JPL)
-Version
-CSPICE Version 1.0.0, 17-OCT-2011 (EDW)
-Index_Entries
Rename assignments for CSPICE functions
*/
#ifndef HAVE_SPICERENAME_H
/*
Redefine names causing symbol conflicts:
*/
#define HAVE_SPICERENAME_H
/* dpstrf_ may exist in the LAPACK library. */
#define dpstrf_ zz_dpstrf_
/* Just in case. */
#define pi_ zz_pi_
#define vnorm_ zz_vnorm_
#define vdist_ zz_vdist_
#endif
-199
View File
@@ -1,199 +0,0 @@
/*
-Header_File SpiceZst.h ( Fortran/C string conversion utilities )
-Abstract
Define prototypes for CSPICE Fortran/C string conversion utilities.
Caution: these prototypes are subject to revision without notice.
These are private routines and are not part of the official CSPICE
user interface.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Particulars
None.
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
K.R. Gehringer (JPL)
E.D. Wright (JPL)
-Version
-CSPICE Version 6.0.0, 10-JUL-2002 (NJB)
Added prototype for new functions C2F_MapStrArr and
C2F_MapFixStrArr.
-CSPICE Version 5.0.0, 18-MAY-2001 (WLT)
Added #ifdef's to add namespace specification for C++ compilation.
-CSPICE Version 4.0.0, 14-FEB-2000 (NJB)
Added prototype for new function C2F_CreateStrArr_Sig.
-CSPICE Version 3.0.0, 12-JUL-1999 (NJB)
Added prototype for function C2F_CreateFixStrArr.
Added prototype for function F2C_ConvertTrStrArr.
Removed reference in comments to C2F_CreateStrArr_Sig, which
does not exist.
-CSPICE Version 2.0.1, 06-MAR-1998 (NJB)
Type SpiceVoid was changed to void.
-CSPICE Version 2.0.1, 09-FEB-1998 (EDW)
Added prototype for F2C_ConvertStrArr.
-CSPICE Version 2.0.0, 04-JAN-1998 (NJB)
Added prototype for F2C_ConvertStr.
-CSPICE Version 1.0.0, 25-OCT-1997 (NJB) (KRG) (EDW)
-Index_Entries
protoypes of CSPICE Fortran/C string conversion utilities
*/
#include <stdlib.h>
#include <string.h>
#include "SpiceZdf.h"
#ifndef HAVE_FCSTRINGS_H
#define HAVE_FCSTRINGS_H
#ifdef __cplusplus
namespace Jpl_NAIF_CSpice {
#endif
SpiceStatus C2F_CreateStr ( ConstSpiceChar *,
SpiceInt *,
SpiceChar ** );
void C2F_CreateStr_Sig ( ConstSpiceChar *,
SpiceInt *,
SpiceChar ** );
void C2F_CreateFixStrArr ( SpiceInt nStr,
SpiceInt cStrDim,
ConstSpiceChar ** cStrArr,
SpiceInt * fStrLen,
SpiceChar ** fStrArr );
SpiceStatus C2F_CreateStrArr ( SpiceInt,
ConstSpiceChar **,
SpiceInt *,
SpiceChar ** );
void C2F_CreateStrArr_Sig ( SpiceInt nStr,
ConstSpiceChar ** cStrArr,
SpiceInt * fStrLen,
SpiceChar ** fStrArr );
void C2F_MapFixStrArr ( ConstSpiceChar * caller,
SpiceInt nStr,
SpiceInt cStrLen,
const void * cStrArr,
SpiceInt * fStrLen,
SpiceChar ** fStrArr );
void C2F_MapStrArr ( ConstSpiceChar * caller,
SpiceInt nStr,
SpiceInt cStrLen,
const void * cStrArr,
SpiceInt * fStrLen,
SpiceChar ** fStrArr );
SpiceStatus C2F_StrCpy ( ConstSpiceChar *,
SpiceInt,
SpiceChar * );
void F_Alloc ( SpiceInt,
SpiceChar** );
void F2C_ConvertStr ( SpiceInt,
SpiceChar * );
void F2C_ConvertStrArr ( SpiceInt n,
SpiceInt lenout,
SpiceChar * cvals );
void F2C_ConvertTrStrArr ( SpiceInt n,
SpiceInt lenout,
SpiceChar * cvals );
SpiceStatus F2C_CreateStr ( SpiceInt,
ConstSpiceChar *,
SpiceChar ** );
void F2C_CreateStr_Sig ( SpiceInt,
ConstSpiceChar *,
SpiceChar ** );
SpiceStatus F2C_CreateStrArr ( SpiceInt,
SpiceInt,
ConstSpiceChar *,
SpiceChar *** );
void F2C_CreateStrArr_Sig ( SpiceInt,
SpiceInt,
ConstSpiceChar *,
SpiceChar *** );
void F2C_FreeStrArr ( SpiceChar **cStrArr );
SpiceStatus F2C_StrCpy ( SpiceInt,
ConstSpiceChar *,
SpiceInt,
SpiceChar * );
SpiceInt F_StrLen ( SpiceInt,
ConstSpiceChar * );
#ifdef __cplusplus
}
#endif
#endif
-232
View File
@@ -1,232 +0,0 @@
/*
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
*/
/* STARTUP PROCEDURE FOR UNIX FORTRAN PROGRAMS */
/*
This is the main.c file from the f2c libF77 set of source files,
modified for use within CSPICE. The changes made were:
- The file SpiceUsr.h is included.
- A call to putcml_c is made to store the command line arguments
and make them accessible via getcml_ or getcml_c.
This file is intended to be used as the main function for all
programs in the CSPICE Toolkit.
-Version
-CSPICE Version 2.0.0, 19-DEC-2001 (NJB)
Updated to support linking CSPICE into executables that
also link in objects compiled from Fortran, in particular
ones that perform Fortran I/O. To enable this odd mix,
one defines the preprocessor flag
MIX_C_AND_FORTRAN
This macro is undefined by default, since the action it invokes
is usually not desirable. See the header
f2cMang.h
for further information.
-CSPICE Version 1.1.0 29-FEB-2000 (NJB)
Updated to use the main.c source code from a newer version of
f2c, dated 1998-09-13.
-CSPICE Version 1.0.0 28-OCT-1998 (NJB)
*/
/*
Optionally include name-mangling macros for f2c external symbols.
*/
#ifdef MIX_C_AND_FORTRAN
#include "f2cMang.h"
#endif
/*
This header file is included for use within CSPICE.
*/
#include "SpiceUsr.h"
#include "stdio.h"
#include "signal1.h"
#ifndef SIGIOT
#ifdef SIGABRT
#define SIGIOT SIGABRT
#endif
#endif
#ifndef KR_headers
#undef VOID
#include "stdlib.h"
#endif
#ifndef VOID
#define VOID void
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifdef NO__STDC
#define ONEXIT onexit
extern VOID f_exit();
#else
#ifndef KR_headers
extern void f_exit(void);
#ifndef NO_ONEXIT
#define ONEXIT atexit
extern int atexit(void (*)(void));
#endif
#else
#ifndef NO_ONEXIT
#define ONEXIT onexit
extern VOID f_exit();
#endif
#endif
#endif
#ifdef KR_headers
extern VOID f_init(), sig_die();
extern int MAIN__();
#define Int /* int */
#else
extern void f_init(void), sig_die(char*, int);
extern int MAIN__(void);
#define Int int
#endif
static VOID sigfdie(Sigarg)
{
Use_Sigarg;
sig_die("Floating Exception", 1);
}
static VOID sigidie(Sigarg)
{
Use_Sigarg;
sig_die("IOT Trap", 1);
}
#ifdef SIGQUIT
static VOID sigqdie(Sigarg)
{
Use_Sigarg;
sig_die("Quit signal", 1);
}
#endif
static VOID sigindie(Sigarg)
{
Use_Sigarg;
sig_die("Interrupt", 0);
}
static VOID sigtdie(Sigarg)
{
Use_Sigarg;
sig_die("Killed", 0);
}
#ifdef SIGTRAP
static VOID sigtrdie(Sigarg)
{
Use_Sigarg;
sig_die("Trace trap", 1);
}
#endif
int xargc;
char **xargv;
#ifdef __cplusplus
}
#endif
#ifdef KR_headers
main(argc, argv) int argc; char **argv;
#else
main(int argc, char **argv)
#endif
{
/*
This call was added for use within CSPICE. It did not appear in the
original main.c function.
*/
putcml_c ( argc, argv );
xargc = argc;
xargv = argv;
signal1(SIGFPE, sigfdie); /* ignore underflow, enable overflow */
#ifdef SIGIOT
signal1(SIGIOT, sigidie);
#endif
#ifdef SIGTRAP
signal1(SIGTRAP, sigtrdie);
#endif
#ifdef SIGQUIT
if(signal1(SIGQUIT,sigqdie) == SIG_IGN)
signal1(SIGQUIT, SIG_IGN);
#endif
if(signal1(SIGINT, sigindie) == SIG_IGN)
signal1(SIGINT, SIG_IGN);
signal1(SIGTERM,sigtdie);
#ifdef pdp11
ldfps(01200); /* detect overflow as an exception */
#endif
f_init();
#ifndef NO_ONEXIT
ONEXIT(f_exit);
#endif
MAIN__();
#ifdef NO_ONEXIT
f_exit();
#endif
exit(0); /* exit(0) rather than return(0) to bypass Cray bug */
return 0; /* For compilers that complain of missing return values; */
/* others will complain that this is unreachable code. */
}
File diff suppressed because it is too large Load Diff
-966
View File
@@ -1,966 +0,0 @@
/* disply.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* Table of constant values */
static doublereal c_b3 = 0.;
static integer c__1 = 1;
static integer c__3 = 3;
static integer c_b177 = 100000;
/* $Procedure DISPLY ( BRIEF Display Summary ) */
/* Subroutine */ int disply_(char *fmtpic, logical *tdsp, logical *gdsp,
logical *sdsp, logical *obnam, integer *objlis, char *winsym, integer
*winptr, doublereal *winval, char *timtyp, char *kertyp, ftnlen
fmtpic_len, ftnlen winsym_len, ftnlen timtyp_len, ftnlen kertyp_len)
{
/* System generated locals */
address a__1[3];
integer i__1, i__2, i__3[3], i__4, i__5;
/* Builtin functions */
integer s_cmp(char *, char *, ftnlen, ftnlen);
/* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen), s_cat(char *,
char **, integer *, integer *, ftnlen);
integer s_rnge(char *, integer, char *, integer);
/* Local variables */
static char name__[64];
static logical same;
static char line[132];
static integer nobj, objn[2], sobj, size;
static char rest[132];
static integer b, e, i__, j;
extern integer cardc_(char *, ftnlen);
static integer s;
extern /* Subroutine */ int chkin_(char *, ftnlen);
static char names[64*100006], sname[64];
static logical found;
extern integer rtrim_(char *, ftnlen);
static integer n1, n2;
static char p1[8], p2[8];
static integer start;
static logical group;
static doublereal sstop[1000000];
static integer objct2[3];
static char header[132*2], wd[8];
extern integer objact_(integer *);
extern /* Subroutine */ int maknam_(integer *, integer *, logical *, char
*, char *, ftnlen, ftnlen), appndc_(char *, char *, ftnlen,
ftnlen);
static integer object[3], remain;
extern /* Subroutine */ int objget_(integer *, integer *, integer *),
objrem_(integer *, integer *), orderd_(doublereal *, integer *,
integer *), reordd_(integer *, integer *, doublereal *), rmaini_(
integer *, integer *, integer *, integer *);
static char timlbl[8];
static integer iorder[1000000], npline;
extern /* Subroutine */ int objnth_(integer *, integer *, integer *,
logical *);
static doublereal filwin[100006];
static integer nlines, objtmp[2];
extern integer touchi_(integer *);
extern /* Subroutine */ int distim_(char *, doublereal *, char *, char *,
ftnlen, ftnlen, ftnlen);
static integer widest;
extern integer objsiz_(integer *);
static integer stotal;
extern /* Subroutine */ int chkout_(char *, ftnlen), nextwd_(char *, char
*, char *, ftnlen, ftnlen, ftnlen);
static integer ngroup;
extern /* Subroutine */ int objnxt_(integer *, integer *, integer *,
logical *), prname_(integer *, integer *, char *, char *, char *,
integer *, char *, char *, ftnlen, ftnlen, ftnlen, ftnlen, ftnlen)
, sygetd_(char *, char *, integer *, doublereal *, integer *,
doublereal *, logical *, ftnlen, ftnlen);
extern logical return_(void);
static doublereal sstart[1000000], lstwin[100006];
static char timstr[64];
extern /* Subroutine */ int writit_(char *, ftnlen), reordi_(integer *,
integer *, integer *), ssizec_(integer *, char *, ftnlen);
static logical fnd;
static integer obj[2], obj1[1000000], obj2[1000000];
/* $ Abstract */
/* Display BRIEF summary. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Required_Reading */
/* None. */
/* $ Keywords */
/* None. */
/* $ Declarations */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Author_and_Institution */
/* W.L. Taber (NAIF) */
/* B.V. Semenov (NAIF) */
/* $ Version */
/* - BRIEF Version 4.0.0, 08-SEP-2010 (BVS) */
/* Moved WINRM from main program to this include file. */
/* - BRIEF Version 3.0.0, 14-JAN-2008 (BVS) */
/* Increased MAXBOD to 100,000 (from 20,000). */
/* Increased CMDSIZ to 25,000 (from 4,000). */
/* Updated version string and changed its format to */
/* '#.#.#, Month DD, YYYY' (from '#.#.#'). */
/* - BRIEF Version 1.0.0, 14-MAR-1996 (WLT) */
/* Initial release. */
/* -& */
/* The Version is stored as a string. */
/* MAXUSE is the maximum number of bodies that can be explicitly */
/* specified on the command line for brief summaries. */
/* The longest command line that can be accommodated is */
/* given by CMDSIZ */
/* The maximum number of bodies that can be summarized is stored */
/* in the parameter MAXBOD */
/* The average number of intervals per body */
/* The largest expected window */
/* Room in the DP symbol table that holds all windows for all */
/* objects. */
/* End of inlcude file. */
/* $ Brief_I/O */
/* VARIABLE I/O DESCRIPTION */
/* -------- --- -------------------------------------------------- */
/* FMTPIC I Body name/ID format picture (see BRIEF.PGM) */
/* TDSP I Tabular display flag */
/* GDSP I Grouping display flag */
/* SDSP I Time-sorted tabular display flag */
/* OBNAM I Name ordering flag */
/* OBJLIS I List of object (?) */
/* WINSYM I Symbol table with object attributes (?) */
/* WINPTR I Symbol table with object attributes (?) */
/* WINVAL I Symbol table with object attributes (?) */
/* TIMTYP I Output time type (see DISTIM.FOR) */
/* KERTYP I Kernel type (SPK, PCK) */
/* $ Detailed_Input */
/* See Brief_I/O. */
/* $ Detailed_Output */
/* This routine return no outputs. Instead it prints summary of */
/* provided input information to STDOUT. */
/* $ Parameters */
/* LBCELL. */
/* $ Exceptions */
/* 1) Errors may be signaled by routines in the calling tree of */
/* this routine. */
/* $ Files */
/* TBD. */
/* $ Particulars */
/* TBD. */
/* $ Examples */
/* None. */
/* $ Restrictions */
/* This routine must not be called by any routines except BRIEF's */
/* main program. */
/* $ Literature_References */
/* None. */
/* $ Author_and_Institution */
/* B.V. Semenov (JPL) */
/* W.L. Taber (JPL) */
/* $ Version */
/* - BRIEF Version 3.0.0, 08-SEP-2010 (BVS) */
/* Added sorted-by-time tabular output (-s). Changed calling */
/* sequence: add sorted-by-time flag (SDSP). */
/* - BRIEF Version 2.0.0, 22-OCT-2007 (BVS) */
/* Added output time type to the argument list. Changed to */
/* call DISTIM to format output time and provide time system */
/* label for the summary table header. */
/* - BRIEF Version 1.0.0, 14-MAR-1996 (WLT) */
/* Bill's initial version. */
/* -& */
/* $ Index_Entries */
/* display summary by BRIEF */
/* -& */
/* SPICELIB functions */
/* Parameters */
/* Local Variables. */
/* SPICELIB Calls */
/* Saved variables */
/* The SAVE statement that appears here causes f2c to create */
/* local variables with static duration. This enables the CSPICE */
/* version of brief to run under cygwin. */
/* Standard SPICE error handling. */
if (return_()) {
return 0;
} else {
chkin_("DISPLY", (ftnlen)6);
}
/* Get time system label for the table header. */
distim_(timtyp, &c_b3, timlbl, timstr, timtyp_len, (ftnlen)8, (ftnlen)64);
/* Set local grouping flag. */
group = ! (*tdsp) || *gdsp;
/* First take apart the format picture to see what */
/* the various components are. */
nextwd_(fmtpic, p1, rest, fmtpic_len, (ftnlen)8, (ftnlen)132);
nextwd_(rest, wd, rest, (ftnlen)132, (ftnlen)8, (ftnlen)132);
nextwd_(rest, p2, rest, (ftnlen)132, (ftnlen)8, (ftnlen)132);
size = 1;
if (s_cmp(p2, " ", (ftnlen)8, (ftnlen)1) != 0) {
size = 3;
}
/* Find out the width of the widest name. */
nobj = objact_(objlis);
sobj = objsiz_(objlis);
/* If we don't have any objects to display then */
/* we just return. */
if (nobj == 0) {
chkout_("DISPLY", (ftnlen)6);
return 0;
}
objnth_(objlis, &c__1, obj, &found);
widest = 0;
while(found) {
objget_(obj, objlis, object);
objnxt_(obj, objlis, objn, &found);
prname_(object, &sobj, p1, wd, p2, &size, kertyp, name__, (ftnlen)8, (
ftnlen)8, (ftnlen)8, kertyp_len, (ftnlen)64);
/* Computing MAX */
i__1 = widest, i__2 = rtrim_(name__, (ftnlen)64);
widest = max(i__1,i__2);
obj[0] = objn[0];
obj[1] = objn[1];
}
/* Are we going to group by or sort by time window? If not, this is */
/* pretty easy. Just display tabular output. */
if (*tdsp && ! (*gdsp) && ! (*sdsp)) {
s = widest + 3;
e = s + 32;
if (s_cmp(kertyp, "SPK", kertyp_len, (ftnlen)3) == 0) {
s_copy(line, "Bodies", (ftnlen)132, (ftnlen)6);
} else if (s_cmp(kertyp, "PCK", kertyp_len, (ftnlen)3) == 0) {
s_copy(line, "Frames", (ftnlen)132, (ftnlen)6);
} else {
s_copy(line, "IDs", (ftnlen)132, (ftnlen)3);
}
/* Writing concatenation */
i__3[0] = 19, a__1[0] = "Start of Interval (";
i__3[1] = rtrim_(timlbl, (ftnlen)8), a__1[1] = timlbl;
i__3[2] = 1, a__1[2] = ")";
s_cat(line + (s - 1), a__1, i__3, &c__3, 132 - (s - 1));
/* Writing concatenation */
i__3[0] = 17, a__1[0] = "End of Interval (";
i__3[1] = rtrim_(timlbl, (ftnlen)8), a__1[1] = timlbl;
i__3[2] = 1, a__1[2] = ")";
s_cat(line + (e - 1), a__1, i__3, &c__3, 132 - (e - 1));
writit_(line, (ftnlen)132);
s_copy(line, "-------", (ftnlen)132, (ftnlen)7);
s_copy(line + (s - 1), "-----------------------------", 132 - (s - 1),
(ftnlen)29);
s_copy(line + (e - 1), "-----------------------------", 132 - (e - 1),
(ftnlen)29);
writit_(line, (ftnlen)132);
objnth_(objlis, &c__1, obj, &found);
n1 = 0;
while(found) {
s_copy(line, " ", (ftnlen)132, (ftnlen)1);
objget_(obj, objlis, object);
prname_(object, &sobj, p1, wd, p2, &size, kertyp, line, (ftnlen)8,
(ftnlen)8, (ftnlen)8, kertyp_len, (ftnlen)132);
maknam_(object, &sobj, obnam, kertyp, name__, kertyp_len, (ftnlen)
64);
sygetd_(name__, winsym, winptr, winval, &n2, &filwin[6], &found, (
ftnlen)64, winsym_len);
if (n2 == n1) {
same = TRUE_;
i__ = 1;
while(same && i__ <= n1) {
same = filwin[(i__1 = i__ + 5) < 100006 && 0 <= i__1 ?
i__1 : s_rnge("filwin", i__1, "disply_", (ftnlen)
359)] == lstwin[(i__2 = i__ + 5) < 100006 && 0 <=
i__2 ? i__2 : s_rnge("lstwin", i__2, "disply_", (
ftnlen)359)];
++i__;
}
} else {
same = FALSE_;
}
if (! same) {
i__1 = n2;
for (i__ = 1; i__ <= i__1; i__ += 2) {
distim_(timtyp, &filwin[(i__2 = i__ + 5) < 100006 && 0 <=
i__2 ? i__2 : s_rnge("filwin", i__2, "disply_", (
ftnlen)371)], timlbl, line + (s - 1), timtyp_len,
(ftnlen)8, 132 - (s - 1));
distim_(timtyp, &filwin[(i__2 = i__ + 6) < 100006 && 0 <=
i__2 ? i__2 : s_rnge("filwin", i__2, "disply_", (
ftnlen)372)], timlbl, line + (e - 1), timtyp_len,
(ftnlen)8, 132 - (e - 1));
writit_(line, (ftnlen)132);
s_copy(line, " ", (ftnlen)132, (ftnlen)1);
lstwin[(i__2 = i__ + 5) < 100006 && 0 <= i__2 ? i__2 :
s_rnge("lstwin", i__2, "disply_", (ftnlen)375)] =
filwin[(i__4 = i__ + 5) < 100006 && 0 <= i__4 ?
i__4 : s_rnge("filwin", i__4, "disply_", (ftnlen)
375)];
lstwin[(i__2 = i__ + 6) < 100006 && 0 <= i__2 ? i__2 :
s_rnge("lstwin", i__2, "disply_", (ftnlen)376)] =
filwin[(i__4 = i__ + 6) < 100006 && 0 <= i__4 ?
i__4 : s_rnge("filwin", i__4, "disply_", (ftnlen)
376)];
n1 = n2;
}
} else {
i__1 = s + 11;
s_copy(line + i__1, "Same coverage as previous object ", 132
- i__1, (ftnlen)33);
writit_(line, (ftnlen)132);
}
objnxt_(obj, objlis, objtmp, &found);
obj[0] = touchi_(objtmp);
obj[1] = touchi_(&objtmp[1]);
}
/* Were we asked to do tabular output sorted by start time for each */
/* SPK body or PCK frame? */
} else if (*tdsp && *sdsp) {
s = widest + 3;
e = s + 32;
if (s_cmp(kertyp, "SPK", kertyp_len, (ftnlen)3) == 0) {
s_copy(line, "Bodies", (ftnlen)132, (ftnlen)6);
} else if (s_cmp(kertyp, "PCK", kertyp_len, (ftnlen)3) == 0) {
s_copy(line, "Frames", (ftnlen)132, (ftnlen)6);
} else {
s_copy(line, "IDs", (ftnlen)132, (ftnlen)3);
}
/* Writing concatenation */
i__3[0] = 19, a__1[0] = "Start of Interval (";
i__3[1] = rtrim_(timlbl, (ftnlen)8), a__1[1] = timlbl;
i__3[2] = 1, a__1[2] = ")";
s_cat(line + (s - 1), a__1, i__3, &c__3, 132 - (s - 1));
/* Writing concatenation */
i__3[0] = 17, a__1[0] = "End of Interval (";
i__3[1] = rtrim_(timlbl, (ftnlen)8), a__1[1] = timlbl;
i__3[2] = 1, a__1[2] = ")";
s_cat(line + (e - 1), a__1, i__3, &c__3, 132 - (e - 1));
writit_(line, (ftnlen)132);
s_copy(line, "-------", (ftnlen)132, (ftnlen)7);
s_copy(line + (s - 1), "-----------------------------", 132 - (s - 1),
(ftnlen)29);
s_copy(line + (e - 1), "-----------------------------", 132 - (e - 1),
(ftnlen)29);
writit_(line, (ftnlen)132);
objnth_(objlis, &c__1, obj, &found);
n1 = 0;
while(found) {
/* Get and buffer individual coverage intervals for this */
/* object. */
objget_(obj, objlis, object);
maknam_(object, &sobj, obnam, kertyp, name__, kertyp_len, (ftnlen)
64);
sygetd_(name__, winsym, winptr, winval, &n2, &filwin[6], &found, (
ftnlen)64, winsym_len);
stotal = 0;
i__1 = n2;
for (i__ = 1; i__ <= i__1; i__ += 2) {
++stotal;
obj1[(i__2 = stotal - 1) < 1000000 && 0 <= i__2 ? i__2 :
s_rnge("obj1", i__2, "disply_", (ftnlen)443)] = obj[0]
;
obj2[(i__2 = stotal - 1) < 1000000 && 0 <= i__2 ? i__2 :
s_rnge("obj2", i__2, "disply_", (ftnlen)444)] = obj[1]
;
sstart[(i__2 = stotal - 1) < 1000000 && 0 <= i__2 ? i__2 :
s_rnge("sstart", i__2, "disply_", (ftnlen)445)] =
filwin[(i__4 = i__ + 5) < 100006 && 0 <= i__4 ? i__4 :
s_rnge("filwin", i__4, "disply_", (ftnlen)445)];
sstop[(i__2 = stotal - 1) < 1000000 && 0 <= i__2 ? i__2 :
s_rnge("sstop", i__2, "disply_", (ftnlen)446)] =
filwin[(i__4 = i__ + 6) < 100006 && 0 <= i__4 ? i__4 :
s_rnge("filwin", i__4, "disply_", (ftnlen)446)];
}
/* Buffer coverage intervals for subsequent objects as long as */
/* these objects have the same ID or we run out of objects. */
objnxt_(obj, objlis, objtmp, &found);
while(found) {
objget_(objtmp, objlis, objct2);
if (object[0] == objct2[0]) {
obj[0] = objtmp[0];
obj[1] = objtmp[1];
objget_(obj, objlis, object);
maknam_(object, &sobj, obnam, kertyp, name__, kertyp_len,
(ftnlen)64);
sygetd_(name__, winsym, winptr, winval, &n2, &filwin[6], &
found, (ftnlen)64, winsym_len);
i__1 = n2;
for (i__ = 1; i__ <= i__1; i__ += 2) {
++stotal;
obj1[(i__2 = stotal - 1) < 1000000 && 0 <= i__2 ?
i__2 : s_rnge("obj1", i__2, "disply_", (
ftnlen)472)] = obj[0];
obj2[(i__2 = stotal - 1) < 1000000 && 0 <= i__2 ?
i__2 : s_rnge("obj2", i__2, "disply_", (
ftnlen)473)] = obj[1];
sstart[(i__2 = stotal - 1) < 1000000 && 0 <= i__2 ?
i__2 : s_rnge("sstart", i__2, "disply_", (
ftnlen)474)] = filwin[(i__4 = i__ + 5) <
100006 && 0 <= i__4 ? i__4 : s_rnge("filwin",
i__4, "disply_", (ftnlen)474)];
sstop[(i__2 = stotal - 1) < 1000000 && 0 <= i__2 ?
i__2 : s_rnge("sstop", i__2, "disply_", (
ftnlen)475)] = filwin[(i__4 = i__ + 6) <
100006 && 0 <= i__4 ? i__4 : s_rnge("filwin",
i__4, "disply_", (ftnlen)475)];
}
objnxt_(obj, objlis, objtmp, &found);
} else {
found = FALSE_;
}
}
/* Re-order buffered information by start time. */
orderd_(sstart, &stotal, iorder);
reordi_(iorder, &stotal, obj1);
reordi_(iorder, &stotal, obj2);
reordd_(iorder, &stotal, sstart);
reordd_(iorder, &stotal, sstop);
/* Loop through the buffer and print its contents. */
j = 1;
objtmp[0] = obj1[(i__1 = j - 1) < 1000000 && 0 <= i__1 ? i__1 :
s_rnge("obj1", i__1, "disply_", (ftnlen)500)];
objtmp[1] = obj2[(i__1 = j - 1) < 1000000 && 0 <= i__1 ? i__1 :
s_rnge("obj2", i__1, "disply_", (ftnlen)501)];
objget_(objtmp, objlis, object);
prname_(object, &sobj, p1, wd, p2, &size, kertyp, line, (ftnlen)8,
(ftnlen)8, (ftnlen)8, kertyp_len, (ftnlen)132);
filwin[6] = sstart[(i__1 = j - 1) < 1000000 && 0 <= i__1 ? i__1 :
s_rnge("sstart", i__1, "disply_", (ftnlen)504)];
filwin[7] = sstop[(i__1 = j - 1) < 1000000 && 0 <= i__1 ? i__1 :
s_rnge("sstop", i__1, "disply_", (ftnlen)505)];
n2 = 2;
j = 2;
while(j <= stotal) {
objtmp[0] = obj1[(i__1 = j - 1) < 1000000 && 0 <= i__1 ? i__1
: s_rnge("obj1", i__1, "disply_", (ftnlen)511)];
objtmp[1] = obj2[(i__1 = j - 1) < 1000000 && 0 <= i__1 ? i__1
: s_rnge("obj2", i__1, "disply_", (ftnlen)512)];
objget_(objtmp, objlis, object);
prname_(object, &sobj, p1, wd, p2, &size, kertyp, sname, (
ftnlen)8, (ftnlen)8, (ftnlen)8, kertyp_len, (ftnlen)
64);
if (s_cmp(line, sname, (ftnlen)132, (ftnlen)64) != 0) {
if (n2 == n1) {
same = TRUE_;
i__ = 1;
while(same && i__ <= n1) {
same = filwin[(i__1 = i__ + 5) < 100006 && 0 <=
i__1 ? i__1 : s_rnge("filwin", i__1,
"disply_", (ftnlen)524)] == lstwin[(i__2 =
i__ + 5) < 100006 && 0 <= i__2 ? i__2 :
s_rnge("lstwin", i__2, "disply_", (ftnlen)
524)];
++i__;
}
} else {
same = FALSE_;
}
if (! same) {
i__1 = n2;
for (i__ = 1; i__ <= i__1; i__ += 2) {
distim_(timtyp, &filwin[(i__2 = i__ + 5) < 100006
&& 0 <= i__2 ? i__2 : s_rnge("filwin",
i__2, "disply_", (ftnlen)535)], timlbl,
line + (s - 1), timtyp_len, (ftnlen)8,
132 - (s - 1));
distim_(timtyp, &filwin[(i__2 = i__ + 6) < 100006
&& 0 <= i__2 ? i__2 : s_rnge("filwin",
i__2, "disply_", (ftnlen)537)], timlbl,
line + (e - 1), timtyp_len, (ftnlen)8,
132 - (e - 1));
writit_(line, (ftnlen)132);
s_copy(line, " ", (ftnlen)132, (ftnlen)1);
lstwin[(i__2 = i__ + 5) < 100006 && 0 <= i__2 ?
i__2 : s_rnge("lstwin", i__2, "disply_", (
ftnlen)541)] = filwin[(i__4 = i__ + 5) <
100006 && 0 <= i__4 ? i__4 : s_rnge("fil"
"win", i__4, "disply_", (ftnlen)541)];
lstwin[(i__2 = i__ + 6) < 100006 && 0 <= i__2 ?
i__2 : s_rnge("lstwin", i__2, "disply_", (
ftnlen)542)] = filwin[(i__4 = i__ + 6) <
100006 && 0 <= i__4 ? i__4 : s_rnge("fil"
"win", i__4, "disply_", (ftnlen)542)];
n1 = n2;
}
} else {
i__1 = s + 11;
s_copy(line + i__1, "Same coverage as previous objec"
"t ", 132 - i__1, (ftnlen)33);
writit_(line, (ftnlen)132);
}
s_copy(line, sname, (ftnlen)132, (ftnlen)64);
filwin[6] = sstart[(i__1 = j - 1) < 1000000 && 0 <= i__1 ?
i__1 : s_rnge("sstart", i__1, "disply_", (ftnlen)
554)];
filwin[7] = sstop[(i__1 = j - 1) < 1000000 && 0 <= i__1 ?
i__1 : s_rnge("sstop", i__1, "disply_", (ftnlen)
555)];
n2 = 2;
} else {
filwin[(i__1 = n2 + 6) < 100006 && 0 <= i__1 ? i__1 :
s_rnge("filwin", i__1, "disply_", (ftnlen)560)] =
sstart[(i__2 = j - 1) < 1000000 && 0 <= i__2 ?
i__2 : s_rnge("sstart", i__2, "disply_", (ftnlen)
560)];
filwin[(i__1 = n2 + 7) < 100006 && 0 <= i__1 ? i__1 :
s_rnge("filwin", i__1, "disply_", (ftnlen)561)] =
sstop[(i__2 = j - 1) < 1000000 && 0 <= i__2 ?
i__2 : s_rnge("sstop", i__2, "disply_", (ftnlen)
561)];
n2 += 2;
}
++j;
}
/* Print information for the last object from the buffered */
/* set. */
if (n2 == n1) {
same = TRUE_;
i__ = 1;
while(same && i__ <= n1) {
same = filwin[(i__1 = i__ + 5) < 100006 && 0 <= i__1 ?
i__1 : s_rnge("filwin", i__1, "disply_", (ftnlen)
579)] == lstwin[(i__2 = i__ + 5) < 100006 && 0 <=
i__2 ? i__2 : s_rnge("lstwin", i__2, "disply_", (
ftnlen)579)];
++i__;
}
} else {
same = FALSE_;
}
if (! same) {
i__1 = n2;
for (i__ = 1; i__ <= i__1; i__ += 2) {
distim_(timtyp, &filwin[(i__2 = i__ + 5) < 100006 && 0 <=
i__2 ? i__2 : s_rnge("filwin", i__2, "disply_", (
ftnlen)590)], timlbl, line + (s - 1), timtyp_len,
(ftnlen)8, 132 - (s - 1));
distim_(timtyp, &filwin[(i__2 = i__ + 6) < 100006 && 0 <=
i__2 ? i__2 : s_rnge("filwin", i__2, "disply_", (
ftnlen)591)], timlbl, line + (e - 1), timtyp_len,
(ftnlen)8, 132 - (e - 1));
writit_(line, (ftnlen)132);
s_copy(line, " ", (ftnlen)132, (ftnlen)1);
lstwin[(i__2 = i__ + 5) < 100006 && 0 <= i__2 ? i__2 :
s_rnge("lstwin", i__2, "disply_", (ftnlen)594)] =
filwin[(i__4 = i__ + 5) < 100006 && 0 <= i__4 ?
i__4 : s_rnge("filwin", i__4, "disply_", (ftnlen)
594)];
lstwin[(i__2 = i__ + 6) < 100006 && 0 <= i__2 ? i__2 :
s_rnge("lstwin", i__2, "disply_", (ftnlen)595)] =
filwin[(i__4 = i__ + 6) < 100006 && 0 <= i__4 ?
i__4 : s_rnge("filwin", i__4, "disply_", (ftnlen)
595)];
n1 = n2;
}
} else {
i__1 = s + 11;
s_copy(line + i__1, "Same coverage as previous object ", 132
- i__1, (ftnlen)33);
writit_(line, (ftnlen)132);
}
/* Move onto the next object. */
objnxt_(obj, objlis, objtmp, &found);
obj[0] = touchi_(objtmp);
obj[1] = touchi_(&objtmp[1]);
}
/* Were we asked to do tabular output grouped by similar coverages? */
} else if (*tdsp && *gdsp) {
s = widest + 3;
e = s + 32;
if (s_cmp(kertyp, "SPK", kertyp_len, (ftnlen)3) == 0) {
s_copy(line, "Bodies", (ftnlen)132, (ftnlen)6);
} else if (s_cmp(kertyp, "PCK", kertyp_len, (ftnlen)3) == 0) {
s_copy(line, "Frames", (ftnlen)132, (ftnlen)6);
} else {
s_copy(line, "IDs", (ftnlen)132, (ftnlen)3);
}
/* Writing concatenation */
i__3[0] = 19, a__1[0] = "Start of Interval (";
i__3[1] = rtrim_(timlbl, (ftnlen)8), a__1[1] = timlbl;
i__3[2] = 1, a__1[2] = ")";
s_cat(line + (s - 1), a__1, i__3, &c__3, 132 - (s - 1));
/* Writing concatenation */
i__3[0] = 17, a__1[0] = "End of Interval (";
i__3[1] = rtrim_(timlbl, (ftnlen)8), a__1[1] = timlbl;
i__3[2] = 1, a__1[2] = ")";
s_cat(line + (e - 1), a__1, i__3, &c__3, 132 - (e - 1));
writit_(line, (ftnlen)132);
s_copy(line, "-------", (ftnlen)132, (ftnlen)7);
s_copy(line + (s - 1), "-----------------------------", 132 - (s - 1),
(ftnlen)29);
s_copy(line + (e - 1), "-----------------------------", 132 - (e - 1),
(ftnlen)29);
writit_(line, (ftnlen)132);
objnth_(objlis, &c__1, obj, &found);
while(found) {
s_copy(line, " ", (ftnlen)132, (ftnlen)1);
objget_(obj, objlis, object);
prname_(object, &sobj, p1, wd, p2, &size, kertyp, line, (ftnlen)8,
(ftnlen)8, (ftnlen)8, kertyp_len, (ftnlen)132);
maknam_(object, &sobj, obnam, kertyp, name__, kertyp_len, (ftnlen)
64);
sygetd_(name__, winsym, winptr, winval, &n1, &filwin[6], &found, (
ftnlen)64, winsym_len);
i__1 = n1;
for (i__ = 1; i__ <= i__1; i__ += 2) {
distim_(timtyp, &filwin[(i__2 = i__ + 5) < 100006 && 0 <=
i__2 ? i__2 : s_rnge("filwin", i__2, "disply_", (
ftnlen)659)], timlbl, line + (s - 1), timtyp_len, (
ftnlen)8, 132 - (s - 1));
distim_(timtyp, &filwin[(i__2 = i__ + 6) < 100006 && 0 <=
i__2 ? i__2 : s_rnge("filwin", i__2, "disply_", (
ftnlen)660)], timlbl, line + (e - 1), timtyp_len, (
ftnlen)8, 132 - (e - 1));
writit_(line, (ftnlen)132);
s_copy(line, " ", (ftnlen)132, (ftnlen)1);
lstwin[(i__2 = i__ + 5) < 100006 && 0 <= i__2 ? i__2 : s_rnge(
"lstwin", i__2, "disply_", (ftnlen)663)] = filwin[(
i__4 = i__ + 5) < 100006 && 0 <= i__4 ? i__4 : s_rnge(
"filwin", i__4, "disply_", (ftnlen)663)];
lstwin[(i__2 = i__ + 6) < 100006 && 0 <= i__2 ? i__2 : s_rnge(
"lstwin", i__2, "disply_", (ftnlen)664)] = filwin[(
i__4 = i__ + 6) < 100006 && 0 <= i__4 ? i__4 : s_rnge(
"filwin", i__4, "disply_", (ftnlen)664)];
}
objnxt_(obj, objlis, objn, &fnd);
objrem_(obj, objlis);
obj[0] = objn[0];
obj[1] = objn[1];
while(fnd) {
s_copy(line, " ", (ftnlen)132, (ftnlen)1);
objget_(obj, objlis, object);
prname_(object, &sobj, p1, wd, p2, &size, kertyp, line, (
ftnlen)8, (ftnlen)8, (ftnlen)8, kertyp_len, (ftnlen)
132);
maknam_(object, &sobj, obnam, kertyp, name__, kertyp_len, (
ftnlen)64);
sygetd_(name__, winsym, winptr, winval, &n2, &filwin[6], &
found, (ftnlen)64, winsym_len);
if (n2 == n1) {
same = TRUE_;
i__ = 1;
while(same && i__ <= n1) {
same = filwin[(i__1 = i__ + 5) < 100006 && 0 <= i__1 ?
i__1 : s_rnge("filwin", i__1, "disply_", (
ftnlen)688)] == lstwin[(i__2 = i__ + 5) <
100006 && 0 <= i__2 ? i__2 : s_rnge("lstwin",
i__2, "disply_", (ftnlen)688)];
++i__;
}
} else {
same = FALSE_;
}
if (same) {
i__1 = s + 11;
s_copy(line + i__1, "Same coverage as previous object ",
132 - i__1, (ftnlen)33);
writit_(line, (ftnlen)132);
}
objnxt_(obj, objlis, objn, &fnd);
if (same) {
objrem_(obj, objlis);
}
obj[0] = objn[0];
obj[1] = objn[1];
}
objnth_(objlis, &c__1, obj, &found);
}
/* We were not asked to do tabular output. So do a regular one. */
} else {
objnth_(objlis, &c__1, obj, &found);
while(found) {
ssizec_(&c_b177, names, (ftnlen)64);
objget_(obj, objlis, object);
prname_(object, &sobj, p1, wd, p2, &size, kertyp, name__, (ftnlen)
8, (ftnlen)8, (ftnlen)8, kertyp_len, (ftnlen)64);
appndc_(name__, names, (ftnlen)64, (ftnlen)64);
/* Look up the window associated with this object. */
maknam_(object, &sobj, obnam, kertyp, name__, kertyp_len, (ftnlen)
64);
sygetd_(name__, winsym, winptr, winval, &n1, &lstwin[6], &fnd, (
ftnlen)64, winsym_len);
/* Fetch the next object. */
objnxt_(obj, objlis, objn, &fnd);
objrem_(obj, objlis);
obj[0] = objn[0];
obj[1] = objn[1];
while(fnd) {
objget_(obj, objlis, object);
maknam_(object, &sobj, obnam, kertyp, name__, kertyp_len, (
ftnlen)64);
sygetd_(name__, winsym, winptr, winval, &n2, &filwin[6], &fnd,
(ftnlen)64, winsym_len);
/* See if this window is the same as the current */
/* window under considerations. */
if (n1 == n2) {
same = TRUE_;
i__ = 1;
while(same && i__ <= n1) {
same = filwin[(i__1 = i__ + 5) < 100006 && 0 <= i__1 ?
i__1 : s_rnge("filwin", i__1, "disply_", (
ftnlen)766)] == lstwin[(i__2 = i__ + 5) <
100006 && 0 <= i__2 ? i__2 : s_rnge("lstwin",
i__2, "disply_", (ftnlen)766)];
++i__;
}
} else {
same = FALSE_;
}
objnxt_(obj, objlis, objn, &fnd);
if (same) {
objrem_(obj, objlis);
prname_(object, &sobj, p1, wd, p2, &size, kertyp, name__,
(ftnlen)8, (ftnlen)8, (ftnlen)8, kertyp_len, (
ftnlen)64);
appndc_(name__, names, (ftnlen)64, (ftnlen)64);
}
obj[0] = objn[0];
obj[1] = objn[1];
}
ngroup = cardc_(names, (ftnlen)64);
if (ngroup == 1) {
if (s_cmp(kertyp, "SPK", kertyp_len, (ftnlen)3) == 0) {
s_copy(line, "Body: ", (ftnlen)132, (ftnlen)6);
start = 7;
} else if (s_cmp(kertyp, "PCK", kertyp_len, (ftnlen)3) == 0) {
s_copy(line, "Frame: ", (ftnlen)132, (ftnlen)7);
start = 8;
} else {
s_copy(line, "ID: ", (ftnlen)132, (ftnlen)4);
start = 5;
}
} else {
if (s_cmp(kertyp, "SPK", kertyp_len, (ftnlen)3) == 0) {
s_copy(line, "Bodies: ", (ftnlen)132, (ftnlen)8);
start = 9;
} else if (s_cmp(kertyp, "PCK", kertyp_len, (ftnlen)3) == 0) {
s_copy(line, "Frames: ", (ftnlen)132, (ftnlen)8);
start = 9;
} else {
s_copy(line, "IDs: ", (ftnlen)132, (ftnlen)5);
start = 6;
}
}
npline = (80 - widest - start) / (widest + 2) + 1;
rmaini_(&ngroup, &npline, &nlines, &remain);
if (remain != 0) {
++nlines;
}
i__1 = nlines;
for (j = 1; j <= i__1; ++j) {
b = start;
i__2 = ngroup;
i__4 = nlines;
for (i__ = j; i__4 < 0 ? i__ >= i__2 : i__ <= i__2; i__ +=
i__4) {
s_copy(line + (b - 1), names + (((i__5 = i__ + 5) <
100006 && 0 <= i__5 ? i__5 : s_rnge("names", i__5,
"disply_", (ftnlen)826)) << 6), 132 - (b - 1), (
ftnlen)64);
b = b + widest + 2;
}
writit_(line, (ftnlen)132);
s_copy(line, " ", (ftnlen)132, (ftnlen)1);
}
s = start;
e = start + 36;
s_copy(header, " ", (ftnlen)132, (ftnlen)1);
s_copy(header + 132, " ", (ftnlen)132, (ftnlen)1);
/* Writing concatenation */
i__3[0] = 19, a__1[0] = "Start of Interval (";
i__3[1] = rtrim_(timlbl, (ftnlen)8), a__1[1] = timlbl;
i__3[2] = 1, a__1[2] = ")";
s_cat(header + (s - 1), a__1, i__3, &c__3, 132 - (s - 1));
/* Writing concatenation */
i__3[0] = 17, a__1[0] = "End of Interval (";
i__3[1] = rtrim_(timlbl, (ftnlen)8), a__1[1] = timlbl;
i__3[2] = 1, a__1[2] = ")";
s_cat(header + (e - 1), a__1, i__3, &c__3, 132 - (e - 1));
s_copy(header + (s + 131), "-----------------------------", 132 -
(s - 1), (ftnlen)29);
s_copy(header + (e + 131), "-----------------------------", 132 -
(e - 1), (ftnlen)29);
writit_(header, (ftnlen)132);
writit_(header + 132, (ftnlen)132);
i__1 = n1;
for (i__ = 1; i__ <= i__1; i__ += 2) {
s_copy(line, " ", (ftnlen)132, (ftnlen)1);
distim_(timtyp, &lstwin[(i__4 = i__ + 5) < 100006 && 0 <=
i__4 ? i__4 : s_rnge("lstwin", i__4, "disply_", (
ftnlen)854)], timlbl, line + (s - 1), timtyp_len, (
ftnlen)8, 132 - (s - 1));
distim_(timtyp, &lstwin[(i__4 = i__ + 6) < 100006 && 0 <=
i__4 ? i__4 : s_rnge("lstwin", i__4, "disply_", (
ftnlen)855)], timlbl, line + (e - 1), timtyp_len, (
ftnlen)8, 132 - (e - 1));
writit_(line, (ftnlen)132);
}
writit_(" ", (ftnlen)1);
objnth_(objlis, &c__1, obj, &found);
}
}
/* All done. */
chkout_("DISPLY", (ftnlen)6);
return 0;
} /* disply_ */
-206
View File
@@ -1,206 +0,0 @@
/* distim.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* $Procedure DISTIM ( Format Time for Displaying by BRIEF ) */
/* Subroutine */ int distim_(char *timtyp, doublereal *et, char *timlbl, char
*timstr, ftnlen timtyp_len, ftnlen timlbl_len, ftnlen timstr_len)
{
/* Builtin functions */
integer s_cmp(char *, char *, ftnlen, ftnlen);
/* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
/* Local variables */
extern /* Subroutine */ int etcal_(doublereal *, char *, ftnlen), chkin_(
char *, ftnlen), errch_(char *, char *, ftnlen, ftnlen), dpfmt_(
doublereal *, char *, char *, ftnlen, ftnlen), sigerr_(char *,
ftnlen), chkout_(char *, ftnlen), setmsg_(char *, ftnlen);
extern logical return_(void);
extern /* Subroutine */ int timout_(doublereal *, char *, char *, ftnlen,
ftnlen);
/* $ Abstract */
/* Format time for displaying by BRIEF. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Required_Reading */
/* None. */
/* $ Keywords */
/* KERNEL */
/* UTILITY */
/* $ Declarations */
/* $ Brief_I/O */
/* VARIABLE I/O DESCRIPTION */
/* -------- --- -------------------------------------------------- */
/* TIMTYP I Desired output format */
/* ET I ET to be formatted */
/* TIMLBL O Label for BRIEF table heading. */
/* TIMSTR O Output time string. */
/* $ Detailed_Input */
/* TIMTYP is the desired output format type: ETCAL, UTCCAL, */
/* UTCDOY, or ETSEC. */
/* ET is the input ET seconds past J2000 to be formatted. */
/* $ Detailed_Output */
/* TIMLBL is the label for BRIEF table heading. */
/* TIMSTR is the output time string. */
/* $ Parameters */
/* The output format pictures for TIMOUT and DPFMT are provided */
/* using parameters UCLPIC, UDYPIC, and ESCPIC. */
/* $ Exceptions */
/* 1) If the desired output time type is not recognized, then the */
/* error SPICE(BADTIMEFORMAT) is signaled. */
/* 2) If required LSK data are not loaded an error will be signaled */
/* by routines in the calling tree of this routine. */
/* $ Files */
/* An LSK file must be loaded prior to calling this routine. */
/* $ Particulars */
/* The following label and time string will be returned for each */
/* of the allowed time formats: */
/* ETCAL: */
/* TIMLBL = 'ET' */
/* TIMSTR returned by ETCAL */
/* UTCCAL: */
/* TIMLBL = 'UTC' */
/* TIMSTR returned by TIMOUT in */
/* 'YYYY-MON-DD HR:MN:SC.###' format */
/* UTCDOY: */
/* TIMLBL = 'UTC' */
/* TIMSTR returned by TIMOUT in */
/* 'YYYY-DOY // HR:MN:SC.###' format */
/* ETSEC: */
/* TIMLBL = 'ET' */
/* TIMSTR returned by DPFMT in */
/* 'xxxxxxxxxxxxxxxxx.xxxxxx' format */
/* $ Examples */
/* None. */
/* $ Restrictions */
/* This routine must not be called by any routines except BRIEF's */
/* DISPLY routine. */
/* $ Literature_References */
/* None. */
/* $ Author_and_Institution */
/* B.V. Semenov (JPL) */
/* $ Version */
/* - BRIEF Version 1.0.0, 22-OCT-2007 (BVS) */
/* -& */
/* $ Index_Entries */
/* format time for display by BRIEF */
/* -& */
/* SPICELIB functions */
/* Local parameters. */
/* Output format pictures. */
/* Standard SPICE error handling. */
if (return_()) {
return 0;
} else {
chkin_("DISTIM", (ftnlen)6);
}
/* Set outputs. */
if (s_cmp(timtyp, "ETCAL", timtyp_len, (ftnlen)5) == 0) {
s_copy(timlbl, "ET", timlbl_len, (ftnlen)2);
etcal_(et, timstr, timstr_len);
} else if (s_cmp(timtyp, "UTCCAL", timtyp_len, (ftnlen)6) == 0) {
s_copy(timlbl, "UTC", timlbl_len, (ftnlen)3);
timout_(et, "YYYY-MON-DD HR:MN:SC.###", timstr, (ftnlen)24,
timstr_len);
} else if (s_cmp(timtyp, "UTCDOY", timtyp_len, (ftnlen)6) == 0) {
s_copy(timlbl, "UTC", timlbl_len, (ftnlen)3);
timout_(et, "YYYY-DOY // HR:MN:SC.###", timstr, (ftnlen)24,
timstr_len);
} else if (s_cmp(timtyp, "ETSEC", timtyp_len, (ftnlen)5) == 0) {
s_copy(timlbl, "ET", timlbl_len, (ftnlen)2);
dpfmt_(et, "xxxxxxxxxxxxxxxxx.xxxxxx", timstr, (ftnlen)24, timstr_len)
;
} else {
setmsg_("Time type '#' is not recognized.", (ftnlen)32);
errch_("#", timtyp, (ftnlen)1, timtyp_len);
sigerr_("SPICE(BADTIMEFORMAT)", (ftnlen)20);
chkout_("DISTIM", (ftnlen)6);
return 0;
}
/* All done. */
chkout_("DISTIM", (ftnlen)6);
return 0;
} /* distim_ */
-683
View File
@@ -1,683 +0,0 @@
/*
-Header_File f2c.h ( CSPICE version of the f2c standard header file )
-Abstract
Perform standard f2c declarations, customized for the host
environment.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Particulars
The standard f2c header file f2c.h must be included by every function
generated by running f2c on Fortran source code. The header f2c.h
includes typedefs used to provide a level of indirection in mapping
Fortran data types to native C data types. For example, Fortran
INTEGER variables are mapped to variables of type integer, where
integer is a C typedef. In the standard f2c.h header, the typedef
integer translates to the C type long.
Because the standard version of f2c.h does not work on all platforms,
this header file contains two platform-dependent versions of it,
meant to be selected at build time via precompiler switches. The
precompiler switches reference macros defined in SpiceZpl.h to
determine for which host platform the code is targeted. The first
version of f2c.h, which works on most platforms, is copied directly
from the standard version of f2c.h. The second version is intended
for use on the DEC Alpha running Digital Unix and the Sun/Solaris
platform using 64 bit mode and running gcc. On those systems, longs
occupy 8 bytes, as do doubles. Because the Fortran standard requires
that INTEGERS occupy half the storage of DOUBLE PRECISION numbers,
INTEGERS should be mapped to 4-byte ints rather than 8-byte longs
on the platforms having 8-byte longs. In order to achieve this, the
header f2c.h was transformed using the sed command
sed 's/long //' f2c.h
The high-level structure of this file is then:
# if ( defined(CSPICE_ALPHA_DIGITAL_UNIX ) \
|| defined(CSPICE_SUN_SOLARIS_64BIT_GCC ) )
[ Alpha/Digital Unix and Sun Solaris 64 bit mode/gcc
version of f2c.h source code ]
# else
[ Standard version of f2c.h source code ]
# endif
-Restrictions
1) This header file must be updated whenever the f2c processor
or the f2c libraries libI77 and libF77 are updated.
2) This header may need to be updated to support new platforms.
The supported platforms at the time of the 31-JAN-1999 release
are:
ALPHA-DIGITAL-UNIX
HP
NEXT
PC-LINUX
PC-MS
SGI-IRIX-N32
SGI-IRIX-NO2
SUN-SOLARIS
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
B.V. Semenov (JPL)
E.D. Wright (JPL)
-Version
-CSPICE Version 4.2.0, 09-APR-2014 (EDW) (BVS)
Added include for SpiceZrnm.h to eliminate symbol conflict
encountered from Icy and JNISpice under OS X 10.7.
Minor text format correction to eliminate error signal from
OS X cpp. The edit removes leading whitespace from the
final "#endif".
Updated for:
PC-CYGWIN-64BIT-GCC_C
environment. Added the corresponding tag:
CSPICE_PC_CYGWIN_64BIT_GCC
tag to the #ifdefs set.
-CSPICE Version 4.1.0, 14-MAY-2010 (EDW)(BVS)
Updated for:
MAC-OSX-64BIT-INTEL_C
SUN-SOLARIS-64BIT-NATIVE_C
SUN-SOLARIS-INTEL-64BIT-CC_C
environments. Added the corresponding tags:
CSPICE_MAC_OSX_INTEL_64BIT_GCC
CSPICE_SUN_SOLARIS_64BIT_NATIVE
CSPICE_SUN_SOLARIS_INTEL_64BIT_CC
tag to the #ifdefs set.
-CSPICE Version 4.0.0, 21-FEB-2006 (NJB)
Updated to support the PC Linux 64 bit mode/gcc platform.
-CSPICE Version 3.0.0, 27-JAN-2003 (NJB)
Updated to support the Sun Solaris 64 bit mode/gcc platform.
-CSPICE Version 2.0.0, 19-DEC-2001 (NJB)
Updated to support linking CSPICE into executables that
also link in objects compiled from Fortran, in particular
ones that perform Fortran I/O. To enable this odd mix,
one defines the preprocessor flag
MIX_C_AND_FORTRAN
This macro is undefined by default, since the action it invokes
is usually not desirable. See the header
f2cMang.h
for further information.
-CSPICE Version 1.0.0, 07-FEB-1999 (NJB)
*/
/*
Include those rename assignments for routines whose symbols will
collide with other libraries.
*/
#ifndef HAVE_SPICERENAME_H
#include "SpiceZrnm.h"
#endif
/*
Optionally include name-mangling macros for f2c external symbols.
*/
#ifdef MIX_C_AND_FORTRAN
#include "f2cMang.h"
#endif
/*
Include CSPICE platform macro definitions.
*/
#include "SpiceZpl.h"
#if ( defined(CSPICE_ALPHA_DIGITAL_UNIX ) \
|| defined(CSPICE_SUN_SOLARIS_64BIT_GCC ) \
|| defined(CSPICE_SUN_SOLARIS_64BIT_NATIVE ) \
|| defined(CSPICE_MAC_OSX_INTEL_64BIT_GCC ) \
|| defined(CSPICE_SUN_SOLARIS_INTEL_64BIT_CC ) \
|| defined(CSPICE_PC_CYGWIN_64BIT_GCC ) \
|| defined(CSPICE_PC_LINUX_64BIT_GCC ) )
/*
MODIFICATION
The following code is intended to be used on the platforms where
a long is the size of a double and an int is half the
size of a double.
Note that the comment line below indicating that the header is
"Standard" has been retained from the original, but is no longer
true.
*/
/* f2c.h -- Standard Fortran to C header file */
#ifndef F2C_INCLUDE
#define F2C_INCLUDE
typedef int integer;
typedef unsigned uinteger;
typedef char *address;
typedef short int shortint;
typedef float real;
typedef double doublereal;
typedef struct { real r, i; } complex;
typedef struct { doublereal r, i; } doublecomplex;
typedef int logical;
typedef short int shortlogical;
typedef char logical1;
typedef char integer1;
#if 0 /* Adjust for integer*8. */
typedef long longint; /* system-dependent */
typedef unsigned long ulongint; /* system-dependent */
#define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b)))
#define qbit_set(a,b) ((a) | ((ulongint)1 << (b)))
#endif
#define TRUE_ (1)
#define FALSE_ (0)
/* Extern is for use with -E */
#ifndef Extern
#define Extern extern
#endif
/* I/O stuff */
#ifdef f2c_i2
/* for -i2 */
typedef short flag;
typedef short ftnlen;
typedef short ftnint;
#else
typedef int flag;
typedef int ftnlen;
typedef int ftnint;
#endif
/*external read, write*/
typedef struct
{ flag cierr;
ftnint ciunit;
flag ciend;
char *cifmt;
ftnint cirec;
} cilist;
/*internal read, write*/
typedef struct
{ flag icierr;
char *iciunit;
flag iciend;
char *icifmt;
ftnint icirlen;
ftnint icirnum;
} icilist;
/*open*/
typedef struct
{ flag oerr;
ftnint ounit;
char *ofnm;
ftnlen ofnmlen;
char *osta;
char *oacc;
char *ofm;
ftnint orl;
char *oblnk;
} olist;
/*close*/
typedef struct
{ flag cerr;
ftnint cunit;
char *csta;
} cllist;
/*rewind, backspace, endfile*/
typedef struct
{ flag aerr;
ftnint aunit;
} alist;
/* inquire */
typedef struct
{ flag inerr;
ftnint inunit;
char *infile;
ftnlen infilen;
ftnint *inex; /*parameters in standard's order*/
ftnint *inopen;
ftnint *innum;
ftnint *innamed;
char *inname;
ftnlen innamlen;
char *inacc;
ftnlen inacclen;
char *inseq;
ftnlen inseqlen;
char *indir;
ftnlen indirlen;
char *infmt;
ftnlen infmtlen;
char *inform;
ftnint informlen;
char *inunf;
ftnlen inunflen;
ftnint *inrecl;
ftnint *innrec;
char *inblank;
ftnlen inblanklen;
} inlist;
#define VOID void
union Multitype { /* for multiple entry points */
integer1 g;
shortint h;
integer i;
/* longint j; */
real r;
doublereal d;
complex c;
doublecomplex z;
};
typedef union Multitype Multitype;
/*typedef int Long;*/ /* No longer used; formerly in Namelist */
struct Vardesc { /* for Namelist */
char *name;
char *addr;
ftnlen *dims;
int type;
};
typedef struct Vardesc Vardesc;
struct Namelist {
char *name;
Vardesc **vars;
int nvars;
};
typedef struct Namelist Namelist;
#define abs(x) ((x) >= 0 ? (x) : -(x))
#define dabs(x) (doublereal)abs(x)
#define min(a,b) ((a) <= (b) ? (a) : (b))
#define max(a,b) ((a) >= (b) ? (a) : (b))
#define dmin(a,b) (doublereal)min(a,b)
#define dmax(a,b) (doublereal)max(a,b)
#define bit_test(a,b) ((a) >> (b) & 1)
#define bit_clear(a,b) ((a) & ~((uinteger)1 << (b)))
#define bit_set(a,b) ((a) | ((uinteger)1 << (b)))
/* procedure parameter types for -A and -C++ */
#define F2C_proc_par_types 1
#ifdef __cplusplus
typedef int /* Unknown procedure type */ (*U_fp)(...);
typedef shortint (*J_fp)(...);
typedef integer (*I_fp)(...);
typedef real (*R_fp)(...);
typedef doublereal (*D_fp)(...), (*E_fp)(...);
typedef /* Complex */ VOID (*C_fp)(...);
typedef /* Double Complex */ VOID (*Z_fp)(...);
typedef logical (*L_fp)(...);
typedef shortlogical (*K_fp)(...);
typedef /* Character */ VOID (*H_fp)(...);
typedef /* Subroutine */ int (*S_fp)(...);
#else
typedef int /* Unknown procedure type */ (*U_fp)();
typedef shortint (*J_fp)();
typedef integer (*I_fp)();
typedef real (*R_fp)();
typedef doublereal (*D_fp)(), (*E_fp)();
typedef /* Complex */ VOID (*C_fp)();
typedef /* Double Complex */ VOID (*Z_fp)();
typedef logical (*L_fp)();
typedef shortlogical (*K_fp)();
typedef /* Character */ VOID (*H_fp)();
typedef /* Subroutine */ int (*S_fp)();
#endif
/* E_fp is for real functions when -R is not specified */
typedef VOID C_f; /* complex function */
typedef VOID H_f; /* character function */
typedef VOID Z_f; /* double complex function */
typedef doublereal E_f; /* real function with -R not specified */
/* undef any lower-case symbols that your C compiler predefines, e.g.: */
#ifndef Skip_f2c_Undefs
#undef cray
#undef gcos
#undef mc68010
#undef mc68020
#undef mips
#undef pdp11
#undef sgi
#undef sparc
#undef sun
#undef sun2
#undef sun3
#undef sun4
#undef u370
#undef u3b
#undef u3b2
#undef u3b5
#undef unix
#undef vax
#endif
#endif
/*
This marks the end of the MODIFICATION section version of f2c.h.
*/
#else
/*
The following code is the standard f2c.h header. In this
header, an "integer" is defined to be of type long.
Because the code is copied verbatim, it does not follow the usual
CSPICE indentation pattern.
*/
/* f2c.h -- Standard Fortran to C header file */
#ifndef F2C_INCLUDE
#define F2C_INCLUDE
typedef long int integer;
typedef unsigned long uinteger;
typedef char *address;
typedef short int shortint;
typedef float real;
typedef double doublereal;
typedef struct { real r, i; } complex;
typedef struct { doublereal r, i; } doublecomplex;
typedef long int logical;
typedef short int shortlogical;
typedef char logical1;
typedef char integer1;
#if 0 /* Adjust for integer*8. */
typedef long long longint; /* system-dependent */
typedef unsigned long long ulongint; /* system-dependent */
#define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b)))
#define qbit_set(a,b) ((a) | ((ulongint)1 << (b)))
#endif
#define TRUE_ (1)
#define FALSE_ (0)
/* Extern is for use with -E */
#ifndef Extern
#define Extern extern
#endif
/* I/O stuff */
#ifdef f2c_i2
/* for -i2 */
typedef short flag;
typedef short ftnlen;
typedef short ftnint;
#else
typedef long int flag;
typedef long int ftnlen;
typedef long int ftnint;
#endif
/*external read, write*/
typedef struct
{ flag cierr;
ftnint ciunit;
flag ciend;
char *cifmt;
ftnint cirec;
} cilist;
/*internal read, write*/
typedef struct
{ flag icierr;
char *iciunit;
flag iciend;
char *icifmt;
ftnint icirlen;
ftnint icirnum;
} icilist;
/*open*/
typedef struct
{ flag oerr;
ftnint ounit;
char *ofnm;
ftnlen ofnmlen;
char *osta;
char *oacc;
char *ofm;
ftnint orl;
char *oblnk;
} olist;
/*close*/
typedef struct
{ flag cerr;
ftnint cunit;
char *csta;
} cllist;
/*rewind, backspace, endfile*/
typedef struct
{ flag aerr;
ftnint aunit;
} alist;
/* inquire */
typedef struct
{ flag inerr;
ftnint inunit;
char *infile;
ftnlen infilen;
ftnint *inex; /*parameters in standard's order*/
ftnint *inopen;
ftnint *innum;
ftnint *innamed;
char *inname;
ftnlen innamlen;
char *inacc;
ftnlen inacclen;
char *inseq;
ftnlen inseqlen;
char *indir;
ftnlen indirlen;
char *infmt;
ftnlen infmtlen;
char *inform;
ftnint informlen;
char *inunf;
ftnlen inunflen;
ftnint *inrecl;
ftnint *innrec;
char *inblank;
ftnlen inblanklen;
} inlist;
#define VOID void
union Multitype { /* for multiple entry points */
integer1 g;
shortint h;
integer i;
/* longint j; */
real r;
doublereal d;
complex c;
doublecomplex z;
};
typedef union Multitype Multitype;
/*typedef long int Long;*/ /* No longer used; formerly in Namelist */
struct Vardesc { /* for Namelist */
char *name;
char *addr;
ftnlen *dims;
int type;
};
typedef struct Vardesc Vardesc;
struct Namelist {
char *name;
Vardesc **vars;
int nvars;
};
typedef struct Namelist Namelist;
#define abs(x) ((x) >= 0 ? (x) : -(x))
#define dabs(x) (doublereal)abs(x)
#define min(a,b) ((a) <= (b) ? (a) : (b))
#define max(a,b) ((a) >= (b) ? (a) : (b))
#define dmin(a,b) (doublereal)min(a,b)
#define dmax(a,b) (doublereal)max(a,b)
#define bit_test(a,b) ((a) >> (b) & 1)
#define bit_clear(a,b) ((a) & ~((uinteger)1 << (b)))
#define bit_set(a,b) ((a) | ((uinteger)1 << (b)))
/* procedure parameter types for -A and -C++ */
#define F2C_proc_par_types 1
#ifdef __cplusplus
typedef int /* Unknown procedure type */ (*U_fp)(...);
typedef shortint (*J_fp)(...);
typedef integer (*I_fp)(...);
typedef real (*R_fp)(...);
typedef doublereal (*D_fp)(...), (*E_fp)(...);
typedef /* Complex */ VOID (*C_fp)(...);
typedef /* Double Complex */ VOID (*Z_fp)(...);
typedef logical (*L_fp)(...);
typedef shortlogical (*K_fp)(...);
typedef /* Character */ VOID (*H_fp)(...);
typedef /* Subroutine */ int (*S_fp)(...);
#else
typedef int /* Unknown procedure type */ (*U_fp)();
typedef shortint (*J_fp)();
typedef integer (*I_fp)();
typedef real (*R_fp)();
typedef doublereal (*D_fp)(), (*E_fp)();
typedef /* Complex */ VOID (*C_fp)();
typedef /* Double Complex */ VOID (*Z_fp)();
typedef logical (*L_fp)();
typedef shortlogical (*K_fp)();
typedef /* Character */ VOID (*H_fp)();
typedef /* Subroutine */ int (*S_fp)();
#endif
/* E_fp is for real functions when -R is not specified */
typedef VOID C_f; /* complex function */
typedef VOID H_f; /* character function */
typedef VOID Z_f; /* double complex function */
typedef doublereal E_f; /* real function with -R not specified */
/* undef any lower-case symbols that your C compiler predefines, e.g.: */
#ifndef Skip_f2c_Undefs
#undef cray
#undef gcos
#undef mc68010
#undef mc68020
#undef mips
#undef pdp11
#undef sgi
#undef sparc
#undef sun
#undef sun2
#undef sun3
#undef sun4
#undef u370
#undef u3b
#undef u3b2
#undef u3b5
#undef unix
#undef vax
#endif
#endif
#endif
-390
View File
@@ -1,390 +0,0 @@
/*
-Header_File f2cMang.h ( f2c external symbol mangling )
-Abstract
Define macros that mangle the external symbols in the f2c F77 and I77
libraries.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Particulars
This header supports linking CSPICE into executables that
also link in objects compiled from Fortran, in particular
ones that perform Fortran I/O. To enable this odd mix,
one defines the preprocessor flag
MIX_C_AND_FORTRAN
This macro is undefined by default, since the action it invokes
is usually not desirable. When the flag is defined, this header
defines macros that mangle the f2c library external symbols:
the symbol
xxx
gets mapped to
xxx_f2c
This mangling prevents name collisions between the f2c
implementations of the F77 and I77 library routines and those
in the corresponding Fortran libraries on a host system.
The set of external symbols defined in the f2c libraries can
be determined by combining objects from both F77 and I77 into
a single Unix archive libarary, then running the Unix utility
nm on the that archive. If available, an nm option that selects
only external symbols should be invoked.
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
-Restrictions
1) It is recommended that use of the features implemented by this
header be avoided if at all possible. There are robustness and
portability problems associated with linking Fortran and C objects
together in one executable.
2) When f2c external symbol name mangling is invoked, objects
derived from C code translated from Fortran by f2c won't
link against CSPICE any longer, if these objects reference
the standard f2c external symbols.
3) The features implemented by this header have been tested only
under the Sun Solaris GCC, Sun Solaris native ANSI C, and
PC/Linux/gcc environments.
-Version
-CSPICE Version 2.0.1, 07-MAR-2009 (NJB)
Restrictions header section was updated to note successful
testing on the PC/Linux/gcc platform.
-CSPICE Version 2.0.0, 19-DEC-2001 (NJB)
*/
/*
Define masking macros for f2c external symbols.
*/
#ifdef MIX_C_AND_FORTRAN
/*
Define the macros only once, if they need to be defined.
*/
#ifndef F2C_MANGLING_DONE
#define F77_aloc F77_aloc_f2c
#define F_err F_err_f2c
#define L_len L_len_f2c
#define abort_ abort__f2c
#define b_char b_char_f2c
#define c_abs c_abs_f2c
#define c_cos c_cos_f2c
#define c_dfe c_dfe_f2c
#define c_div c_div_f2c
#define c_due c_due_f2c
#define c_exp c_exp_f2c
#define c_le c_le_f2c
#define c_log c_log_f2c
#define c_sfe c_sfe_f2c
#define c_si c_si_f2c
#define c_sin c_sin_f2c
#define c_sqrt c_sqrt_f2c
#define c_sue c_sue_f2c
#define d_abs d_abs_f2c
#define d_acos d_acos_f2c
#define d_asin d_asin_f2c
#define d_atan d_atan_f2c
#define d_atn2 d_atn2_f2c
#define d_cnjg d_cnjg_f2c
#define d_cos d_cos_f2c
#define d_cosh d_cosh_f2c
#define d_dim d_dim_f2c
#define d_exp d_exp_f2c
#define d_imag d_imag_f2c
#define d_int d_int_f2c
#define d_lg10 d_lg10_f2c
#define d_log d_log_f2c
#define d_mod d_mod_f2c
#define d_nint d_nint_f2c
#define d_prod d_prod_f2c
#define d_sign d_sign_f2c
#define d_sin d_sin_f2c
#define d_sinh d_sinh_f2c
#define d_sqrt d_sqrt_f2c
#define d_tan d_tan_f2c
#define d_tanh d_tanh_f2c
#define derf_ derf__f2c
#define derfc_ derfc__f2c
#define do_fio do_fio_f2c
#define do_lio do_lio_f2c
#define do_ud do_ud_f2c
#define do_uio do_uio_f2c
#define do_us do_us_f2c
#define dtime_ dtime__f2c
#define e_rdfe e_rdfe_f2c
#define e_rdue e_rdue_f2c
#define e_rsfe e_rsfe_f2c
#define e_rsfi e_rsfi_f2c
#define e_rsle e_rsle_f2c
#define e_rsli e_rsli_f2c
#define e_rsue e_rsue_f2c
#define e_wdfe e_wdfe_f2c
#define e_wdue e_wdue_f2c
#define e_wsfe e_wsfe_f2c
#define e_wsfi e_wsfi_f2c
#define e_wsle e_wsle_f2c
#define e_wsli e_wsli_f2c
#define e_wsue e_wsue_f2c
#define ef1asc_ ef1asc__f2c
#define ef1cmc_ ef1cmc__f2c
#define en_fio en_fio_f2c
#define erf_ erf__f2c
#define erfc_ erfc__f2c
#define err__fl err__fl_f2c
#define etime_ etime__f2c
#define exit_ exit__f2c
#define f__Aquote f__Aquote_f2c
#define f__buflen f__buflen_f2c
#define f__cabs f__cabs_f2c
#define f__canseek f__canseek_f2c
#define f__cblank f__cblank_f2c
#define f__cf f__cf_f2c
#define f__cnt f__cnt_f2c
#define f__cp f__cp_f2c
#define f__cplus f__cplus_f2c
#define f__cursor f__cursor_f2c
#define f__curunit f__curunit_f2c
#define f__doed f__doed_f2c
#define f__doend f__doend_f2c
#define f__doned f__doned_f2c
#define f__donewrec f__donewrec_f2c
#define f__dorevert f__dorevert_f2c
#define f__elist f__elist_f2c
#define f__external f__external_f2c
#define f__fatal f__fatal_f2c
#define f__fmtbuf f__fmtbuf_f2c
#define f__formatted f__formatted_f2c
#define f__getn f__getn_f2c
#define f__hiwater f__hiwater_f2c
#define f__icend f__icend_f2c
#define f__icnum f__icnum_f2c
#define f__icptr f__icptr_f2c
#define f__icvt f__icvt_f2c
#define f__init f__init_f2c
#define f__inode f__inode_f2c
#define f__lchar f__lchar_f2c
#define f__lcount f__lcount_f2c
#define f__lioproc f__lioproc_f2c
#define f__lquit f__lquit_f2c
#define f__ltab f__ltab_f2c
#define f__ltype f__ltype_f2c
#define f__lx f__lx_f2c
#define f__ly f__ly_f2c
#define f__nonl f__nonl_f2c
#define f__nowreading f__nowreading_f2c
#define f__nowwriting f__nowwriting_f2c
#define f__parenlvl f__parenlvl_f2c
#define f__pc f__pc_f2c
#define f__putbuf f__putbuf_f2c
#define f__putn f__putn_f2c
#define f__r_mode f__r_mode_f2c
#define f__reading f__reading_f2c
#define f__reclen f__reclen_f2c
#define f__recloc f__recloc_f2c
#define f__recpos f__recpos_f2c
#define f__ret f__ret_f2c
#define f__revloc f__revloc_f2c
#define f__rp f__rp_f2c
#define f__scale f__scale_f2c
#define f__sequential f__sequential_f2c
#define f__svic f__svic_f2c
#define f__typesize f__typesize_f2c
#define f__units f__units_f2c
#define f__w_mode f__w_mode_f2c
#define f__workdone f__workdone_f2c
#define f_back f_back_f2c
#define f_clos f_clos_f2c
#define f_end f_end_f2c
#define f_exit f_exit_f2c
#define f_init f_init_f2c
#define f_inqu f_inqu_f2c
#define f_open f_open_f2c
#define f_rew f_rew_f2c
#define fk_open fk_open_f2c
#define flush_ flush__f2c
#define fmt_bg fmt_bg_f2c
#define fseek_ fseek__f2c
#define ftell_ ftell__f2c
#define g_char g_char_f2c
#define getenv_ getenv__f2c
#define h_abs h_abs_f2c
#define h_dim h_dim_f2c
#define h_dnnt h_dnnt_f2c
#define h_indx h_indx_f2c
#define h_len h_len_f2c
#define h_mod h_mod_f2c
#define h_nint h_nint_f2c
#define h_sign h_sign_f2c
#define hl_ge hl_ge_f2c
#define hl_gt hl_gt_f2c
#define hl_le hl_le_f2c
#define hl_lt hl_lt_f2c
#define i_abs i_abs_f2c
#define i_dim i_dim_f2c
#define i_dnnt i_dnnt_f2c
#define i_indx i_indx_f2c
#define i_len i_len_f2c
#define i_mod i_mod_f2c
#define i_nint i_nint_f2c
#define i_sign i_sign_f2c
#define iw_rev iw_rev_f2c
#define l_eof l_eof_f2c
#define l_ge l_ge_f2c
#define l_getc l_getc_f2c
#define l_gt l_gt_f2c
#define l_le l_le_f2c
#define l_lt l_lt_f2c
#define l_read l_read_f2c
#define l_ungetc l_ungetc_f2c
#define l_write l_write_f2c
#define lbit_bits lbit_bits_f2c
#define lbit_cshift lbit_cshift_f2c
#define lbit_shift lbit_shift_f2c
#define mk_hashtab mk_hashtab_f2c
#define nml_read nml_read_f2c
#define pars_f pars_f_f2c
#define pow_ci pow_ci_f2c
#define pow_dd pow_dd_f2c
#define pow_di pow_di_f2c
#define pow_hh pow_hh_f2c
#define pow_ii pow_ii_f2c
#define pow_ri pow_ri_f2c
#define pow_zi pow_zi_f2c
#define pow_zz pow_zz_f2c
#define r_abs r_abs_f2c
#define r_acos r_acos_f2c
#define r_asin r_asin_f2c
#define r_atan r_atan_f2c
#define r_atn2 r_atn2_f2c
#define r_cnjg r_cnjg_f2c
#define r_cos r_cos_f2c
#define r_cosh r_cosh_f2c
#define r_dim r_dim_f2c
#define r_exp r_exp_f2c
#define r_imag r_imag_f2c
#define r_int r_int_f2c
#define r_lg10 r_lg10_f2c
#define r_log r_log_f2c
#define r_mod r_mod_f2c
#define r_nint r_nint_f2c
#define r_sign r_sign_f2c
#define r_sin r_sin_f2c
#define r_sinh r_sinh_f2c
#define r_sqrt r_sqrt_f2c
#define r_tan r_tan_f2c
#define r_tanh r_tanh_f2c
#define rd_ed rd_ed_f2c
#define rd_ned rd_ned_f2c
#define s_cat s_cat_f2c
#define s_cmp s_cmp_f2c
#define s_copy s_copy_f2c
#define s_paus s_paus_f2c
#define s_rdfe s_rdfe_f2c
#define s_rdue s_rdue_f2c
#define s_rnge s_rnge_f2c
#define s_rsfe s_rsfe_f2c
#define s_rsfi s_rsfi_f2c
#define s_rsle s_rsle_f2c
#define s_rsli s_rsli_f2c
#define s_rsne s_rsne_f2c
#define s_rsni s_rsni_f2c
#define s_rsue s_rsue_f2c
#define s_stop s_stop_f2c
#define s_wdfe s_wdfe_f2c
#define s_wdue s_wdue_f2c
#define s_wsfe s_wsfe_f2c
#define s_wsfi s_wsfi_f2c
#define s_wsle s_wsle_f2c
#define s_wsli s_wsli_f2c
#define s_wsne s_wsne_f2c
#define s_wsni s_wsni_f2c
#define s_wsue s_wsue_f2c
#define sig_die sig_die_f2c
#define signal_ signal__f2c
#define system_ system__f2c
#define t_getc t_getc_f2c
#define t_runc t_runc_f2c
#define w_ed w_ed_f2c
#define w_ned w_ned_f2c
#define wrt_E wrt_E_f2c
#define wrt_F wrt_F_f2c
#define wrt_L wrt_L_f2c
#define x_endp x_endp_f2c
#define x_getc x_getc_f2c
#define x_putc x_putc_f2c
#define x_rev x_rev_f2c
#define x_rsne x_rsne_f2c
#define x_wSL x_wSL_f2c
#define x_wsne x_wsne_f2c
#define xrd_SL xrd_SL_f2c
#define y_getc y_getc_f2c
#define y_rsk y_rsk_f2c
#define z_abs z_abs_f2c
#define z_cos z_cos_f2c
#define z_div z_div_f2c
#define z_exp z_exp_f2c
#define z_getc z_getc_f2c
#define z_log z_log_f2c
#define z_putc z_putc_f2c
#define z_rnew z_rnew_f2c
#define z_sin z_sin_f2c
#define z_sqrt z_sqrt_f2c
#define z_wnew z_wnew_f2c
#define F2C_MANGLING_DONE
#endif
#endif
-102
View File
@@ -1,102 +0,0 @@
/* filtem.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* Table of constant values */
static integer c__1 = 1;
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* Round the windows for objects inward. */
/* Subroutine */ int filtem_(char *kertyp, logical *obnam, integer *objlis,
doublereal *from, doublereal *to, doublereal *filwin, doublereal *
tmpwin, char *winsym, integer *winptr, doublereal *winval, ftnlen
kertyp_len, ftnlen winsym_len)
{
logical keep;
integer objn[2], sobj, n;
logical found;
extern /* Subroutine */ int scardd_(integer *, doublereal *), maknam_(
integer *, integer *, logical *, char *, char *, ftnlen, ftnlen);
integer object[3];
char objnam[32];
extern /* Subroutine */ int objget_(integer *, integer *, integer *),
objcmp_(integer *), objrem_(integer *, integer *);
extern logical wnincd_(doublereal *, doublereal *, doublereal *);
extern /* Subroutine */ int objnth_(integer *, integer *, integer *,
logical *), sygetd_(char *, char *, integer *, doublereal *,
integer *, doublereal *, logical *, ftnlen, ftnlen);
extern integer objsiz_(integer *);
extern /* Subroutine */ int objnxt_(integer *, integer *, integer *,
logical *);
logical fnd;
integer obj[2];
/* Spicelib Functions */
/* Local Variables. */
tmpwin[0] = 0.;
sobj = objsiz_(objlis);
objnth_(objlis, &c__1, obj, &found);
while(found) {
/* Look up the window associated with the current */
/* object. If it doesn't contain the FROM and TO */
/* interval, remove the current object from the */
/* list of objects to disply. */
objget_(obj, objlis, object);
maknam_(object, &sobj, obnam, kertyp, objnam, kertyp_len, (ftnlen)32);
sygetd_(objnam, winsym, winptr, winval, &n, &filwin[6], &fnd, (ftnlen)
32, winsym_len);
scardd_(&n, filwin);
keep = wnincd_(from, to, filwin);
objnxt_(obj, objlis, objn, &found);
if (! keep) {
/* Remove the current object from this */
/* list of objects to give summaries for. */
objrem_(obj, objlis);
}
obj[0] = objn[0];
obj[1] = objn[1];
}
/* Compress the object list. */
objcmp_(objlis);
return 0;
} /* filtem_ */
-204
View File
@@ -1,204 +0,0 @@
/* getnam.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* Table of constant values */
static integer c__2 = 2;
static integer c__1 = 1;
/* $Procedure GETNAM ( GET body NAMe for BRIEF display ) */
/* Subroutine */ int getnam_(integer *idcode, char *pattrn, char *kertyp,
char *idtype, char *name__, ftnlen pattrn_len, ftnlen kertyp_len,
ftnlen idtype_len, ftnlen name_len)
{
/* Builtin functions */
integer s_cmp(char *, char *, ftnlen, ftnlen);
/* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
/* Local variables */
integer cent;
logical found;
extern /* Subroutine */ int repmi_(char *, char *, integer *, char *,
ftnlen, ftnlen, ftnlen), bodc2n_(integer *, char *, logical *,
ftnlen);
integer frcode;
extern /* Subroutine */ int ccifrm_(integer *, integer *, integer *, char
*, integer *, logical *, ftnlen), frmnam_(integer *, char *,
ftnlen);
integer clssid;
extern /* Subroutine */ int frinfo_(integer *, integer *, integer *,
integer *, logical *);
integer frclss;
extern /* Subroutine */ int prefix_(char *, integer *, char *, ftnlen,
ftnlen), suffix_(char *, integer *, char *, ftnlen, ftnlen);
char string[64];
extern /* Subroutine */ int intstr_(integer *, char *, ftnlen);
/* $ Abstract */
/* Construct partial body name for BRIEF display. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Required_Reading */
/* None. */
/* $ Keywords */
/* None. */
/* $ Declarations */
/* $ Brief_I/O */
/* VARIABLE I/O DESCRIPTION */
/* -------- --- -------------------------------------------------- */
/* IDCODE I ID code to be mapped to name. */
/* PATTRN I Pattern string: p1, p2, etc. (see brief.pgm) */
/* KERTYP I Kernel type string: 'SPK' or 'PCK' */
/* IDTYPE I Is ID for object ('OBJECT') or center ('CENTER') */
/* NAME O Name corresponding to ID. */
/* $ Detailed_Input */
/* See Brief_I/O. */
/* $ Detailed_Output */
/* See Brief_I/O. */
/* $ Parameters */
/* TBD. */
/* $ Exceptions */
/* TBD. */
/* $ Files */
/* TBD. */
/* $ Particulars */
/* TBD. */
/* $ Examples */
/* None. */
/* $ Restrictions */
/* TBD. */
/* $ Literature_References */
/* None. */
/* $ Author_and_Institution */
/* B.V. Semenov (JPL) */
/* W.L. Taber (JPL) */
/* $ Version */
/* - BRIEF Version 2.0.0, 05-NOV-2007 (BVS) */
/* Changed calling sequence to include KERTYP and IDTYPE. Changed */
/* code to map SPK ID for physical object names and PCK frame IDs */
/* and frame class IDs to frame names. Added header. */
/* - BRIEF Version 1.0.0, 14-MAR-1996 (WLT) */
/* Bill's initial version. */
/* -& */
/* $ Index_Entries */
/* get partial body name for BRIEF display */
/* -& */
/* Local parameters. */
/* Local variables. */
/* Attemp to map ID to name. */
/* For SPK 'object' and 'center' IDs, use BODN2C as they are IDs of */
/* physical objects. */
/* For PCK 'object' IDs, use CCIFRM as they are frame class IDs. */
/* For PCK 'center' IDs, use FRINFO/FRMNAM as they are frame IDs. */
if (s_cmp(kertyp, "SPK", kertyp_len, (ftnlen)3) == 0) {
bodc2n_(idcode, string, &found, (ftnlen)64);
} else if (s_cmp(kertyp, "PCK", kertyp_len, (ftnlen)3) == 0 && s_cmp(
idtype, "OBJECT", idtype_len, (ftnlen)6) == 0) {
ccifrm_(&c__2, idcode, &frcode, string, &cent, &found, (ftnlen)64);
} else if (s_cmp(kertyp, "PCK", kertyp_len, (ftnlen)3) == 0 && s_cmp(
idtype, "CENTER", idtype_len, (ftnlen)6) == 0) {
frinfo_(idcode, &cent, &frclss, &clssid, &found);
if (found) {
frmnam_(idcode, string, (ftnlen)64);
}
} else {
found = FALSE_;
}
/* If ID could not be mapped to name, turn ID into a string and */
/* return. */
if (! found) {
intstr_(idcode, name__, name_len);
return 0;
}
/* Depending on requested pattern, append ID to the name. */
if (s_cmp(pattrn, "p1", pattrn_len, (ftnlen)2) == 0) {
suffix_("(#)", &c__1, string, (ftnlen)3, (ftnlen)64);
repmi_(string, "#", idcode, string, (ftnlen)64, (ftnlen)1, (ftnlen)64)
;
s_copy(name__, string, name_len, (ftnlen)64);
} else if (s_cmp(pattrn, "p2", pattrn_len, (ftnlen)2) == 0) {
intstr_(idcode, name__, name_len);
} else {
prefix_("#", &c__1, string, (ftnlen)1, (ftnlen)64);
repmi_(string, "#", idcode, string, (ftnlen)64, (ftnlen)1, (ftnlen)64)
;
s_copy(name__, string, name_len, (ftnlen)64);
}
return 0;
} /* getnam_ */
File diff suppressed because it is too large Load Diff
-232
View File
@@ -1,232 +0,0 @@
/*
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
*/
/* STARTUP PROCEDURE FOR UNIX FORTRAN PROGRAMS */
/*
This is the main.c file from the f2c libF77 set of source files,
modified for use within CSPICE. The changes made were:
- The file SpiceUsr.h is included.
- A call to putcml_c is made to store the command line arguments
and make them accessible via getcml_ or getcml_c.
This file is intended to be used as the main function for all
programs in the CSPICE Toolkit.
-Version
-CSPICE Version 2.0.0, 19-DEC-2001 (NJB)
Updated to support linking CSPICE into executables that
also link in objects compiled from Fortran, in particular
ones that perform Fortran I/O. To enable this odd mix,
one defines the preprocessor flag
MIX_C_AND_FORTRAN
This macro is undefined by default, since the action it invokes
is usually not desirable. See the header
f2cMang.h
for further information.
-CSPICE Version 1.1.0 29-FEB-2000 (NJB)
Updated to use the main.c source code from a newer version of
f2c, dated 1998-09-13.
-CSPICE Version 1.0.0 28-OCT-1998 (NJB)
*/
/*
Optionally include name-mangling macros for f2c external symbols.
*/
#ifdef MIX_C_AND_FORTRAN
#include "f2cMang.h"
#endif
/*
This header file is included for use within CSPICE.
*/
#include "SpiceUsr.h"
#include "stdio.h"
#include "signal1.h"
#ifndef SIGIOT
#ifdef SIGABRT
#define SIGIOT SIGABRT
#endif
#endif
#ifndef KR_headers
#undef VOID
#include "stdlib.h"
#endif
#ifndef VOID
#define VOID void
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifdef NO__STDC
#define ONEXIT onexit
extern VOID f_exit();
#else
#ifndef KR_headers
extern void f_exit(void);
#ifndef NO_ONEXIT
#define ONEXIT atexit
extern int atexit(void (*)(void));
#endif
#else
#ifndef NO_ONEXIT
#define ONEXIT onexit
extern VOID f_exit();
#endif
#endif
#endif
#ifdef KR_headers
extern VOID f_init(), sig_die();
extern int MAIN__();
#define Int /* int */
#else
extern void f_init(void), sig_die(char*, int);
extern int MAIN__(void);
#define Int int
#endif
static VOID sigfdie(Sigarg)
{
Use_Sigarg;
sig_die("Floating Exception", 1);
}
static VOID sigidie(Sigarg)
{
Use_Sigarg;
sig_die("IOT Trap", 1);
}
#ifdef SIGQUIT
static VOID sigqdie(Sigarg)
{
Use_Sigarg;
sig_die("Quit signal", 1);
}
#endif
static VOID sigindie(Sigarg)
{
Use_Sigarg;
sig_die("Interrupt", 0);
}
static VOID sigtdie(Sigarg)
{
Use_Sigarg;
sig_die("Killed", 0);
}
#ifdef SIGTRAP
static VOID sigtrdie(Sigarg)
{
Use_Sigarg;
sig_die("Trace trap", 1);
}
#endif
int xargc;
char **xargv;
#ifdef __cplusplus
}
#endif
#ifdef KR_headers
main(argc, argv) int argc; char **argv;
#else
main(int argc, char **argv)
#endif
{
/*
This call was added for use within CSPICE. It did not appear in the
original main.c function.
*/
putcml_c ( argc, argv );
xargc = argc;
xargv = argv;
signal1(SIGFPE, sigfdie); /* ignore underflow, enable overflow */
#ifdef SIGIOT
signal1(SIGIOT, sigidie);
#endif
#ifdef SIGTRAP
signal1(SIGTRAP, sigtrdie);
#endif
#ifdef SIGQUIT
if(signal1(SIGQUIT,sigqdie) == SIG_IGN)
signal1(SIGQUIT, SIG_IGN);
#endif
if(signal1(SIGINT, sigindie) == SIG_IGN)
signal1(SIGINT, SIG_IGN);
signal1(SIGTERM,sigtdie);
#ifdef pdp11
ldfps(01200); /* detect overflow as an exception */
#endif
f_init();
#ifndef NO_ONEXIT
ONEXIT(f_exit);
#endif
MAIN__();
#ifdef NO_ONEXIT
f_exit();
#endif
exit(0); /* exit(0) rather than return(0) to bypass Cray bug */
return 0; /* For compilers that complain of missing return values; */
/* others will complain that this is unreachable code. */
}
-215
View File
@@ -1,215 +0,0 @@
/* maknam.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* Table of constant values */
static integer c__2 = 2;
static integer c__1 = 1;
/* $Procedure MAKNAM ( GET body NAMe for BRIEF display ) */
/* Subroutine */ int maknam_(integer *object, integer *objsiz, logical *
namord, char *kertyp, char *objnam, ftnlen kertyp_len, ftnlen
objnam_len)
{
/* System generated locals */
integer i__1;
/* Builtin functions */
/* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
integer s_cmp(char *, char *, ftnlen, ftnlen);
/* Local variables */
char name__[48];
integer cent, i__;
doublereal x;
extern /* Subroutine */ int dpfmt_(doublereal *, char *, char *, ftnlen,
ftnlen);
logical found;
extern /* Subroutine */ int bodc2n_(integer *, char *, logical *, ftnlen);
integer frcode;
extern /* Subroutine */ int ccifrm_(integer *, integer *, integer *, char
*, integer *, logical *, ftnlen), replch_(char *, char *, char *,
char *, ftnlen, ftnlen, ftnlen, ftnlen);
integer clssid;
extern /* Subroutine */ int frmnam_(integer *, char *, ftnlen), frinfo_(
integer *, integer *, integer *, integer *, logical *);
integer frclss;
extern /* Subroutine */ int suffix_(char *, integer *, char *, ftnlen,
ftnlen);
/* $ Abstract */
/* Construct object name for use in BRIEF's symbol table string */
/* coverages. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Required_Reading */
/* None. */
/* $ Keywords */
/* None. */
/* $ Declarations */
/* $ Brief_I/O */
/* VARIABLE I/O DESCRIPTION */
/* -------- --- -------------------------------------------------- */
/* OBJECT I IDs: body+frameclass or body+center+frameclass */
/* OBJSIZ I Number of elements in OBJECT */
/* NAMORD I Flag indicating whether name ordering is needed */
/* KERTYP I Kernel type: 'SPK', 'PCK' */
/* NAME O Body for use in BRIEF's symbol table for coverages. */
/* $ Detailed_Input */
/* See Brief_I/O. */
/* $ Detailed_Output */
/* See Brief_I/O. */
/* $ Parameters */
/* TBD. */
/* $ Exceptions */
/* TBD. */
/* $ Files */
/* TBD. */
/* $ Particulars */
/* TBD. */
/* $ Examples */
/* None. */
/* $ Restrictions */
/* TBD. */
/* $ Literature_References */
/* None. */
/* $ Author_and_Institution */
/* B.V. Semenov (JPL) */
/* W.L. Taber (JPL) */
/* $ Version */
/* - BRIEF Version 2.0.0, 05-NOV-2007 (BVS) */
/* Changed calling sequence to include KERTYP. Changed code to */
/* map SPK ID for physical object names and PCK frame IDs and */
/* frame class IDs to frame names. Added header. */
/* - BRIEF Version 1.0.0, 14-MAR-1996 (WLT) */
/* Bill's initial version. */
/* -& */
/* $ Index_Entries */
/* make body name for BRIEF coverage symbol table */
/* -& */
/* Local parameters. */
/* Local variables. */
s_copy(objnam, " ", objnam_len, (ftnlen)1);
i__1 = *objsiz - 1;
for (i__ = 1; i__ <= i__1; ++i__) {
s_copy(name__, " ", (ftnlen)48, (ftnlen)1);
/* If name ordering was requested, try to get a name. */
if (*namord) {
/* Attemp to map ID to name. */
/* For SPK 'object' and 'center' IDs, use BODN2C as they are */
/* IDs of physical objects. */
/* For PCK 'object' IDs (OBJECT(1)), use CCIFRM as they are */
/* frame class IDs. */
/* For PCK 'center' IDs (OBJECT(2)), use FRINFO/FRMNAM as they */
/* are frame IDs. */
if (s_cmp(kertyp, "SPK", kertyp_len, (ftnlen)3) == 0) {
bodc2n_(&object[i__ - 1], name__, &found, (ftnlen)48);
} else if (s_cmp(kertyp, "PCK", kertyp_len, (ftnlen)3) == 0 &&
i__ == 1) {
ccifrm_(&c__2, &object[i__ - 1], &frcode, name__, &cent, &
found, (ftnlen)48);
} else if (s_cmp(kertyp, "PCK", kertyp_len, (ftnlen)3) == 0 &&
i__ == 2) {
frinfo_(&object[i__ - 1], &cent, &frclss, &clssid, &found);
if (found) {
frmnam_(&object[i__ - 1], name__, (ftnlen)48);
}
} else {
found = FALSE_;
}
/* If ID could not be mapped to name, turn ID into a string. */
if (! found) {
x = (doublereal) object[i__ - 1];
dpfmt_(&x, "+0XXXXXXXXXXX", name__, (ftnlen)13, (ftnlen)48);
replch_(name__, "-", "$", name__, (ftnlen)48, (ftnlen)1, (
ftnlen)1, (ftnlen)48);
}
} else {
/* If name ordering was not requested, turn ID into a string. */
x = (doublereal) object[i__ - 1];
dpfmt_(&x, "+0XXXXXXXXXXX", name__, (ftnlen)13, (ftnlen)48);
replch_(name__, "-", "$", name__, (ftnlen)48, (ftnlen)1, (ftnlen)
1, (ftnlen)48);
}
suffix_(name__, &c__1, objnam, (ftnlen)48, objnam_len);
}
return 0;
} /* maknam_ */
-37
View File
@@ -1,37 +0,0 @@
rem
rem mkcbrief.bat
rem
rem Creates brief.exe for MS Visual C++ and moves it to the
rem appropriate Toolkit directory.
rem
rem
rem Version 1.1.0 19-OCT-2003 (BVS)
rem
rem added -DNON_ANSI_STDIO compile option.
rem
rem Version 1.0.0 29-DEC-1998 (NJB)
rem
set cl= /c /O2 -D_COMPLEX_DEFINED -DMSDOS -DNON_ANSI_STDIO
copy brief.pgm main.c
for %%f in (*.c) do cl %%f
dir /b *.obj > temp.lst
link -lib /out:brief.lib @temp.lst
copy main.x brief.c
cl brief.c
link /STACK:16000000 brief.obj brief.lib ..\..\lib\csupport.lib ..\..\lib\cspice.lib
move brief.exe ..\..\exe
del *.obj
del brief.lib
del temp.lst
-131
View File
@@ -1,131 +0,0 @@
/* objact.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* Return the number of active objects. */
integer objact_(integer *objlis)
{
/* System generated locals */
integer ret_val;
/* $ Abstract */
/* Constants required by the family of "object" routines. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Required_Reading */
/* None. */
/* $ Keywords */
/* OBJECTS */
/* $ Parameters */
/* LBCELL is the lower bound for all cells used throughout */
/* the SPICE library.. */
/* NULL is a constant used to indicate that a particular */
/* object in a list is unused. */
/* RMPOBJ is the slot in the object list that tells how */
/* many values are stored for each object. I.E. */
/* the number of values stored for each object */
/* in an object list OBJLIS is OBJLIS(RMPOBJ). */
/* NACTIV is the slot in an object list that tells hows */
/* many objects in the list are currently active. */
/* In otherwords the number of active objects */
/* in the object list OBJLIS is OBJLIS(NACTIV) */
/* LSTID is the slot in an object list that gives the */
/* last object unique ID that was assigned. */
/* In otherwords, the value of the last unique */
/* object ID code in the object list OBJLIS */
/* is OBJLIS(LSTID). */
/* $ Files */
/* None. */
/* $ Exceptions */
/* Not Applicable */
/* $ Particulars */
/* This include file contains the parameters used by the */
/* family of object routines. */
/* $ Author_and_Institution */
/* W.L. Taber (JPL) */
/* $ Literature_References */
/* None. */
/* $ Version */
/* - SPICELIB Version 1.0.0, 23-FEB-1996 (WLT) */
/* -& */
ret_val = objlis[2];
return ret_val;
} /* objact_ */
-231
View File
@@ -1,231 +0,0 @@
/* objadd.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* Add an object to an object list. */
/* Subroutine */ int objadd_(integer *object, integer *objlis, integer *obj)
{
/* System generated locals */
integer i__1;
/* Local variables */
integer used, size, next, i__, j;
extern integer cardi_(integer *);
extern /* Subroutine */ int chkin_(char *, ftnlen);
extern integer sizei_(integer *);
integer count, allctd;
extern /* Subroutine */ int scardi_(integer *, integer *), sigerr_(char *,
ftnlen), chkout_(char *, ftnlen), setmsg_(char *, ftnlen),
errint_(char *, integer *, ftnlen);
integer mtasiz;
/* $ Abstract */
/* Constants required by the family of "object" routines. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Required_Reading */
/* None. */
/* $ Keywords */
/* OBJECTS */
/* $ Parameters */
/* LBCELL is the lower bound for all cells used throughout */
/* the SPICE library.. */
/* NULL is a constant used to indicate that a particular */
/* object in a list is unused. */
/* RMPOBJ is the slot in the object list that tells how */
/* many values are stored for each object. I.E. */
/* the number of values stored for each object */
/* in an object list OBJLIS is OBJLIS(RMPOBJ). */
/* NACTIV is the slot in an object list that tells hows */
/* many objects in the list are currently active. */
/* In otherwords the number of active objects */
/* in the object list OBJLIS is OBJLIS(NACTIV) */
/* LSTID is the slot in an object list that gives the */
/* last object unique ID that was assigned. */
/* In otherwords, the value of the last unique */
/* object ID code in the object list OBJLIS */
/* is OBJLIS(LSTID). */
/* $ Files */
/* None. */
/* $ Exceptions */
/* Not Applicable */
/* $ Particulars */
/* This include file contains the parameters used by the */
/* family of object routines. */
/* $ Author_and_Institution */
/* W.L. Taber (JPL) */
/* $ Literature_References */
/* None. */
/* $ Version */
/* - SPICELIB Version 1.0.0, 23-FEB-1996 (WLT) */
/* -& */
/* SPICELIB Functions */
/* Local Variables */
size = sizei_(objlis);
allctd = cardi_(objlis);
count = objlis[2];
mtasiz = objlis[3];
used = count * mtasiz;
/* Make sure there is room in the object list to hold */
/* another object. */
if (used >= size) {
chkin_("OBJADD", (ftnlen)6);
setmsg_("The object list already contains # objects. It is full. You"
" will need to remove an object or increase the declared size"
" of the object before another object can be added. ", (ftnlen)
170);
errint_("#", &count, (ftnlen)1);
sigerr_("SPICE(OBJECTLISTFULL)", (ftnlen)21);
chkout_("OBJADD", (ftnlen)6);
return 0;
}
/* Ok. We've got room. Construct the idcode for the next */
/* object. And fill in the details in OBJLIS to indicate */
/* this ID has been used. */
next = objlis[1] + 1;
objlis[1] = next;
/* Do the easy step first. If the objects are already */
/* packed together, we add this object to the end */
/* of the list. */
if (allctd == used) {
i__ = used + 1;
obj[0] = i__;
obj[1] = next;
objlis[i__ + 5] = next;
i__1 = mtasiz - 1;
for (j = 1; j <= i__1; ++j) {
++i__;
objlis[i__ + 5] = object[j - 1];
}
/* Adjust the cardinality of the object list. */
i__1 = used + mtasiz;
scardi_(&i__1, objlis);
++objlis[2];
return 0;
} else {
/* There's room available in the object list. Find */
/* a NULL position and use that space for this object. */
i__ = 1;
while(i__ < allctd) {
if (objlis[i__ + 5] == 0) {
objlis[i__ + 5] = next;
obj[0] = i__;
obj[1] = next;
i__1 = mtasiz - 1;
for (j = 1; j <= i__1; ++j) {
++i__;
objlis[i__ + 5] = object[j - 1];
}
++objlis[2];
return 0;
}
i__ += mtasiz;
}
}
/* You are never supposed to be able to reach this */
/* point in the code. If you do, there's a bug somewhere. */
chkin_("OBJADD", (ftnlen)6);
setmsg_("A serious error has occurred. The object list is supposed to h"
"ave room available in it, but no free areas were located. The m"
"ost likely cause is that the object list has been inadvertantly "
"corrupted by some portion of your software. The other possibili"
"ty is that there is a bug in the SPICE code. ", (ftnlen)300);
sigerr_("SPICE(BUG)", (ftnlen)10);
chkout_("OBJADD", (ftnlen)6);
return 0;
} /* objadd_ */
-152
View File
@@ -1,152 +0,0 @@
/* objcf1.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* Object Component Function */
/* Replace the specfied component of an object by the */
/* value F( OBJECT(COMP) ) */
/* Subroutine */ int objcf1_(I_fp f, integer *obj, integer *comp, integer *
objlis)
{
logical ok;
extern /* Subroutine */ int objchk_(char *, integer *, integer *, logical
*, ftnlen);
integer val, ptr;
/* $ Abstract */
/* Constants required by the family of "object" routines. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Required_Reading */
/* None. */
/* $ Keywords */
/* OBJECTS */
/* $ Parameters */
/* LBCELL is the lower bound for all cells used throughout */
/* the SPICE library.. */
/* NULL is a constant used to indicate that a particular */
/* object in a list is unused. */
/* RMPOBJ is the slot in the object list that tells how */
/* many values are stored for each object. I.E. */
/* the number of values stored for each object */
/* in an object list OBJLIS is OBJLIS(RMPOBJ). */
/* NACTIV is the slot in an object list that tells hows */
/* many objects in the list are currently active. */
/* In otherwords the number of active objects */
/* in the object list OBJLIS is OBJLIS(NACTIV) */
/* LSTID is the slot in an object list that gives the */
/* last object unique ID that was assigned. */
/* In otherwords, the value of the last unique */
/* object ID code in the object list OBJLIS */
/* is OBJLIS(LSTID). */
/* $ Files */
/* None. */
/* $ Exceptions */
/* Not Applicable */
/* $ Particulars */
/* This include file contains the parameters used by the */
/* family of object routines. */
/* $ Author_and_Institution */
/* W.L. Taber (JPL) */
/* $ Literature_References */
/* None. */
/* $ Version */
/* - SPICELIB Version 1.0.0, 23-FEB-1996 (WLT) */
/* -& */
/* Local Variables. */
/* First check the object. */
objchk_("OBJCF1", obj, objlis, &ok, (ftnlen)6);
if (! ok) {
return 0;
}
/* Now replace components */
ptr = obj[0] + *comp;
val = objlis[ptr + 5];
objlis[ptr + 5] = (*f)(&val);
return 0;
} /* objcf1_ */
-152
View File
@@ -1,152 +0,0 @@
/* objcf2.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* Object Component Function */
/* Replace the specfied component of an object by the */
/* value F( A, OBJECT(COMP) ) */
/* Subroutine */ int objcf2_(I_fp f, integer *a, integer *obj, integer *comp,
integer *objlis)
{
logical ok;
extern /* Subroutine */ int objchk_(char *, integer *, integer *, logical
*, ftnlen);
integer val, ptr;
/* $ Abstract */
/* Constants required by the family of "object" routines. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Required_Reading */
/* None. */
/* $ Keywords */
/* OBJECTS */
/* $ Parameters */
/* LBCELL is the lower bound for all cells used throughout */
/* the SPICE library.. */
/* NULL is a constant used to indicate that a particular */
/* object in a list is unused. */
/* RMPOBJ is the slot in the object list that tells how */
/* many values are stored for each object. I.E. */
/* the number of values stored for each object */
/* in an object list OBJLIS is OBJLIS(RMPOBJ). */
/* NACTIV is the slot in an object list that tells hows */
/* many objects in the list are currently active. */
/* In otherwords the number of active objects */
/* in the object list OBJLIS is OBJLIS(NACTIV) */
/* LSTID is the slot in an object list that gives the */
/* last object unique ID that was assigned. */
/* In otherwords, the value of the last unique */
/* object ID code in the object list OBJLIS */
/* is OBJLIS(LSTID). */
/* $ Files */
/* None. */
/* $ Exceptions */
/* Not Applicable */
/* $ Particulars */
/* This include file contains the parameters used by the */
/* family of object routines. */
/* $ Author_and_Institution */
/* W.L. Taber (JPL) */
/* $ Literature_References */
/* None. */
/* $ Version */
/* - SPICELIB Version 1.0.0, 23-FEB-1996 (WLT) */
/* -& */
/* Local Variables. */
/* First check the object. */
objchk_("OBJCFN", obj, objlis, &ok, (ftnlen)6);
if (! ok) {
return 0;
}
/* Now replace components */
ptr = obj[0] + *comp;
val = objlis[ptr + 5];
objlis[ptr + 5] = (*f)(a, &val);
return 0;
} /* objcf2_ */
-260
View File
@@ -1,260 +0,0 @@
/* objchk.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* Check an object id for sanity. */
/* Subroutine */ int objchk_(char *name__, integer *obj, integer *objlis,
logical *ok, ftnlen name_len)
{
/* System generated locals */
integer i__1, i__2;
/* Local variables */
integer size, room, i__, q;
extern integer cardi_(integer *);
extern /* Subroutine */ int chkin_(char *, ftnlen);
extern integer sizei_(integer *);
integer remain;
extern /* Subroutine */ int rmaini_(integer *, integer *, integer *,
integer *), sigerr_(char *, ftnlen), chkout_(char *, ftnlen);
integer objsiz;
extern /* Subroutine */ int setmsg_(char *, ftnlen), errint_(char *,
integer *, ftnlen);
integer mtasiz;
/* This routine checks an object for sanity. Moreover */
/* as needed it refreshes the object in case the pointer */
/* component no longer points to the object but the */
/* object is still in the object list. */
/* $ Abstract */
/* Constants required by the family of "object" routines. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Required_Reading */
/* None. */
/* $ Keywords */
/* OBJECTS */
/* $ Parameters */
/* LBCELL is the lower bound for all cells used throughout */
/* the SPICE library.. */
/* NULL is a constant used to indicate that a particular */
/* object in a list is unused. */
/* RMPOBJ is the slot in the object list that tells how */
/* many values are stored for each object. I.E. */
/* the number of values stored for each object */
/* in an object list OBJLIS is OBJLIS(RMPOBJ). */
/* NACTIV is the slot in an object list that tells hows */
/* many objects in the list are currently active. */
/* In otherwords the number of active objects */
/* in the object list OBJLIS is OBJLIS(NACTIV) */
/* LSTID is the slot in an object list that gives the */
/* last object unique ID that was assigned. */
/* In otherwords, the value of the last unique */
/* object ID code in the object list OBJLIS */
/* is OBJLIS(LSTID). */
/* $ Files */
/* None. */
/* $ Exceptions */
/* Not Applicable */
/* $ Particulars */
/* This include file contains the parameters used by the */
/* family of object routines. */
/* $ Author_and_Institution */
/* W.L. Taber (JPL) */
/* $ Literature_References */
/* None. */
/* $ Version */
/* - SPICELIB Version 1.0.0, 23-FEB-1996 (WLT) */
/* -& */
/* SPICELIB Functions */
/* The null object is always present. */
if (obj[0] == 0 && obj[1] == 0) {
*ok = TRUE_;
return 0;
}
/* Check for corrupted objects. */
if (obj[0] < 0) {
*ok = FALSE_;
chkin_(name__, name_len);
setmsg_("The object id supplied has an invalid pointer component. Th"
"e pointer component must always be positive. It had the val"
"ue #. This is probably the result of supplying an initializ"
"ed object id. ", (ftnlen)193);
sigerr_("SPICE(BADOBJECTID)", (ftnlen)18);
chkout_(name__, name_len);
return 0;
}
if (obj[1] < 0) {
*ok = FALSE_;
chkin_(name__, name_len);
setmsg_("The object id supplied has an invalid identifier component."
" The identifier component must always be positive. It had t"
"he value #. This is probably the result of supplying an ini"
"tialized object id. ", (ftnlen)199);
sigerr_("SPICE(BADOBJECTID)", (ftnlen)18);
chkout_(name__, name_len);
return 0;
}
mtasiz = objlis[3];
objsiz = mtasiz - 1;
size = cardi_(objlis);
room = sizei_(objlis);
rmaini_(obj, &mtasiz, &q, &remain);
if (remain != 1) {
*ok = FALSE_;
chkin_(name__, name_len);
setmsg_("The pointer specified has an invalid value for the supplied"
" object size. The object size specified was #. Given this "
"object size the object pointer should be congruent to 1 MOD "
"#. The value of the object pointer was #. ", (ftnlen)222);
errint_("#", &objsiz, (ftnlen)1);
i__1 = objsiz + 1;
errint_("#", &i__1, (ftnlen)1);
errint_("#", obj, (ftnlen)1);
sigerr_("SPICE(BADOBJECTID)", (ftnlen)18);
chkout_(name__, name_len);
return 0;
}
if (obj[0] > room && obj[1] != 0) {
*ok = FALSE_;
chkin_(name__, name_len);
setmsg_("The pointer component of the object points outside of the o"
"bject list. The size of the object list is # and the value "
"of the object pointer is #. ", (ftnlen)148);
errint_("#", &size, (ftnlen)1);
errint_("#", obj, (ftnlen)1);
sigerr_("SPICE(BADOBJECTID)", (ftnlen)18);
chkout_(name__, name_len);
return 0;
}
if (obj[0] > room && obj[1] == 0) {
*ok = TRUE_;
return 0;
}
if (objlis[obj[0] + 5] != obj[1]) {
/* It is possible that the object list has been compressed. */
/* If so the object id may be out of date. See if we */
/* can find this object elsewhere in the list. */
i__1 = size;
i__2 = mtasiz;
for (i__ = 1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) {
if (objlis[i__ + 5] == obj[1]) {
/* Refressh the object pointer value. */
obj[0] = i__;
*ok = TRUE_;
return 0;
}
}
/* If still, here there's a problem. This cannot be */
/* a legitimate object. */
*ok = FALSE_;
chkin_(name__, name_len);
setmsg_("The pointer component and the identifier component of the o"
"bject are not compatible. The pointer points to the identifi"
"er value #. The identifier of the object given is: #. You "
"may have a \"stale\" object.", (ftnlen)205);
errint_("#", &objlis[obj[0] + 5], (ftnlen)1);
errint_("#", &obj[1], (ftnlen)1);
sigerr_("SPICE(BADOBJECTID)", (ftnlen)18);
chkout_(name__, name_len);
return 0;
}
/* If you get to this point, all obvious checks have passed. */
/* This object is deemed to be a good one. */
*ok = TRUE_;
return 0;
} /* objchk_ */
-177
View File
@@ -1,177 +0,0 @@
/* objcmp.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* Table of constant values */
static integer c__0 = 0;
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* Compress an object list. */
/* Subroutine */ int objcmp_(integer *objlis)
{
/* System generated locals */
integer i__1, i__2;
/* Local variables */
integer i__, j;
extern integer cardi_(integer *);
integer nhave;
extern /* Subroutine */ int scardi_(integer *, integer *);
integer mtasiz, get, put;
/* $ Abstract */
/* Constants required by the family of "object" routines. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Required_Reading */
/* None. */
/* $ Keywords */
/* OBJECTS */
/* $ Parameters */
/* LBCELL is the lower bound for all cells used throughout */
/* the SPICE library.. */
/* NULL is a constant used to indicate that a particular */
/* object in a list is unused. */
/* RMPOBJ is the slot in the object list that tells how */
/* many values are stored for each object. I.E. */
/* the number of values stored for each object */
/* in an object list OBJLIS is OBJLIS(RMPOBJ). */
/* NACTIV is the slot in an object list that tells hows */
/* many objects in the list are currently active. */
/* In otherwords the number of active objects */
/* in the object list OBJLIS is OBJLIS(NACTIV) */
/* LSTID is the slot in an object list that gives the */
/* last object unique ID that was assigned. */
/* In otherwords, the value of the last unique */
/* object ID code in the object list OBJLIS */
/* is OBJLIS(LSTID). */
/* $ Files */
/* None. */
/* $ Exceptions */
/* Not Applicable */
/* $ Particulars */
/* This include file contains the parameters used by the */
/* family of object routines. */
/* $ Author_and_Institution */
/* W.L. Taber (JPL) */
/* $ Literature_References */
/* None. */
/* $ Version */
/* - SPICELIB Version 1.0.0, 23-FEB-1996 (WLT) */
/* -& */
/* SPICELIB Functions */
/* Local Variables */
mtasiz = objlis[3];
nhave = objlis[2];
if (nhave == 0) {
scardi_(&c__0, objlis);
return 0;
}
if (nhave * mtasiz == cardi_(objlis)) {
return 0;
}
get = 1;
put = 1;
i__1 = nhave;
for (i__ = 1; i__ <= i__1; ++i__) {
while(objlis[get + 5] == 0) {
get += mtasiz;
}
if (put != get) {
i__2 = mtasiz;
for (j = 1; j <= i__2; ++j) {
objlis[put + 5] = objlis[get + 5];
++put;
++get;
}
} else {
get += mtasiz;
put += mtasiz;
}
}
i__1 = nhave * mtasiz;
scardi_(&i__1, objlis);
return 0;
} /* objcmp_ */
-169
View File
@@ -1,169 +0,0 @@
/* objfnd.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* Find the first object having a particular value. */
/* Subroutine */ int objfnd_(integer *object, integer *start, integer *objlis,
integer *obj, logical *found)
{
integer i__, j;
extern /* Subroutine */ int objnth_(integer *, integer *, integer *,
logical *);
integer objtmp[2];
extern integer touchi_(integer *);
integer objsiz;
extern /* Subroutine */ int objnxt_(integer *, integer *, integer *,
logical *);
logical got;
/* $ Abstract */
/* Constants required by the family of "object" routines. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Required_Reading */
/* None. */
/* $ Keywords */
/* OBJECTS */
/* $ Parameters */
/* LBCELL is the lower bound for all cells used throughout */
/* the SPICE library.. */
/* NULL is a constant used to indicate that a particular */
/* object in a list is unused. */
/* RMPOBJ is the slot in the object list that tells how */
/* many values are stored for each object. I.E. */
/* the number of values stored for each object */
/* in an object list OBJLIS is OBJLIS(RMPOBJ). */
/* NACTIV is the slot in an object list that tells hows */
/* many objects in the list are currently active. */
/* In otherwords the number of active objects */
/* in the object list OBJLIS is OBJLIS(NACTIV) */
/* LSTID is the slot in an object list that gives the */
/* last object unique ID that was assigned. */
/* In otherwords, the value of the last unique */
/* object ID code in the object list OBJLIS */
/* is OBJLIS(LSTID). */
/* $ Files */
/* None. */
/* $ Exceptions */
/* Not Applicable */
/* $ Particulars */
/* This include file contains the parameters used by the */
/* family of object routines. */
/* $ Author_and_Institution */
/* W.L. Taber (JPL) */
/* $ Literature_References */
/* None. */
/* $ Version */
/* - SPICELIB Version 1.0.0, 23-FEB-1996 (WLT) */
/* -& */
/* Local Variables */
/* SPICELIB Calls */
/* First get the size of an object in the list. */
objsiz = objlis[3] - 1;
/* Find the START'th object, and just look at the next one */
/* until we match or don't have any more objects. */
objnth_(objlis, start, obj, found);
while(*found) {
j = 1;
i__ = obj[0] + 1;
got = TRUE_;
while(j <= objsiz && got) {
got = object[j - 1] == objlis[i__ + 5];
++i__;
++j;
}
if (got) {
return 0;
}
objnxt_(obj, objlis, objtmp, found);
obj[0] = touchi_(objtmp);
obj[1] = touchi_(&objtmp[1]);
}
return 0;
} /* objfnd_ */
-165
View File
@@ -1,165 +0,0 @@
/* objget.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* Get an objects values from an object list. */
/* Subroutine */ int objget_(integer *obj, integer *objlis, integer *object)
{
/* System generated locals */
integer i__1;
/* Local variables */
integer i__, j;
extern /* Subroutine */ int chkin_(char *, ftnlen);
logical ok;
extern /* Subroutine */ int objchk_(char *, integer *, integer *, logical
*, ftnlen), sigerr_(char *, ftnlen), chkout_(char *, ftnlen);
integer objsiz;
extern /* Subroutine */ int setmsg_(char *, ftnlen), errint_(char *,
integer *, ftnlen);
/* $ Abstract */
/* Constants required by the family of "object" routines. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Required_Reading */
/* None. */
/* $ Keywords */
/* OBJECTS */
/* $ Parameters */
/* LBCELL is the lower bound for all cells used throughout */
/* the SPICE library.. */
/* NULL is a constant used to indicate that a particular */
/* object in a list is unused. */
/* RMPOBJ is the slot in the object list that tells how */
/* many values are stored for each object. I.E. */
/* the number of values stored for each object */
/* in an object list OBJLIS is OBJLIS(RMPOBJ). */
/* NACTIV is the slot in an object list that tells hows */
/* many objects in the list are currently active. */
/* In otherwords the number of active objects */
/* in the object list OBJLIS is OBJLIS(NACTIV) */
/* LSTID is the slot in an object list that gives the */
/* last object unique ID that was assigned. */
/* In otherwords, the value of the last unique */
/* object ID code in the object list OBJLIS */
/* is OBJLIS(LSTID). */
/* $ Files */
/* None. */
/* $ Exceptions */
/* Not Applicable */
/* $ Particulars */
/* This include file contains the parameters used by the */
/* family of object routines. */
/* $ Author_and_Institution */
/* W.L. Taber (JPL) */
/* $ Literature_References */
/* None. */
/* $ Version */
/* - SPICELIB Version 1.0.0, 23-FEB-1996 (WLT) */
/* -& */
/* Local Variables */
objchk_("OBJGET", obj, objlis, &ok, (ftnlen)6);
if (! ok) {
return 0;
}
if (obj[1] == 0) {
chkin_("OBJGET", (ftnlen)6);
setmsg_("You are attempting to get the values associated with an ina"
"ctive object. Only the values of active objects can be retr"
"ieved with OBJGET. The value of the pointer component of the"
" object was #. ", (ftnlen)194);
errint_("#", obj, (ftnlen)1);
sigerr_("SPICE(INACTIVEOBJECT)", (ftnlen)21);
chkout_("OBJGET", (ftnlen)6);
}
objsiz = objlis[3] - 1;
i__ = obj[0] + 1;
i__1 = objsiz;
for (j = 1; j <= i__1; ++j) {
object[j - 1] = objlis[i__ + 5];
++i__;
}
return 0;
} /* objget_ */
-167
View File
@@ -1,167 +0,0 @@
/* objinl.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* Initialize an object list. */
/* Subroutine */ int objinl_(integer *objsiz, integer *nobj, integer *objlis)
{
/* System generated locals */
integer i__1;
/* Local variables */
integer room, i__, j;
extern /* Subroutine */ int ssizei_(integer *, integer *);
integer mtasiz;
/* $ Abstract */
/* Constants required by the family of "object" routines. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Required_Reading */
/* None. */
/* $ Keywords */
/* OBJECTS */
/* $ Parameters */
/* LBCELL is the lower bound for all cells used throughout */
/* the SPICE library.. */
/* NULL is a constant used to indicate that a particular */
/* object in a list is unused. */
/* RMPOBJ is the slot in the object list that tells how */
/* many values are stored for each object. I.E. */
/* the number of values stored for each object */
/* in an object list OBJLIS is OBJLIS(RMPOBJ). */
/* NACTIV is the slot in an object list that tells hows */
/* many objects in the list are currently active. */
/* In otherwords the number of active objects */
/* in the object list OBJLIS is OBJLIS(NACTIV) */
/* LSTID is the slot in an object list that gives the */
/* last object unique ID that was assigned. */
/* In otherwords, the value of the last unique */
/* object ID code in the object list OBJLIS */
/* is OBJLIS(LSTID). */
/* $ Files */
/* None. */
/* $ Exceptions */
/* Not Applicable */
/* $ Particulars */
/* This include file contains the parameters used by the */
/* family of object routines. */
/* $ Author_and_Institution */
/* W.L. Taber (JPL) */
/* $ Literature_References */
/* None. */
/* $ Version */
/* - SPICELIB Version 1.0.0, 23-FEB-1996 (WLT) */
/* -& */
/* Each object has an extra space that specifies */
/* the objects id-code and status. The object */
/* is "active" if the extra-space has a non-null */
/* value. */
/* Compute the number of slots required to store NOBJ objects */
/* each of size OBJSIZ. Recall that each object has an */
/* extra "ID" slot. */
room = (*objsiz + 1) * *nobj;
mtasiz = *objsiz + 1;
/* Set the size of the cell */
ssizei_(&room, objlis);
/* Fill in the extra slots of the cell used by the objects. */
objlis[3] = mtasiz;
objlis[2] = 0;
objlis[1] = 0;
/* Set each object to have a NULL ID code. */
i__1 = *nobj;
for (i__ = 1; i__ <= i__1; ++i__) {
j = (i__ - 1) * mtasiz + 1;
objlis[j + 5] = 0;
}
return 0;
} /* objinl_ */
-167
View File
@@ -1,167 +0,0 @@
/* objmod.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* Modify a component of an active object. */
/* Subroutine */ int objmod_(integer *obj, integer *comp, integer *value,
integer *objlis)
{
integer i__;
extern /* Subroutine */ int chkin_(char *, ftnlen);
logical ok;
extern /* Subroutine */ int objchk_(char *, integer *, integer *, logical
*, ftnlen), sigerr_(char *, ftnlen), chkout_(char *, ftnlen);
integer objsiz;
extern /* Subroutine */ int setmsg_(char *, ftnlen), errint_(char *,
integer *, ftnlen);
/* $ Abstract */
/* Constants required by the family of "object" routines. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Required_Reading */
/* None. */
/* $ Keywords */
/* OBJECTS */
/* $ Parameters */
/* LBCELL is the lower bound for all cells used throughout */
/* the SPICE library.. */
/* NULL is a constant used to indicate that a particular */
/* object in a list is unused. */
/* RMPOBJ is the slot in the object list that tells how */
/* many values are stored for each object. I.E. */
/* the number of values stored for each object */
/* in an object list OBJLIS is OBJLIS(RMPOBJ). */
/* NACTIV is the slot in an object list that tells hows */
/* many objects in the list are currently active. */
/* In otherwords the number of active objects */
/* in the object list OBJLIS is OBJLIS(NACTIV) */
/* LSTID is the slot in an object list that gives the */
/* last object unique ID that was assigned. */
/* In otherwords, the value of the last unique */
/* object ID code in the object list OBJLIS */
/* is OBJLIS(LSTID). */
/* $ Files */
/* None. */
/* $ Exceptions */
/* Not Applicable */
/* $ Particulars */
/* This include file contains the parameters used by the */
/* family of object routines. */
/* $ Author_and_Institution */
/* W.L. Taber (JPL) */
/* $ Literature_References */
/* None. */
/* $ Version */
/* - SPICELIB Version 1.0.0, 23-FEB-1996 (WLT) */
/* -& */
/* Local Variables */
objchk_("OBJMOD", obj, objlis, &ok, (ftnlen)6);
if (! ok) {
return 0;
}
if (obj[1] == 0) {
chkin_("OBJMOD", (ftnlen)6);
setmsg_("You are attempting to modify the value of an inactive objec"
"t. You can only modify the value of an active object. The "
"object pointer has value #. ", (ftnlen)147);
errint_("#", obj, (ftnlen)1);
sigerr_("SPICE(INACTIVEOBJECT)", (ftnlen)21);
chkout_("OBJMOD", (ftnlen)6);
return 0;
}
objsiz = objlis[3] - 1;
if (*comp < 1 || *comp > objsiz) {
chkin_("OBJMOD", (ftnlen)6);
setmsg_("Objects in the list supplied have # components. You are att"
"empting to modify component # of the object. ", (ftnlen)104);
errint_("#", &objsiz, (ftnlen)1);
errint_("#", comp, (ftnlen)1);
sigerr_("SPICE(BADCOMPNUMBER)", (ftnlen)20);
chkout_("OBJMOD", (ftnlen)6);
return 0;
}
i__ = obj[0] + *comp;
objlis[i__ + 5] = *value;
return 0;
} /* objmod_ */
-183
View File
@@ -1,183 +0,0 @@
/* objnth.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* Return the N'th object from an object list. */
/* Subroutine */ int objnth_(integer *objlis, integer *n, integer *obj,
logical *found)
{
/* System generated locals */
integer i__1;
/* Local variables */
integer nobj, used, size, i__;
extern integer cardi_(integer *);
integer mtasiz, ptr;
/* $ Abstract */
/* Constants required by the family of "object" routines. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Required_Reading */
/* None. */
/* $ Keywords */
/* OBJECTS */
/* $ Parameters */
/* LBCELL is the lower bound for all cells used throughout */
/* the SPICE library.. */
/* NULL is a constant used to indicate that a particular */
/* object in a list is unused. */
/* RMPOBJ is the slot in the object list that tells how */
/* many values are stored for each object. I.E. */
/* the number of values stored for each object */
/* in an object list OBJLIS is OBJLIS(RMPOBJ). */
/* NACTIV is the slot in an object list that tells hows */
/* many objects in the list are currently active. */
/* In otherwords the number of active objects */
/* in the object list OBJLIS is OBJLIS(NACTIV) */
/* LSTID is the slot in an object list that gives the */
/* last object unique ID that was assigned. */
/* In otherwords, the value of the last unique */
/* object ID code in the object list OBJLIS */
/* is OBJLIS(LSTID). */
/* $ Files */
/* None. */
/* $ Exceptions */
/* Not Applicable */
/* $ Particulars */
/* This include file contains the parameters used by the */
/* family of object routines. */
/* $ Author_and_Institution */
/* W.L. Taber (JPL) */
/* $ Literature_References */
/* None. */
/* $ Version */
/* - SPICELIB Version 1.0.0, 23-FEB-1996 (WLT) */
/* -& */
/* SPICELIB Functions */
/* Local Variables */
nobj = objlis[2];
mtasiz = objlis[3];
size = cardi_(objlis);
used = nobj * mtasiz;
if (*n <= 0) {
obj[0] = 0;
obj[1] = 0;
*found = FALSE_;
return 0;
}
if (*n > nobj) {
obj[0] = 0;
obj[1] = 0;
*found = FALSE_;
return 0;
}
/* The easy case is the one in which all objects are packed */
/* together with no null objects between them. */
if (used == size) {
ptr = (*n - 1) * mtasiz + 1;
obj[0] = ptr;
obj[1] = objlis[ptr + 5];
*found = TRUE_;
return 0;
}
/* Hmmmm. Well we don't have the easy case. Look through */
/* the objects until we find the n'th non-null object. */
ptr = 1 - mtasiz;
i__1 = *n;
for (i__ = 1; i__ <= i__1; ++i__) {
ptr += mtasiz;
while(objlis[ptr + 5] == 0) {
ptr += mtasiz;
}
}
obj[0] = ptr;
obj[1] = objlis[ptr + 5];
return 0;
} /* objnth_ */
-180
View File
@@ -1,180 +0,0 @@
/* objnxt.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* Get the id of the next object in the list. */
/* Subroutine */ int objnxt_(integer *obj, integer *objlis, integer *objn,
logical *found)
{
integer size, i__;
extern integer cardi_(integer *);
logical ok;
extern /* Subroutine */ int objchk_(char *, integer *, integer *, logical
*, ftnlen);
integer mtasiz, ptr;
/* $ Abstract */
/* Constants required by the family of "object" routines. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Required_Reading */
/* None. */
/* $ Keywords */
/* OBJECTS */
/* $ Parameters */
/* LBCELL is the lower bound for all cells used throughout */
/* the SPICE library.. */
/* NULL is a constant used to indicate that a particular */
/* object in a list is unused. */
/* RMPOBJ is the slot in the object list that tells how */
/* many values are stored for each object. I.E. */
/* the number of values stored for each object */
/* in an object list OBJLIS is OBJLIS(RMPOBJ). */
/* NACTIV is the slot in an object list that tells hows */
/* many objects in the list are currently active. */
/* In otherwords the number of active objects */
/* in the object list OBJLIS is OBJLIS(NACTIV) */
/* LSTID is the slot in an object list that gives the */
/* last object unique ID that was assigned. */
/* In otherwords, the value of the last unique */
/* object ID code in the object list OBJLIS */
/* is OBJLIS(LSTID). */
/* $ Files */
/* None. */
/* $ Exceptions */
/* Not Applicable */
/* $ Particulars */
/* This include file contains the parameters used by the */
/* family of object routines. */
/* $ Author_and_Institution */
/* W.L. Taber (JPL) */
/* $ Literature_References */
/* None. */
/* $ Version */
/* - SPICELIB Version 1.0.0, 23-FEB-1996 (WLT) */
/* -& */
/* Spicelib Function */
/* Local Variables */
/* Perform some sanity checks on the OBJ. Note OBJCHK */
/* does all the required checking in and checking out. */
objchk_("OBJNXT", obj, objlis, &ok, (ftnlen)6);
size = cardi_(objlis);
mtasiz = objlis[3];
if (! ok) {
return 0;
}
ptr = obj[0];
if (ptr == 0) {
ptr = 1;
}
i__ = ptr + mtasiz;
while(i__ < size) {
/* If this object is a non-null object, then we're done */
/* looking. */
if (objlis[i__ + 5] != 0) {
objn[0] = i__;
objn[1] = objlis[i__ + 5];
*found = TRUE_;
return 0;
}
/* Not done yet. Look at the next object. */
i__ += mtasiz;
}
/* If you get to this point, there wasn't a next object. */
/* point at the next "available" slot and set the identifier */
/* to null. */
*found = FALSE_;
objn[0] = i__;
objn[1] = 0;
return 0;
} /* objnxt_ */
-143
View File
@@ -1,143 +0,0 @@
/* objrem.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* Remove an object from an object list. */
/* Subroutine */ int objrem_(integer *obj, integer *objlis)
{
logical ok;
extern /* Subroutine */ int objchk_(char *, integer *, integer *, logical
*, ftnlen);
integer ptr;
/* $ Abstract */
/* Constants required by the family of "object" routines. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Required_Reading */
/* None. */
/* $ Keywords */
/* OBJECTS */
/* $ Parameters */
/* LBCELL is the lower bound for all cells used throughout */
/* the SPICE library.. */
/* NULL is a constant used to indicate that a particular */
/* object in a list is unused. */
/* RMPOBJ is the slot in the object list that tells how */
/* many values are stored for each object. I.E. */
/* the number of values stored for each object */
/* in an object list OBJLIS is OBJLIS(RMPOBJ). */
/* NACTIV is the slot in an object list that tells hows */
/* many objects in the list are currently active. */
/* In otherwords the number of active objects */
/* in the object list OBJLIS is OBJLIS(NACTIV) */
/* LSTID is the slot in an object list that gives the */
/* last object unique ID that was assigned. */
/* In otherwords, the value of the last unique */
/* object ID code in the object list OBJLIS */
/* is OBJLIS(LSTID). */
/* $ Files */
/* None. */
/* $ Exceptions */
/* Not Applicable */
/* $ Particulars */
/* This include file contains the parameters used by the */
/* family of object routines. */
/* $ Author_and_Institution */
/* W.L. Taber (JPL) */
/* $ Literature_References */
/* None. */
/* $ Version */
/* - SPICELIB Version 1.0.0, 23-FEB-1996 (WLT) */
/* -& */
/* Local Variables */
objchk_("OBJREM", obj, objlis, &ok, (ftnlen)6);
if (! ok) {
return 0;
}
ptr = obj[0];
objlis[ptr + 5] = 0;
--objlis[2];
return 0;
} /* objrem_ */
-164
View File
@@ -1,164 +0,0 @@
/* objsbc.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* Search an object list by component */
/* Subroutine */ int objsbc_(integer *value, integer *comp, integer *objlis,
integer *obj, logical *found)
{
/* System generated locals */
integer i__1;
/* Local variables */
integer i__, n;
extern integer objact_(integer *);
extern /* Subroutine */ int objcmp_(integer *), objnth_(integer *,
integer *, integer *, logical *);
integer ptr;
/* $ Abstract */
/* Constants required by the family of "object" routines. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Required_Reading */
/* None. */
/* $ Keywords */
/* OBJECTS */
/* $ Parameters */
/* LBCELL is the lower bound for all cells used throughout */
/* the SPICE library.. */
/* NULL is a constant used to indicate that a particular */
/* object in a list is unused. */
/* RMPOBJ is the slot in the object list that tells how */
/* many values are stored for each object. I.E. */
/* the number of values stored for each object */
/* in an object list OBJLIS is OBJLIS(RMPOBJ). */
/* NACTIV is the slot in an object list that tells hows */
/* many objects in the list are currently active. */
/* In otherwords the number of active objects */
/* in the object list OBJLIS is OBJLIS(NACTIV) */
/* LSTID is the slot in an object list that gives the */
/* last object unique ID that was assigned. */
/* In otherwords, the value of the last unique */
/* object ID code in the object list OBJLIS */
/* is OBJLIS(LSTID). */
/* $ Files */
/* None. */
/* $ Exceptions */
/* Not Applicable */
/* $ Particulars */
/* This include file contains the parameters used by the */
/* family of object routines. */
/* $ Author_and_Institution */
/* W.L. Taber (JPL) */
/* $ Literature_References */
/* None. */
/* $ Version */
/* - SPICELIB Version 1.0.0, 23-FEB-1996 (WLT) */
/* -& */
/* SPICELIB Functions */
/* Local Variables */
/* First compress the object list */
objcmp_(objlis);
n = objact_(objlis);
i__1 = n + 1;
for (i__ = 1; i__ <= i__1; ++i__) {
objnth_(objlis, &i__, obj, found);
if (*found) {
ptr = obj[0] + *comp;
if (objlis[ptr + 5] == *value) {
return 0;
}
}
}
/* If you get to this point you tried to get the N+1st object */
/* (and there are only N) FOUND will be FALSE and OBJ */
/* will be a null object. So we can just return. */
return 0;
} /* objsbc_ */
-169
View File
@@ -1,169 +0,0 @@
/* objsbf.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* Object Search By Function */
/* Find the first object for which F(OBJECT) is TRUE. */
/* Subroutine */ int objsbf_(L_fp f, integer *start, integer *objlis, integer
*obj, logical *found)
{
/* System generated locals */
integer i__1;
/* Local variables */
integer last, size, i__, mybeg;
extern /* Subroutine */ int objcmp_(integer *), objnth_(integer *,
integer *, integer *, logical *);
integer ptr;
/* $ Abstract */
/* Constants required by the family of "object" routines. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Required_Reading */
/* None. */
/* $ Keywords */
/* OBJECTS */
/* $ Parameters */
/* LBCELL is the lower bound for all cells used throughout */
/* the SPICE library.. */
/* NULL is a constant used to indicate that a particular */
/* object in a list is unused. */
/* RMPOBJ is the slot in the object list that tells how */
/* many values are stored for each object. I.E. */
/* the number of values stored for each object */
/* in an object list OBJLIS is OBJLIS(RMPOBJ). */
/* NACTIV is the slot in an object list that tells hows */
/* many objects in the list are currently active. */
/* In otherwords the number of active objects */
/* in the object list OBJLIS is OBJLIS(NACTIV) */
/* LSTID is the slot in an object list that gives the */
/* last object unique ID that was assigned. */
/* In otherwords, the value of the last unique */
/* object ID code in the object list OBJLIS */
/* is OBJLIS(LSTID). */
/* $ Files */
/* None. */
/* $ Exceptions */
/* Not Applicable */
/* $ Particulars */
/* This include file contains the parameters used by the */
/* family of object routines. */
/* $ Author_and_Institution */
/* W.L. Taber (JPL) */
/* $ Literature_References */
/* None. */
/* $ Version */
/* - SPICELIB Version 1.0.0, 23-FEB-1996 (WLT) */
/* -& */
/* Local Variables. */
/* Since we may have to do a lot of lookups, we first */
/* compress the object list to improve search performance. */
objcmp_(objlis);
last = objlis[2] + 1;
size = objlis[3] - 1;
/* Computing MIN */
i__1 = max(*start,1);
mybeg = min(i__1,last);
i__1 = last;
for (i__ = mybeg; i__ <= i__1; ++i__) {
objnth_(objlis, &i__, obj, found);
ptr = obj[0] + 1;
/* If this object matches the selection criteria, we */
/* can simply return it. */
if (*found) {
if ((*f)(&objlis[ptr + 5], &size)) {
return 0;
}
}
}
*found = FALSE_;
obj[0] = 0;
obj[1] = 0;
return 0;
} /* objsbf_ */
-158
View File
@@ -1,158 +0,0 @@
/* objset.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* Set the value of an active object in an object list. */
/* Subroutine */ int objset_(integer *obj, integer *object, integer *objlis)
{
integer i__;
extern /* Subroutine */ int chkin_(char *, ftnlen), movei_(integer *,
integer *, integer *);
logical ok;
extern /* Subroutine */ int objchk_(char *, integer *, integer *, logical
*, ftnlen), sigerr_(char *, ftnlen), chkout_(char *, ftnlen);
integer objsiz;
extern /* Subroutine */ int setmsg_(char *, ftnlen), errint_(char *,
integer *, ftnlen);
/* $ Abstract */
/* Constants required by the family of "object" routines. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Required_Reading */
/* None. */
/* $ Keywords */
/* OBJECTS */
/* $ Parameters */
/* LBCELL is the lower bound for all cells used throughout */
/* the SPICE library.. */
/* NULL is a constant used to indicate that a particular */
/* object in a list is unused. */
/* RMPOBJ is the slot in the object list that tells how */
/* many values are stored for each object. I.E. */
/* the number of values stored for each object */
/* in an object list OBJLIS is OBJLIS(RMPOBJ). */
/* NACTIV is the slot in an object list that tells hows */
/* many objects in the list are currently active. */
/* In otherwords the number of active objects */
/* in the object list OBJLIS is OBJLIS(NACTIV) */
/* LSTID is the slot in an object list that gives the */
/* last object unique ID that was assigned. */
/* In otherwords, the value of the last unique */
/* object ID code in the object list OBJLIS */
/* is OBJLIS(LSTID). */
/* $ Files */
/* None. */
/* $ Exceptions */
/* Not Applicable */
/* $ Particulars */
/* This include file contains the parameters used by the */
/* family of object routines. */
/* $ Author_and_Institution */
/* W.L. Taber (JPL) */
/* $ Literature_References */
/* None. */
/* $ Version */
/* - SPICELIB Version 1.0.0, 23-FEB-1996 (WLT) */
/* -& */
/* Local Variables */
objchk_("OBJSET", obj, objlis, &ok, (ftnlen)6);
if (! ok) {
return 0;
}
if (obj[1] == 0) {
chkin_("OBJSET", (ftnlen)6);
setmsg_("You are attempting to set the value of an inactive object. "
" You can only set the value of an active object. The object"
" pointer has value #. ", (ftnlen)141);
errint_("#", obj, (ftnlen)1);
sigerr_("SPICE(INACTIVEOBJECT)", (ftnlen)21);
chkout_("OBJSET", (ftnlen)6);
return 0;
}
objsiz = objlis[3] - 1;
i__ = obj[0] + 1;
movei_(object, &objsiz, &objlis[i__ + 5]);
return 0;
} /* objset_ */
-129
View File
@@ -1,129 +0,0 @@
/* objsiz.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
integer objsiz_(integer *objlis)
{
/* System generated locals */
integer ret_val;
/* $ Abstract */
/* Constants required by the family of "object" routines. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Required_Reading */
/* None. */
/* $ Keywords */
/* OBJECTS */
/* $ Parameters */
/* LBCELL is the lower bound for all cells used throughout */
/* the SPICE library.. */
/* NULL is a constant used to indicate that a particular */
/* object in a list is unused. */
/* RMPOBJ is the slot in the object list that tells how */
/* many values are stored for each object. I.E. */
/* the number of values stored for each object */
/* in an object list OBJLIS is OBJLIS(RMPOBJ). */
/* NACTIV is the slot in an object list that tells hows */
/* many objects in the list are currently active. */
/* In otherwords the number of active objects */
/* in the object list OBJLIS is OBJLIS(NACTIV) */
/* LSTID is the slot in an object list that gives the */
/* last object unique ID that was assigned. */
/* In otherwords, the value of the last unique */
/* object ID code in the object list OBJLIS */
/* is OBJLIS(LSTID). */
/* $ Files */
/* None. */
/* $ Exceptions */
/* Not Applicable */
/* $ Particulars */
/* This include file contains the parameters used by the */
/* family of object routines. */
/* $ Author_and_Institution */
/* W.L. Taber (JPL) */
/* $ Literature_References */
/* None. */
/* $ Version */
/* - SPICELIB Version 1.0.0, 23-FEB-1996 (WLT) */
/* -& */
ret_val = objlis[3] - 1;
return ret_val;
} /* objsiz_ */
-167
View File
@@ -1,167 +0,0 @@
/* objval.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* Get the value of some component of an object. */
/* Subroutine */ int objval_(integer *obj, integer *comp, integer *objlis,
integer *value)
{
integer i__;
extern /* Subroutine */ int chkin_(char *, ftnlen);
logical ok;
extern /* Subroutine */ int objchk_(char *, integer *, integer *, logical
*, ftnlen), sigerr_(char *, ftnlen), chkout_(char *, ftnlen);
integer objsiz;
extern /* Subroutine */ int setmsg_(char *, ftnlen), errint_(char *,
integer *, ftnlen);
/* $ Abstract */
/* Constants required by the family of "object" routines. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Required_Reading */
/* None. */
/* $ Keywords */
/* OBJECTS */
/* $ Parameters */
/* LBCELL is the lower bound for all cells used throughout */
/* the SPICE library.. */
/* NULL is a constant used to indicate that a particular */
/* object in a list is unused. */
/* RMPOBJ is the slot in the object list that tells how */
/* many values are stored for each object. I.E. */
/* the number of values stored for each object */
/* in an object list OBJLIS is OBJLIS(RMPOBJ). */
/* NACTIV is the slot in an object list that tells hows */
/* many objects in the list are currently active. */
/* In otherwords the number of active objects */
/* in the object list OBJLIS is OBJLIS(NACTIV) */
/* LSTID is the slot in an object list that gives the */
/* last object unique ID that was assigned. */
/* In otherwords, the value of the last unique */
/* object ID code in the object list OBJLIS */
/* is OBJLIS(LSTID). */
/* $ Files */
/* None. */
/* $ Exceptions */
/* Not Applicable */
/* $ Particulars */
/* This include file contains the parameters used by the */
/* family of object routines. */
/* $ Author_and_Institution */
/* W.L. Taber (JPL) */
/* $ Literature_References */
/* None. */
/* $ Version */
/* - SPICELIB Version 1.0.0, 23-FEB-1996 (WLT) */
/* -& */
/* Local Variables */
objchk_("OBJVAL", obj, objlis, &ok, (ftnlen)6);
if (! ok) {
return 0;
}
if (obj[1] == 0) {
chkin_("OBJVAL", (ftnlen)6);
setmsg_("You are attempting to fetch a value of an inactive object. "
" You can only fetch a value of an active object. The object"
" pointer has value #. ", (ftnlen)141);
errint_("#", obj, (ftnlen)1);
sigerr_("SPICE(INACTIVEOBJECT)", (ftnlen)21);
chkout_("OBJVAL", (ftnlen)6);
return 0;
}
objsiz = objlis[3] - 1;
if (*comp < 1 || *comp > objsiz) {
chkin_("OBJVAL", (ftnlen)6);
setmsg_("Objects in the list supplied have # components. You are att"
"empting to modify component # of the object. ", (ftnlen)104);
errint_("#", &objsiz, (ftnlen)1);
errint_("#", comp, (ftnlen)1);
sigerr_("SPICE(BADCOMPNUMBER)", (ftnlen)20);
chkout_("OBJVAL", (ftnlen)6);
return 0;
}
i__ = obj[0] + *comp;
*value = objlis[i__ + 5];
return 0;
} /* objval_ */
-171
View File
@@ -1,171 +0,0 @@
/* prname.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* Table of constant values */
static integer c__0 = 0;
static integer c__1 = 1;
/* $Procedure PRNAME ( PRintable body NAME for BRIEF display ) */
/* Subroutine */ int prname_(integer *object, integer *sobj, char *p1, char *
wd, char *p2, integer *size, char *kertyp, char *name__, ftnlen
p1_len, ftnlen wd_len, ftnlen p2_len, ftnlen kertyp_len, ftnlen
name_len)
{
/* System generated locals */
integer i__1;
/* Builtin functions */
/* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
integer s_rnge(char *, integer, char *, integer), i_len(char *, ftnlen);
/* Local variables */
integer r__;
extern integer rtrim_(char *, ftnlen);
extern /* Subroutine */ int getnam_(integer *, char *, char *, char *,
char *, ftnlen, ftnlen, ftnlen, ftnlen), suffix_(char *, integer *
, char *, ftnlen, ftnlen);
/* $ Abstract */
/* Construct complete printable body name for BRIEF display. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* Construct the printname for an object. */
/* $ Required_Reading */
/* None. */
/* $ Keywords */
/* None. */
/* $ Declarations */
/* $ Brief_I/O */
/* VARIABLE I/O DESCRIPTION */
/* -------- --- -------------------------------------------------- */
/* OBJECT I IDs: body+frameclass or body+center+frameclass */
/* SOBJ I Number of elements in OBJECT */
/* P1 I Pattern string for body: p1, p2, .. (see brief.pgm) */
/* WD I Separator string (e.g. 'w.r.t') */
/* P2 I Pattern string for center: p1, .. (see brief.pgm) */
/* SIZE I 1 (if only P1 is set) or 3 (if P1, WD, P2 are set) */
/* KERTYP I Kernel type: 'SPK', 'PCK' */
/* NAME O Complete printable name. */
/* $ Detailed_Input */
/* See Brief_I/O. */
/* $ Detailed_Output */
/* See Brief_I/O. */
/* $ Parameters */
/* TBD. */
/* $ Exceptions */
/* TBD. */
/* $ Files */
/* TBD. */
/* $ Particulars */
/* TBD. */
/* $ Examples */
/* None. */
/* $ Restrictions */
/* TBD. */
/* $ Literature_References */
/* None. */
/* $ Author_and_Institution */
/* B.V. Semenov (JPL) */
/* W.L. Taber (JPL) */
/* $ Version */
/* - BRIEF Version 2.0.0, 05-NOV-2007 (BVS) */
/* Changed calling sequence to include KERTYP. Changed code to */
/* map SPK ID for physical object names and PCK frame IDs and */
/* frame class IDs to frame names. Added header. */
/* - BRIEF Version 1.0.0, 14-MAR-1996 (WLT) */
/* Bill's initial version. */
/* -& */
/* $ Index_Entries */
/* get complete printable body name for BRIEF display */
/* -& */
/* Get name of the body. */
s_copy(name__, " ", name_len, (ftnlen)1);
getnam_(object, p1, kertyp, "OBJECT", name__, p1_len, kertyp_len, (ftnlen)
6, name_len);
/* Indicate non-inertial frame. */
if (object[(i__1 = *sobj - 1) < 3 && 0 <= i__1 ? i__1 : s_rnge("object",
i__1, "prname_", (ftnlen)145)] != 1) {
suffix_("*", &c__0, name__, (ftnlen)1, name_len);
}
/* If center is included, add center name to the printanle name. */
if (*size > 1) {
suffix_(wd, &c__1, name__, wd_len, name_len);
r__ = rtrim_(name__, name_len) + 2;
if (r__ < i_len(name__, name_len)) {
getnam_(&object[1], p2, kertyp, "CENTER", name__ + (r__ - 1),
p2_len, kertyp_len, (ftnlen)6, name_len - (r__ - 1));
}
}
return 0;
} /* prname_ */
-158
View File
@@ -1,158 +0,0 @@
/* rndem.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* Table of constant values */
static integer c__1 = 1;
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* Round the windows for objects inward. */
/* Subroutine */ int rndem_(char *kertyp, logical *obnam, integer *objlis,
integer *objsiz, doublereal *intval, doublereal *filwin, char *winsym,
integer *winptr, doublereal *winval, ftnlen kertyp_len, ftnlen
winsym_len)
{
/* System generated locals */
integer i__1;
doublereal d__1, d__2;
/* Local variables */
logical keep;
integer objn[2], i__;
extern integer cardd_(doublereal *);
integer n;
doublereal q, r__;
logical found;
extern /* Subroutine */ int scardd_(integer *, doublereal *), maknam_(
integer *, integer *, logical *, char *, char *, ftnlen, ftnlen);
integer object[3];
char objnam[32];
extern /* Subroutine */ int objget_(integer *, integer *, integer *),
rmaind_(doublereal *, doublereal *, doublereal *, doublereal *),
objcmp_(integer *), objrem_(integer *, integer *), wnfild_(
doublereal *, doublereal *), objnth_(integer *, integer *,
integer *, logical *);
doublereal offset;
extern /* Subroutine */ int sygetd_(char *, char *, integer *, doublereal
*, integer *, doublereal *, logical *, ftnlen, ftnlen), objnxt_(
integer *, integer *, integer *, logical *), syputd_(char *,
doublereal *, integer *, char *, integer *, doublereal *, ftnlen,
ftnlen);
logical fnd;
integer obj[2];
/* Spicelib Functions */
/* Local Variables. */
objnth_(objlis, &c__1, obj, &found);
while(found) {
/* Look up the window associated with the current */
/* object. Round the window using the rounding */
/* specified. */
objget_(obj, objlis, object);
maknam_(object, objsiz, obnam, kertyp, objnam, kertyp_len, (ftnlen)32)
;
sygetd_(objnam, winsym, winptr, winval, &n, &filwin[6], &fnd, (ftnlen)
32, winsym_len);
scardd_(&n, filwin);
/* For each interval round it inward to the specified */
/* level. */
if (*intval == 86400.) {
offset = 43200.;
} else {
offset = 0.;
}
i__1 = n;
for (i__ = 1; i__ <= i__1; i__ += 2) {
filwin[i__ + 5] += offset;
filwin[i__ + 6] += offset;
rmaind_(&filwin[i__ + 5], intval, &q, &r__);
if (r__ != 0.) {
/* Computing MIN */
d__1 = *intval * (q + 1), d__2 = filwin[i__ + 6];
filwin[i__ + 5] = min(d__1,d__2);
}
rmaind_(&filwin[i__ + 6], intval, &q, &r__);
/* Computing MAX */
d__1 = *intval * q, d__2 = filwin[i__ + 5];
filwin[i__ + 6] = max(d__1,d__2);
filwin[i__ + 5] -= offset;
filwin[i__ + 6] -= offset;
}
/* Filter out any inteval that is less than the */
/* specified rounding level. */
d__1 = *intval - .5;
wnfild_(&d__1, filwin);
/* Put the window back into the table. */
n = cardd_(filwin);
if (n > 0) {
keep = TRUE_;
syputd_(objnam, &filwin[6], &n, winsym, winptr, winval, (ftnlen)
32, winsym_len);
} else {
keep = FALSE_;
}
/* Get the next object. */
objnxt_(obj, objlis, objn, &found);
if (! keep) {
/* If we rounded away all the coverage, remove */
/* this object. */
objrem_(obj, objlis);
}
/* Move the next object into the current object. */
obj[0] = objn[0];
obj[1] = objn[1];
}
/* Now Compresss the object list. */
objcmp_(objlis);
return 0;
} /* rndem_ */
-118
View File
@@ -1,118 +0,0 @@
/*
-Header_File signal1.h (CSPICE version of the f2c signal1.h header file)
-Abstract
Define macros associated with signal handling, customized for the
host environment.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Particulars
This header defines the macro signal1 referenced in main.c,
which is a generic main routine used in CSPICE executables that
link to code generated by f2c.
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
-Restrictions
1) This header file must be updated whenever the f2c processor
or the f2c libraries libI77 and libF77 are updated.
2) This header may need to be updated to support new platforms.
The supported platforms at the time of the 03-FEB-2000 release
are:
ALPHA-DIGITAL-UNIX_C
HP_C
NEXT_C
PC-LINUX_C
PC-MS_C
SGI-IRIX-N32_C
SGI-IRIX-NO2_C
SUN-SOLARIS-GCC_C
SUN-SOLARIS-NATIVE_C
-Version
-CSPICE Version 1.0.0, 03-FEB-2000 (NJB)
*/
/* You may need to adjust the definition of signal1 to supply a */
/* cast to the correct argument type. This detail is system- and */
/* compiler-dependent. The #define below assumes signal.h declares */
/* type SIG_PF for the signal function's second argument. */
#include <signal.h>
#ifndef Sigret_t
#define Sigret_t void
#endif
#ifndef Sigarg_t
#ifdef KR_headers
#define Sigarg_t
#else
#ifdef __cplusplus
#define Sigarg_t ...
#else
#define Sigarg_t int
#endif
#endif
#endif /*Sigarg_t*/
#ifdef USE_SIG_PF /* compile with -DUSE_SIG_PF under IRIX */
#define sig_pf SIG_PF
#else
typedef Sigret_t (*sig_pf)(Sigarg_t);
#endif
#define signal1(a,b) signal(a,(sig_pf)b)
#ifdef __cplusplus
#define Sigarg ...
#define Use_Sigarg
#else
#define Sigarg Int n
#define Use_Sigarg n = n /* shut up compiler warning */
#endif
-46
View File
@@ -1,46 +0,0 @@
/* writit.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* Table of constant values */
static integer c__6 = 6;
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* Write a character string to standard output. */
/* Subroutine */ int writit_(char *line, ftnlen line_len)
{
extern /* Subroutine */ int writln_(char *, integer *, ftnlen);
writln_(line, &c__6, line_len);
return 0;
} /* writit_ */
-125
View File
@@ -1,125 +0,0 @@
/*
-Abstract
The memory allocation prototypes and macros for use in CSPICE.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Particulars
The routines maintain a count of the number of mallocs vs. free,
signalling an error if any unreleased memory exists at the end
of an Icy interface call.
The macro ALLOC_CHECK performs malloc/free test. If used, the macro
should exists at the end of any routine using these memory management
routines.
Prototypes in this file:
alloc_count
zzalloc_count
alloc_SpiceMemory
alloc_SpiceString_C_array
alloc_SpiceString_C_Copy_array
alloc_SpiceDouble_C_array
alloc_SpiceInt_C_array
alloc_SpiceString
alloc_SpiceString_Pointer_array
free_SpiceString_C_array
free_SpiceMemory
-Version
CSPICE 1.0.3 02-MAY-2008 (EDW)
Added alloc_count prototype.
CSPICE 1.0.2 10-MAY-2007 (EDW)
Minor edits to clarify 'size' in alloc_SpiceMemory as
size_t.
CSPICE 1.0.1 23-JUN-2005 (EDW)
Add prototype for alloc_SpiceString_Pointer_array, allocate
an array of pointers to SpiceChar.
Icy 1.0.0 December 19, 2003 (EDW)
Initial release.
*/
#ifndef ZZALLOC_H
#define ZZALLOC_H
/*
Allocation call prototypes:
*/
int alloc_count ();
SpiceChar ** alloc_SpiceString_C_array ( int string_length,
int string_count );
SpiceChar ** alloc_SpiceString_C_Copy_array ( int array_len ,
int string_len,
SpiceChar ** array );
SpiceDouble * alloc_SpiceDouble_C_array ( int rows,
int cols );
SpiceInt * alloc_SpiceInt_C_array ( int rows,
int cols );
SpiceChar * alloc_SpiceString ( int length );
SpiceChar ** alloc_SpiceString_Pointer_array( int array_len );
void free_SpiceString_C_array ( int dim,
SpiceChar ** array );
void * alloc_SpiceMemory ( size_t size );
void free_SpiceMemory ( void * ptr );
/*
Simple macro to ensure a zero value alloc count at end of routine.
Note, the need to use this macro exists only in those routines
allocating/deallocating memory.
*/
#define ALLOC_CHECK if ( alloc_count() != 0 ) \
{ \
setmsg_c ( "Malloc/Free count not zero at end of routine." \
" Malloc count = #."); \
errint_c ( "#", alloc_count() ); \
sigerr_c ( "SPICE(MALLOCCOUNT)" ); \
}
#endif
-86
View File
@@ -1,86 +0,0 @@
/*
-Abstract
The error control routine prototypes for use in CSPICE.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Particulars
Routines prototyped in this file:
zzerrorinit
zzerror
-Examples
See the examples section in zzerror() and zzerrorinit().
-Restrictions
None.
-Exceptions
None.
-Files
None.
-Author_and_Institution
E. D. Wright (JPL)
-Literature_References
None.
-Version
-CSPICE 1.1.0 14-JAN-2013 (EDW)
Added parameter:
SCALAR_OP
-CSPICE 1.0.0 17-OCT-2005 (EDW)
Initial release.
*/
#ifndef ZZERROR_H
#define ZZERROR_H
const char * zzerror( long cnt );
void zzerrorinit();
#define SCALAR_OP -1
#endif
-155
View File
@@ -1,155 +0,0 @@
/*
-Header_File SpiceCK.h ( CSPICE CK definitions )
-Abstract
Perform CSPICE definitions to support CK wrapper interfaces.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Particulars
This header defines types that may be referenced in
application code that calls CSPICE CK functions.
Typedef
=======
Name Description
---- ----------
SpiceCK05Subtype Typedef for enum indicating the
mathematical representation used
in an CK type 05 segment. Possible
values and meanings are:
C05TP0:
Hermite interpolation, 8-
element packets containing
q0, q1, q2, q3,
dq0/dt, dq1/dt, dq2/dt dq3/dt
where q0, q1, q2, q3 represent
quaternion components and dq0/dt,
dq1/dt, dq2/dt, dq3/dt represent
quaternion time derivative components.
Quaternions are unitless. Quaternion
time derivatives have units of
1/second.
C05TP1:
Lagrange interpolation, 4-
element packets containing
q0, q1, q2, q3,
where q0, q1, q2, q3 represent
quaternion components. Quaternion
derivatives are obtained by
differentiating interpolating
polynomials.
C05TP2:
Hermite interpolation, 14-
element packets containing
q0, q1, q2, q3,
dq0/dt, dq1/dt, dq2/dt dq3/dt,
av0, av1, av2,
dav0/dt, dav1/dt, dav2/dt
where q0, q1, q2, q3 represent
quaternion components and dq0/dt,
dq1/dt, dq2/dt, dq3/dt represent
quaternion time derivative components,
av0, av1, av2 represent angular
velocity components, and
dav0/dt, dav1/dt, dav2/dt represent
angular acceleration components.
C05TP3:
Lagrange interpolation, 7-
element packets containing
q0, q1, q2, q3,
av0, av1, av2
where q0, q1, q2, q3 represent
quaternion components and
av0, av1, av2 represent angular
velocity components.
Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
-Restrictions
None.
-Version
-CSPICE Version 1.0.0, 20-AUG-2002 (NJB)
*/
#ifndef HAVE_SPICE_CK_H
#define HAVE_SPICE_CK_H
/*
CK type 05 subtype codes:
*/
enum _SpiceCK05Subtype { C05TP0, C05TP1, C05TP2, C05TP3 };
typedef enum _SpiceCK05Subtype SpiceCK05Subtype;
#endif
-441
View File
@@ -1,441 +0,0 @@
/*
-Header_File SpiceCel.h ( CSPICE Cell definitions )
-Abstract
Perform CSPICE definitions for the SpiceCell data type.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
CELLS
-Particulars
This header defines structures, macros, and enumerated types that
may be referenced in application code that calls CSPICE cell
functions.
CSPICE cells are data structures that implement functionality
parallel to that of the cell abstract data type in SPICELIB. In
CSPICE, a cell is a C structure containing bookkeeping information,
including a pointer to an associated data array.
For numeric data types, the data array is simply a SPICELIB-style
cell, including a valid control area. For character cells, the data
array has the same number of elements as the corresponding
SPICELIB-style cell, but the contents of the control area are not
maintained, and the data elements are null-terminated C-style
strings.
CSPICE cells should be declared using the declaration macros
provided in this header file. See the table of macros below.
Structures
==========
Name Description
---- ----------
SpiceCell Structure containing CSPICE cell metadata.
The members are:
dtype: Data type of cell: character,
integer, or double precision.
dtype has type
SpiceCellDataType.
length: For character cells, the
declared length of the
cell's string array.
size: The maximum number of data
items that can be stored in
the cell's data array.
card: The cell's "cardinality": the
number of data items currently
present in the cell.
isSet: Boolean flag indicating whether
the cell is a CSPICE set.
Sets have no duplicate data
items, and their data items are
stored in increasing order.
adjust: Boolean flag indicating whether
the cell's data area has
adjustable size. Adjustable
size cell data areas are not
currently implemented.
init: Boolean flag indicating whether
the cell has been initialized.
base: is a void pointer to the
associated data array. base
points to the start of the
control area of this array.
data: is a void pointer to the
first data slot in the
associated data array. This
slot is the element following
the control area.
ConstSpiceCell A const SpiceCell.
Declaration Macros
==================
Name Description
---- ----------
SPICECHAR_CELL ( name, size, length ) Declare a
character CSPICE
cell having cell
name name,
maximum cell
cardinality size,
and string length
length. The
macro declares
both the cell and
the associated
data array. The
name of the data
array begins with
"SPICE_".
SPICEDOUBLE_CELL ( name, size ) Like SPICECHAR_CELL,
but declares a
double precision
cell.
SPICEINT_CELL ( name, size ) Like
SPICECHAR_CELL,
but declares an
integer cell.
Assignment Macros
=================
Name Description
---- ----------
SPICE_CELL_SET_C( item, i, cell ) Assign the ith
element of a
character cell.
Arguments cell
and item are
pointers.
SPICE_CELL_SET_D( item, i, cell ) Assign the ith
element of a
double precision
cell. Argument
cell is a
pointer.
SPICE_CELL_SET_I( item, i, cell ) Assign the ith
element of an
integer cell.
Argument cell is
a pointer.
Fetch Macros
==============
Name Description
---- ----------
SPICE_CELL_GET_C( cell, i, lenout, item ) Fetch the ith
element from a
character cell.
Arguments cell
and item are
pointers.
Argument lenout
is the available
space in item.
SPICE_CELL_GET_D( cell, i, item ) Fetch the ith
element from a
double precision
cell. Arguments
cell and item are
pointers.
SPICE_CELL_GET_I( cell, i, item ) Fetch the ith
element from an
integer cell.
Arguments cell
and item are
pointers.
Element Pointer Macros
======================
Name Description
---- ----------
SPICE_CELL_ELEM_C( cell, i ) Macro evaluates
to a SpiceChar
pointer to the
ith data element
of a character
cell. Argument
cell is a
pointer.
SPICE_CELL_ELEM_D( cell, i ) Macro evaluates
to a SpiceDouble
pointer to the
ith data element
of a double
precision cell.
Argument cell is
a pointer.
SPICE_CELL_ELEM_I( cell, i ) Macro evaluates
to a SpiceInt
pointer to the
ith data element
of an integer
cell. Argument
cell is a
pointer.
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
-Restrictions
None.
-Version
-CSPICE Version 1.0.0, 22-AUG-2002 (NJB)
*/
#ifndef HAVE_SPICE_CELLS_H
#define HAVE_SPICE_CELLS_H
/*
Data type codes:
*/
typedef enum _SpiceDataType SpiceCellDataType;
/*
Cell structure:
*/
struct _SpiceCell
{ SpiceCellDataType dtype;
SpiceInt length;
SpiceInt size;
SpiceInt card;
SpiceBoolean isSet;
SpiceBoolean adjust;
SpiceBoolean init;
void * base;
void * data; };
typedef struct _SpiceCell SpiceCell;
typedef const SpiceCell ConstSpiceCell;
/*
SpiceCell control area size:
*/
#define SPICE_CELL_CTRLSZ 6
/*
Declaration macros:
*/
#define SPICECHAR_CELL( name, size, length ) \
\
static SpiceChar SPICE_CELL_##name[SPICE_CELL_CTRLSZ + size][length]; \
\
static SpiceCell name = \
\
{ SPICE_CHR, \
length, \
size, \
0, \
SPICETRUE, \
SPICEFALSE, \
SPICEFALSE, \
(void *) &(SPICE_CELL_##name), \
(void *) &(SPICE_CELL_##name[SPICE_CELL_CTRLSZ]) }
#define SPICEDOUBLE_CELL( name, size ) \
\
static SpiceDouble SPICE_CELL_##name [SPICE_CELL_CTRLSZ + size]; \
\
static SpiceCell name = \
\
{ SPICE_DP, \
0, \
size, \
0, \
SPICETRUE, \
SPICEFALSE, \
SPICEFALSE, \
(void *) &(SPICE_CELL_##name), \
(void *) &(SPICE_CELL_##name[SPICE_CELL_CTRLSZ]) }
#define SPICEINT_CELL( name, size ) \
\
static SpiceInt SPICE_CELL_##name [SPICE_CELL_CTRLSZ + size]; \
\
static SpiceCell name = \
\
{ SPICE_INT, \
0, \
size, \
0, \
SPICETRUE, \
SPICEFALSE, \
SPICEFALSE, \
(void *) &(SPICE_CELL_##name), \
(void *) &(SPICE_CELL_##name[SPICE_CELL_CTRLSZ]) }
/*
Access macros for individual elements:
*/
/*
Data element pointer macros:
*/
#define SPICE_CELL_ELEM_C( cell, i ) \
\
( ( (SpiceChar *) (cell)->data ) + (i)*( (cell)->length ) )
#define SPICE_CELL_ELEM_D( cell, i ) \
\
( ( (SpiceDouble *) (cell)->data )[(i)] )
#define SPICE_CELL_ELEM_I( cell, i ) \
\
( ( (SpiceInt *) (cell)->data )[(i)] )
/*
"Fetch" macros:
*/
#define SPICE_CELL_GET_C( cell, i, lenout, item ) \
\
{ \
SpiceInt nBytes; \
\
nBytes = brckti_c ( (cell)->length, 0, (lenout-1) ) \
* sizeof ( SpiceChar ); \
\
memmove ( (item), SPICE_CELL_ELEM_C((cell), (i)), nBytes ); \
\
item[nBytes] = NULLCHAR; \
}
#define SPICE_CELL_GET_D( cell, i, item ) \
\
( (*item) = ( (SpiceDouble *) (cell)->data)[i] )
#define SPICE_CELL_GET_I( cell, i, item ) \
\
( (*item) = ( (SpiceInt *) (cell)->data)[i] )
/*
Assignment macros:
*/
#define SPICE_CELL_SET_C( item, i, cell ) \
\
{ \
SpiceChar * sPtr; \
SpiceInt nBytes; \
\
nBytes = brckti_c ( strlen(item), 0, (cell)->length - 1 ) \
* sizeof ( SpiceChar ); \
\
sPtr = SPICE_CELL_ELEM_C((cell), (i)); \
\
memmove ( sPtr, (item), nBytes ); \
\
sPtr[nBytes] = NULLCHAR; \
}
#define SPICE_CELL_SET_D( item, i, cell ) \
\
( ( (SpiceDouble *) (cell)->data)[i] = (item) )
#define SPICE_CELL_SET_I( item, i, cell ) \
\
( ( (SpiceInt *) (cell)->data)[i] = (item) )
/*
The enum SpiceTransDir is used to indicate language translation
direction: C to Fortran or vice versa.
*/
enum _SpiceTransDir { C2F = 0, F2C = 1 };
typedef enum _SpiceTransDir SpiceTransDir;
#endif
-448
View File
@@ -1,448 +0,0 @@
/*
-Header_File SpiceEK.h ( CSPICE EK-specific definitions )
-Abstract
Perform CSPICE EK-specific definitions, including macros and user-
defined types.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Particulars
This header defines macros, enumerated types, structures, and
typedefs that may be referenced in application code that calls CSPICE
EK functions.
Macros
======
General limits
--------------
Name Description
---- ----------
SPICE_EK_MXCLSG Maximum number of columns per segment.
SPICE_EK_TYPLEN Maximum length of a short string
indicating a data type (one of
{"CHR", "DP", "INT", "TIME"}). Such
strings are returned by some of the
Fortran SPICELIB EK routines, hence also
by their f2c'd counterparts.
Sizes of EK objects
-------------------
Name Description
---- ----------
SPICE_EK_CNAMSZ Maximum length of column name.
SPICE_EK_CSTRLN Length of string required to hold column
name.
SPICE_EK_TNAMSZ Maximum length of table name.
SPICE_EK_TSTRLN Length of string required to hold table
name.
Query-related limits
--------------------
Name Description
---- ----------
SPICE_EK_MAXQRY Maximum length of an input query. This
value is currently equivalent to
twenty-five 80-character lines.
SPICE_EK_MAXQSEL Maximum number of columns that may be
listed in the `SELECT clause' of a query.
SPICE_EK_MAXQTAB Maximum number of tables that may be
listed in the `FROM clause' of a query.
SPICE_EK_MAXQCON Maximum number of relational expressions
that may be listed in the `constraint
clause' of a query.
This limit applies to a query when it is
represented in `normalized form': that
is, the constraints have been expressed
as a disjunction of conjunctions of
relational expressions. The number of
relational expressions in a query that
has been expanded in this fashion may be
greater than the number of relations in
the query as orginally written. For
example, the expression
( ( A LT 1 ) OR ( B GT 2 ) )
AND
( ( C NE 3 ) OR ( D EQ 4 ) )
which contains 4 relational expressions,
expands to the equivalent normalized
constraint
( ( A LT 1 ) AND ( C NE 3 ) )
OR
( ( A LT 1 ) AND ( D EQ 4 ) )
OR
( ( B GT 2 ) AND ( C NE 3 ) )
OR
( ( B GT 2 ) AND ( D EQ 4 ) )
which contains eight relational
expressions.
SPICE_EK_MAXQJOIN Maximum number of tables that can be
joined.
SPICE_EK_MAXQJCON Maximum number of join constraints
allowed.
SPICE_EK_MAXQORD Maximum number of columns that may be
used in the `order-by clause' of a query.
SPICE_EK_MAXQTOK Maximum number of tokens in a query.
Tokens
are reserved words, column names,
parentheses, and values. Literal strings
and time values count as single tokens.
SPICE_EK_MAXQNUM Maximum number of numeric tokens in a
query.
SPICE_EK_MAXQCLN Maximum total length of character tokens
in a query.
SPICE_EK_MAXQSTR Maximum length of literal string values
allowed in queries.
Codes
-----
Name Description
---- ----------
SPICE_EK_VARSIZ Code used to indicate variable-size
objects. Usually this is used in a
context where a non-negative integer
indicates the size of a fixed-size object
and the presence of this code indicates a
variable-size object.
The value of this constant must match the
parameter IFALSE used in the Fortran
library SPICELIB.
Enumerated Types
================
Enumerated code values
----------------------
Name Description
---- ----------
SpiceEKDataType Codes for data types used in the EK
interface: character, double precision,
integer, and "time."
The values are:
{ SPICE_CHR = 0,
SPICE_DP = 1,
SPICE_INT = 2,
SPICE_TIME = 3 }
SpiceEKExprClass Codes for types of expressions that may
appear in the SELECT clause of EK
queries. Values and meanings are:
SPICE_EK_EXP_COL Selected item was a
column. The column
may qualified by a
table name.
SPICE_EK_EXP_FUNC Selected item was
a simple function
invocation of the
form
F ( <column> )
or else was
COUNT(*)
SPICE_EK_EXP_EXPR Selected item was a
more general
expression than
those shown above.
Numeric values are:
{ SPICE_EK_EXP_COL = 0,
SPICE_EK_EXP_FUNC = 1,
SPICE_EK_EXP_EXPR = 2 }
Structures
==========
EK API structures
-----------------
Name Description
---- ----------
SpiceEKAttDsc EK column attribute descriptor. Note
that this object is distinct from the EK
column descriptors used internally in
the EK routines; those descriptors
contain pointers as well as attribute
information.
The members are:
cclass: Column class code.
dtype: Data type code: has type
SpiceEKDataType.
strlen: String length. Applies to
SPICE_CHR type. Value is
SPICE_EK_VARSIZ for
variable-length strings.
size: Column entry size; this is
the number of array
elements in a column
entry. The value is
SPICE_EK_VARSIZ for
variable-size columns.
indexd: Index flag; value is
SPICETRUE if the column is
indexed, SPICEFALSE
otherwise.
nullok: Null flag; value is
SPICETRUE if the column
may contain null values,
SPICEFALSE otherwise.
SpiceEKSegSum EK segment summary. This structure
contains user interface level descriptive
information. The structure contains the
following members:
tabnam The name of the table to
which the segment belongs.
nrows The number of rows in the
segment.
ncols The number of columns in
the segment.
cnames An array of names of
columns in the segment.
Column names may contain
as many as SPICE_EK_CNAMSZ
characters. The array
contains room for
SPICE_EK_MXCLSG column
names.
cdescrs An array of column
attribute descriptors of
type SpiceEKAttDsc.
The array contains room
for SPICE_EK_MXCLSG
descriptors. The Ith
descriptor corresponds to
the column whose name is
the Ith element of the
array cnames.
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
-Restrictions
None.
-Version
-CSPICE Version 2.0.0 27-JUL-2002 (NJB)
Defined SpiceEKDataType using SpiceDataType. Removed declaration
of enum _SpiceEKDataType.
-CSPICE Version 1.0.0, 05-JUL-1999 (NJB)
Renamed _SpiceEKAttDsc member "class" to "cclass." The
former name is a reserved word in C++.
-CSPICE Version 1.0.0, 24-FEB-1999 (NJB)
*/
#ifndef HAVE_SPICE_EK_H
#define HAVE_SPICE_EK_H
/*
Constants
*/
/*
Sizes of EK objects:
*/
#define SPICE_EK_CNAMSZ 32
#define SPICE_EK_CSTRLN ( SPICE_EK_CNAMSZ + 1 )
#define SPICE_EK_TNAMSZ 64
#define SPICE_EK_TSTRLN ( SPICE_EK_TNAMSZ + 1 )
/*
Maximum number of columns per segment:
*/
#define SPICE_EK_MXCLSG 100
/*
Maximum length of string indicating data type:
*/
#define SPICE_EK_TYPLEN 4
/*
Query-related limits (see header for details):
*/
#define SPICE_EK_MAXQRY 2000
#define SPICE_EK_MAXQSEL 50
#define SPICE_EK_MAXQTAB 10
#define SPICE_EK_MAXQCON 1000
#define SPICE_EK_MAXQJOIN 10
#define SPICE_EK_MAXQJCON 100
#define SPICE_EK_MAXQORD 10
#define SPICE_EK_MAXQTOK 500
#define SPICE_EK_MAXQNUM 100
#define SPICE_EK_MAXQCLN SPICE_EK_MAXQRY
#define SPICE_EK_MAXQSTR 1024
/*
Code indicating "variable size":
*/
#define SPICE_EK_VARSIZ (-1)
/*
Data type codes:
*/
typedef SpiceDataType SpiceEKDataType;
/*
SELECT clause expression type codes:
*/
enum _SpiceEKExprClass{ SPICE_EK_EXP_COL = 0,
SPICE_EK_EXP_FUNC = 1,
SPICE_EK_EXP_EXPR = 2 };
typedef enum _SpiceEKExprClass SpiceEKExprClass;
/*
EK column attribute descriptor:
*/
struct _SpiceEKAttDsc
{ SpiceInt cclass;
SpiceEKDataType dtype;
SpiceInt strlen;
SpiceInt size;
SpiceBoolean indexd;
SpiceBoolean nullok; };
typedef struct _SpiceEKAttDsc SpiceEKAttDsc;
/*
EK segment summary:
*/
struct _SpiceEKSegSum
{ SpiceChar tabnam [SPICE_EK_TSTRLN];
SpiceInt nrows;
SpiceInt ncols;
SpiceChar cnames [SPICE_EK_MXCLSG][SPICE_EK_CSTRLN];
SpiceEKAttDsc cdescrs[SPICE_EK_MXCLSG]; };
typedef struct _SpiceEKSegSum SpiceEKSegSum;
#endif
-115
View File
@@ -1,115 +0,0 @@
/*
-Header_File SpiceEll.h ( CSPICE Ellipse definitions )
-Abstract
Perform CSPICE definitions for the SpiceEllipse data type.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Particulars
This header defines structures and typedefs that may be referenced in
application code that calls CSPICE Ellipse functions.
Structures
==========
Name Description
---- ----------
SpiceEllipse Structure representing an ellipse in 3-
dimensional space.
The members are:
center: Vector defining ellipse's
center.
semiMajor: Vector defining ellipse's
semi-major axis.
semiMinor: Vector defining ellipse's
semi-minor axis.
The ellipse is the set of points
{X: X = center
+ cos(theta) * semiMajor
+ sin(theta) * semiMinor,
theta in [0, 2*Pi) }
ConstSpiceEllipse A const SpiceEllipse.
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
-Restrictions
None.
-Version
-CSPICE Version 1.0.0, 04-MAR-1999 (NJB)
*/
#ifndef HAVE_SPICE_ELLIPSES
#define HAVE_SPICE_ELLIPSES
/*
Ellipse structure:
*/
struct _SpiceEllipse
{ SpiceDouble center [3];
SpiceDouble semiMajor [3];
SpiceDouble semiMinor [3]; };
typedef struct _SpiceEllipse SpiceEllipse;
typedef const SpiceEllipse ConstSpiceEllipse;
#endif
-141
View File
@@ -1,141 +0,0 @@
/*
-Header_File SpiceErr.h ( CSPICE error handling definitions )
-Abstract
Perform CSPICE definitions for error handling APIs.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Particulars
This header defines constants that may be referenced in
application code that calls CSPICE error handling functions.
CONSTANTS
==========
Name Description
---- ----------
SPICE_ERROR_LMSGLN Maximum length of a long error message,
including the null terminator.
SPICE_ERROR_SMSGLN Maximum length of a short error message,
including the null terminator.
SPICE_ERROR_XMSGLN Maximum length of a short error
explanation message, including the null
terminator.
SPICE_ERROR_MODLEN Maximum length of a module name
appearing in the traceback message,
including the null terminator.
SPICE_ERROR_MAXMOD Maximum count of module names
appearing in the traceback message.
SPICE_ERROR_TRCLEN Maximum length of a traceback message,
including the null terminator.
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
-Restrictions
None.
-Version
-CSPICE Version 1.0.0, 05-NOV-2013 (NJB)
*/
#ifndef HAVE_SPICE_ERROR_HANDLING
#define HAVE_SPICE_ERROR_HANDLING
/*
Local constants
*/
#define ARROWLEN 5
/*
Public constants
*/
/*
Long error message length, which is equal to
( 23 * 80 ) + 1
*/
#define SPICE_ERROR_LMSGLN 1841
/*
Short error message length:
*/
#define SPICE_ERROR_SMSGLN 26
/*
Short error message explanation length:
*/
#define SPICE_ERROR_XMSGLN 81
/*
Module name length for traceback entries:
*/
#define SPICE_ERROR_MODLEN 33
/*
Maximum module count for traceback string:
*/
#define SPICE_ERROR_MAXMOD 100
/*
Maximum length of traceback string returned
by qcktrc_c.
*/
#define SPICE_ERROR_TRCLEN ( ( SPICE_ERROR_MAXMOD \
* ( SPICE_ERROR_MODLEN-1 ) ) \
+ ( ARROWLEN \
* ( SPICE_ERROR_MAXMOD-1 ) ) \
+ 1 )
#endif
-193
View File
@@ -1,193 +0,0 @@
/*
-Header_File SpiceFrm.h ( CSPICE frame subsystem definitions )
-Abstract
Perform CSPICE definitions for frame subsystem APIs.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
CK
FRAMES
PCK
-Particulars
This header defines constants that may be referenced in
application code that calls CSPICE frame subsystem APIs.
CONSTANTS
==========
Frame counts
------------
The following parameter are counts of built-in frames. These
parameters correspond to those defined in the SPICELIB Fortran
INCLUDE files
ninert.inc
nninrt.inc
Name Description
---- ----------
SPICE_NFRAME_NINERT Number of built-in inertial frames.
SPICE_NFRAME_NNINRT Number of built-in non-inertial frames.
Frame classes
-------------
The following parameters identify SPICE frame classes. These
parameters correspond to those defined in the SPICELIB Fortran
INCLUDE file frmtyp.inc. See the Frames Required Reading for a
detailed discussion of frame classes.
Name Description
---- ----------
SPICE_FRMTYP_INERTL an inertial frame that is listed in the
f2c'd routine chgirf_ and that requires
no external file to compute the
transformation from or to any other
inertial frame.
SPICE_FRMTYP_PCK is a frame that is specified relative
to some built-in, inertial frame (of
class SPICE_FRMTYP_INERTL) and that has
an IAU model that may be retrieved from
the PCK system via a call to the
routine tisbod_c.
SPICE_FRMTYP_CK is a frame defined by a C-kernel.
SPICE_FRMTYP_TK is a "text kernel" frame. These frames
are offset from their associated
"relative" frames by a constant
rotation.
SPICE_FRMTYP_DYN is a "dynamic" frame. These currently
are limited to parameterized frames
where the full frame definition depends
on parameters supplied via a frame
kernel.
SPICE_FRMTYP_ALL indicates any of the above classes.
This parameter is used in APIs that
fetch information about frames of a
specified class.
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
-Restrictions
None.
-Version
-CSPICE Version 1.0.0, 23-MAY-2012 (NJB)
*/
#ifndef HAVE_SPICE_FRAME_DEFS
#define HAVE_SPICE_FRAME_DEFS
/*
Frame counts:
*/
/*
Number of built-in inertial frames. This number must be kept in
sync with that defined in the SPICELIB include file ninert.inc.
*/
#define SPICE_NFRAME_NINERT 21
/*
Number of built-in non-inertial frames. This number must be kept in
sync with that defined in the SPICELIB include file nninrt.inc.
*/
#define SPICE_NFRAME_NNINRT 105
/*
The frame class codes defined here are identical
to those used in SPICELIB.
*/
/*
Inertial, built-in frames:
*/
#define SPICE_FRMTYP_INERTL 1
/*
PCK frames:
*/
#define SPICE_FRMTYP_PCK 2
/*
CK frames:
*/
#define SPICE_FRMTYP_CK 3
/*
TK frames:
*/
#define SPICE_FRMTYP_TK 4
/*
Dynamic frames:
*/
#define SPICE_FRMTYP_DYN 5
/*
All frame classes:
*/
#define SPICE_FRMTYP_ALL ( -1 )
#endif
-341
View File
@@ -1,341 +0,0 @@
/*
-Header_File SpiceGF.h ( CSPICE GF-specific definitions )
-Abstract
Perform CSPICE GF-specific definitions.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
GF
-Keywords
GEOMETRY
SEARCH
-Exceptions
None
-Files
None
-Particulars
This header defines macros that may be referenced in application
code that calls CSPICE GF functions.
Macros
======
Workspace parameters
--------------------
CSPICE applications normally don't declare workspace arguments
and therefore don't directly reference workspace size parameters.
However, CSPICE GF APIs dealing with numeric constraints
dynamically allocate workspace memory; the amount allocated
depends on the number of intervals the workspace windows can
hold. This amount is an input argument to the GF numeric quantity
APIs.
The parameters below are used to calculate the amount of memory
required. Each workspace window contains 6 double precision
numbers in its control area and 2 double precision numbers for
each interval it can hold.
Name Description
---- ----------
SPICE_GF_NWMAX Maximum number of windows required for
a user-defined workspace array.
SPICE_GF_NWDIST Number of workspace windows used by
gfdist_c and the underlying SPICELIB
routine GFDIST.
SPICE_GF_NWILUM Number of workspace windows used by
gfilum_c and the underlying SPICELIB
routine GFILUM.
SPICE_GF_NWSEP Number of workspace windows used by
gfsep_c and the underlying SPICELIB
routine GFSEP.
SPICE_GF_NWRR Number of workspace windows used by
gfrr_c and the underlying SPICELIB
routine GFRR.
SPICE_GF_NWPA Number of workspace windows used by
gfpa_c and the underlying SPICELIB
routine GFPA.
Field of view (FOV) parameters
------------------------------
Name Description
---- ----------
SPICE_GF_MAXVRT Maximum allowed number of boundary
vectors for a polygonal FOV.
SPICE_GF_CIRFOV Parameter identifying a circular FOV.
SPICE_GF_ELLFOV Parameter identifying a elliptical FOV.
SPICE_GF_POLFOV Parameter identifying a polygonal FOV.
SPICE_GF_RECFOV Parameter identifying a rectangular FOV.
SPICE_GF_SHPLEN Parameter specifying maximum length of
a FOV shape name.
SPICE_GF_MARGIN is a small positive number used to
constrain the orientation of the
boundary vectors of polygonal FOVs. Such
FOVs must satisfy the following
constraints:
1) The boundary vectors must be
contained within a right circular
cone of angular radius less than
than (pi/2) - MARGIN radians; in
other words, there must be a vector
A such that all boundary vectors
have angular separation from A of
less than (pi/2)-MARGIN radians.
2) There must be a pair of boundary
vectors U, V such that all other
boundary vectors lie in the same
half space bounded by the plane
containing U and V. Furthermore, all
other boundary vectors must have
orthogonal projections onto a plane
normal to this plane such that the
projections have angular separation
of at least 2*MARGIN radians from
the plane spanned by U and V.
MARGIN is currently set to 1.D-12.
Occultation parameters
----------------------
SPICE_GF_ANNULR Parameter identifying an "annular
occultation." This geometric condition
is more commonly known as a "transit."
The limb of the background object must
not be blocked by the foreground object
in order for an occultation to be
"annular."
SPICE_GF_ANY Parameter identifying any type of
occultation or transit.
SPICE_GF_FULL Parameter identifying a full
occultation: the foreground body
entirely blocks the background body.
SPICE_GF_PARTL Parameter identifying an "partial
occultation." This is an occultation in
which the foreground body blocks part,
but not all, of the limb of the
background body.
Target shape parameters
-----------------------
SPICE_GF_EDSHAP Parameter indicating a target object's
shape is modeled as an ellipsoid.
SPICE_GF_PTSHAP Parameter indicating a target object's
shape is modeled as a point.
SPICE_GF_RYSHAP Parameter indicating a target object's
"shape" is modeled as a ray emanating
from an observer's location. This model
may be used in visibility computations
for targets whose direction, but not
position, relative to an observer is
known.
SPICE_GF_SPSHAP Parameter indicating a target object's
shape is modeled as a point.
Search parameters
-----------------
These parameters affect the manner in which GF searches are
performed.
SPICE_GF_ADDWIN is a parameter used in numeric quantity
searches that use an equality
constraint. This parameter is used to
expand the confinement window (the
window over which the search is
performed) by a small amount at both
ends. This expansion accommodates the
case where a geometric quantity is equal
to a reference value at a boundary point
of the original confinement window.
SPICE_GF_CNVTOL is the default convergence tolerance
used by GF routines that don't support a
user-supplied tolerance value. GF
searches for roots will terminate when a
root is bracketed by times separated by
no more than this tolerance. Units are
seconds.
Configuration parameter
-----------------------
SPICE_GFEVNT_MAXPAR Parameter indicating the maximum number of
elements needed for the 'qnames' and 'q*pars'
arrays used in gfevnt_c.
SpiceChar qcpars[SPICE_GFEVNT_MAXPAR][LNSIZE];
SpiceDouble qdpars[SPICE_GFEVNT_MAXPAR];
SpiceInt qipars[SPICE_GFEVNT_MAXPAR];
SpiceBoolean qlpars[SPICE_GFEVNT_MAXPAR];
-Examples
None
-Restrictions
None.
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
L.S. Elson (JPL)
-Version
-CSPICE Version 2.1.0, 23-FEB-2012 (NJB)
Added parameters:
SPICE_GF_NWILUM
SPICE_GF_NWRR
SPICE_GF_NWPA
-CSPICE Version 2.0.0, 23-JUN-2009 (NJB)
Added parameter for maximum length of FOV shape string.
-CSPICE Version 1.0.0, 11-MAR-2009 (NJB)
*/
#ifndef HAVE_SPICE_GF_H
#define HAVE_SPICE_GF_H
/*
See the Particulars section above for parameter descriptions.
*/
/*
Workspace parameters
*/
#define SPICE_GF_NWMAX 15
#define SPICE_GF_NWDIST 5
#define SPICE_GF_NWILUM 5
#define SPICE_GF_NWSEP 5
#define SPICE_GF_NWRR 5
#define SPICE_GF_NWPA 5
/*
Field of view (FOV) parameters
*/
#define SPICE_GF_MAXVRT 10000
#define SPICE_GF_CIRFOV "CIRCLE"
#define SPICE_GF_ELLFOV "ELLIPSE"
#define SPICE_GF_POLFOV "POLYGON"
#define SPICE_GF_RECFOV "RECTANGLE"
#define SPICE_GF_SHPLEN 10
#define SPICE_GF_MARGIN ( 1.e-12 )
/*
Occultation parameters
*/
#define SPICE_GF_ANNULR "ANNULAR"
#define SPICE_GF_ANY "ANY"
#define SPICE_GF_FULL "FULL"
#define SPICE_GF_PARTL "PARTIAL"
/*
Target shape parameters
*/
#define SPICE_GF_EDSHAP "ELLIPSOID"
#define SPICE_GF_PTSHAP "POINT"
#define SPICE_GF_RYSHAP "RAY"
#define SPICE_GF_SPSHAP "SPHERE"
/*
Search parameters
*/
#define SPICE_GF_ADDWIN 1.0
#define SPICE_GF_CNVTOL 1.e-6
/*
Configuration parameters.
*/
#define SPICE_GFEVNT_MAXPAR 10
#endif
/*
End of header file SpiceGF.h
*/
-147
View File
@@ -1,147 +0,0 @@
/*
-Header_File SpiceOccult.h ( CSPICE Occultation specific definitions )
-Abstract
Perform CSPICE occultation specific definitions.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Keywords
OCCULTATION
GEOMETRY
ELLIPSOID
-Exceptions
None
-Files
None
-Particulars
The following integer codes indicate the geometric relationship
of the three bodies.
The meaning of the sign of each code is given below.
Code sign Meaning
--------- ------------------------------
> 0 The second ellipsoid is
partially or fully occulted
by the first.
< 0 The first ellipsoid is
partially of fully
occulted by the second.
= 0 No occultation.
The meanings of the codes are given below. The variable names
indicate the type of occultation and which target is in the back.
For example, SPICE_OCCULT_TOTAL1 represents a total occultation in which
the first target is in the back (or occulted by) the second target.
Name Code Meaning
------ ----- ------------------------------
SPICE_OCCULT_TOTAL1 -3 Total occultation of first
target by second.
SPICE_OCCULT_ANNLR1 -2 Annular occultation of first
target by second. The second
target does not block the limb
of the first.
SPICE_OCCULT_PARTL1 -1 Partial occultation of first
target by second target.
SPICE_OCCULT_NOOCC 0 No occultation or transit: both
objects are completely visible
to the observer.
SPICE_OCCULT_PARTL2 1 Partial occultation of second
target by first target.
SPICE_OCCULT_ANNLR2 2 Annular occultation of second
target by first.
SPICE_OCCULT_TOTAL2 3 Total occultation of second
target by first.
-Examples
None
-Restrictions
None.
-Literature_References
None.
-Author_and_Institution
S.C. Krening (JPL)
N.J. Bachman (JPL)
-Version
-CSPICE Version 1.0.0, 23-FEB-2012 (SCK)
*/
#ifndef HAVE_SPICE_OCCULT_H
#define HAVE_SPICE_OCCULT_H
/*
See the Particulars section above for parameter descriptions.
*/
/*
Occultation parameters
*/
#define SPICE_OCCULT_TOTAL1 -3
#define SPICE_OCCULT_ANNLR1 -2
#define SPICE_OCCULT_PARTL1 -1
#define SPICE_OCCULT_NOOCC 0
#define SPICE_OCCULT_PARTL2 1
#define SPICE_OCCULT_ANNLR2 2
#define SPICE_OCCULT_TOTAL2 3
#endif
-106
View File
@@ -1,106 +0,0 @@
/*
-Header_File SpicePln.h ( CSPICE Plane definitions )
-Abstract
Perform CSPICE definitions for the SpicePlane data type.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Particulars
This header defines structures and typedefs that may be referenced in
application code that calls CSPICE Plane functions.
Structures
==========
Name Description
---- ----------
SpicePlane Structure representing a plane in 3-
dimensional space.
The members are:
normal: Vector normal to plane.
constant: Constant of plane equation
Plane =
{X: <normal,X> = constant}
ConstSpicePlane A const SpicePlane.
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
-Restrictions
None.
-Version
-CSPICE Version 1.0.0, 04-MAR-1999 (NJB)
*/
#ifndef HAVE_SPICE_PLANES
#define HAVE_SPICE_PLANES
/*
Plane structure:
*/
struct _SpicePlane
{ SpiceDouble normal [3];
SpiceDouble constant; };
typedef struct _SpicePlane SpicePlane;
typedef const SpicePlane ConstSpicePlane;
#endif
-128
View File
@@ -1,128 +0,0 @@
/*
-Header_File SpiceSPK.h ( CSPICE SPK definitions )
-Abstract
Perform CSPICE definitions to support SPK wrapper interfaces.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Particulars
This header defines types that may be referenced in
application code that calls CSPICE SPK functions.
Typedef
=======
Name Description
---- ----------
SpiceSPK18Subtype Typedef for enum indicating the
mathematical representation used
in an SPK type 18 segment. Possible
values and meanings are:
S18TP0:
Hermite interpolation, 12-
element packets containing
x, y, z, dx/dt, dy/dt, dz/dt,
vx, vy, vz, dvx/dt, dvy/dt, dvz/dt
where x, y, z represent Cartesian
position components and vx, vy, vz
represent Cartesian velocity
components. Note well: vx, vy, and
vz *are not necessarily equal* to the
time derivatives of x, y, and z.
This packet structure mimics that of
the Rosetta/MEX orbit file from which
the data are taken.
Position units are kilometers,
velocity units are kilometers per
second, and acceleration units are
kilometers per second per second.
S18TP1:
Lagrange interpolation, 6-
element packets containing
x, y, z, dx/dt, dy/dt, dz/dt
where x, y, z represent Cartesian
position components and vx, vy, vz
represent Cartesian velocity
components.
Position units are kilometers;
velocity units are kilometers per
second.
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
-Restrictions
None.
-Version
-CSPICE Version 1.0.0, 16-AUG-2002 (NJB)
*/
#ifndef HAVE_SPICE_SPK_H
#define HAVE_SPICE_SPK_H
/*
SPK type 18 subtype codes:
*/
enum _SpiceSPK18Subtype { S18TP0, S18TP1 };
typedef enum _SpiceSPK18Subtype SpiceSPK18Subtype;
#endif
-240
View File
@@ -1,240 +0,0 @@
/*
-Header_File SpiceUsr.h ( CSPICE user interface definitions )
-Abstract
Perform CSPICE user interface declarations, including type
definitions and function prototype declarations.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Particulars
This file is an umbrella header that includes all header files
required to support the CSPICE application programming interface
(API). Users' application code that calls CSPICE need include only
this single header file. This file includes function prototypes for
the entire set of CSPICE routines. Typedef statements used to create
SPICE data types are also included.
About SPICE data types
======================
To assist with long-term maintainability of CSPICE, NAIF has elected
to use typedefs to represent data types occurring in argument lists
and as return values of CSPICE functions. These are:
SpiceBoolean
SpiceChar
SpiceDouble
SpiceInt
ConstSpiceBoolean
ConstSpiceChar
ConstSpiceDouble
ConstSpiceInt
The SPICE typedefs map in an arguably natural way to ANSI C types:
SpiceBoolean -> enum { SPICEFALSE = 0, SPICETRUE = 1 }
SpiceChar -> char
SpiceDouble -> double
SpiceInt -> int or long
ConstX -> const X (X = any of the above types)
The type SpiceInt is a special case: the corresponding type is picked
so as to be half the size of a double. On all currently supported
platforms, type double occupies 8 bytes and type int occupies 4
bytes. Other platforms may require a SpiceInt to map to type long.
While other data types may be used internally in CSPICE, no other
types appear in the API.
About CSPICE function prototypes
================================
Because CSPICE function prototypes enable substantial compile-time
error checking, we recommend that user applications always reference
them. Including the header file SpiceUsr.h in any module that calls
CSPICE will automatically make the prototypes available.
About CSPICE C style
====================
CSPICE is written in ANSI C. No attempt has been made to support K&R
conventions or restrictions.
About C++ compatibility
=======================
The preprocessor directive -D__cplusplus should be used when
compiling C++ source code that includes this header file. This
directive will suppress mangling of CSPICE names, permitting linkage
to a CSPICE object library built from object modules produced by
an ANSI C compiler.
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
S.C. Krening (JPL)
E.D. Wright (JPL)
-Restrictions
The #include statements contained in this file are not part of
the CSPICE API. The set of files included may change without notice.
Users should not include these files directly in their own
application code.
-Version
-CSPICE Version 5.0.0, 11-MAY-2012 (NJB) (SCK)
Updated to include header files
SpiceErr.h
SpiceFrm.h
SpiceOccult.h
-CSPICE Version 4.0.0, 30-SEP-2008 (NJB)
Updated to include header file
SpiceGF.h
-CSPICE Version 3.0.0, 19-AUG-2002 (NJB)
Updated to include header files
SpiceCel.h
SpiceCK.h
SpiceSPK.h
-CSPICE Version 3.0.0, 17-FEB-1999 (NJB)
Updated to support suppression of name mangling when included in
C++ source code. Also now interface macros to intercept function
calls and perform automatic type casting.
Now includes platform macro definition header file.
References to types SpiceVoid and ConstSpiceVoid were removed.
-CSPICE Version 2.0.0, 06-MAY-1998 (NJB) (EDW)
*/
#ifdef __cplusplus
extern "C" {
#endif
#ifndef HAVE_SPICE_USER
#define HAVE_SPICE_USER
/*
Include CSPICE platform macro definitions.
*/
#include "SpiceZpl.h"
/*
Include CSPICE data type definitions.
*/
#include "SpiceZdf.h"
/*
Include the CSPICE error handling interface definitions.
*/
#include "SpiceErr.h"
/*
Include the CSPICE EK interface definitions.
*/
#include "SpiceEK.h"
/*
Include the CSPICE frame subsystem API definitions.
*/
#include "SpiceFrm.h"
/*
Include the CSPICE Cell interface definitions.
*/
#include "SpiceCel.h"
/*
Include the CSPICE CK interface definitions.
*/
#include "SpiceCK.h"
/*
Include the CSPICE SPK interface definitions.
*/
#include "SpiceSPK.h"
/*
Include the CSPICE GF interface definitions.
*/
#include "SpiceGF.h"
/*
Include the CSPICE occultation definitions.
*/
#include "SpiceOccult.h"
/*
Include CSPICE prototypes.
*/
#include "SpiceZpr.h"
/*
Define the CSPICE function interface macros.
*/
#include "SpiceZim.h"
#endif
#ifdef __cplusplus
}
#endif
-209
View File
@@ -1,209 +0,0 @@
/*
-Header_File SpiceZad.h ( CSPICE adapter definitions )
-Abstract
Perform CSPICE declarations to support passed-in function
adapters used in wrapper interfaces.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Particulars
This header file contains declarations used by the CSPICE
passed-in function adapter ("PFA") system. This system enables
CSPICE wrapper functions to support passed-in function
arguments whose prototypes are C-style, even when these
functions are to be called from f2c'd Fortran routines
expecting f2c-style interfaces.
This header declares:
- The prototype for the passed-in function argument
pointer storage and fetch routines
zzadsave_c
zzadget_c
- Prototypes for CSPICE adapter functions. Each passed-in
function argument in a CSPICE wrapper has a corresponding
adapter function. The adapter functions have interfaces
that match those of their f2c'd counterparts; this allows
the adapters to be called by f2c'd SPICELIB code. The
adapters look up saved function pointers for routines
passed in by the wrapper's caller and call these functions.
- Values for the enumerated type SpicePassedInFunc. These
values are used to map function pointers to the
functions they represent, enabling adapters to call
the correct passed-in functions.
Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
-Restrictions
None.
-Version
-CSPICE Version 2.2.0, 29-NOV-2011 (EDW)
Updated to support the user defined boolean function capability.
-CSPICE Version 2.1.0, 21-DEC-2009 (EDW)
Updated to support the user defined scalar function capability.
-CSPICE Version 2.0.0, 29-JAN-2009 (NJB)
Now conditionally includes SpiceZfc.h.
Updated to reflect new calling sequence of f2c'd
routine gfrefn_. Some header updates were made
as well.
-CSPICE Version 1.0.0, 29-MAR-2008 (NJB)
*/
/*
This file has dependencies defined in SpiceZfc.h. Include that
file if it hasn't already been included.
*/
#ifndef HAVE_SPICEF2C_H
#include "SpiceZfc.h"
#endif
#ifndef HAVE_SPICE_ZAD_H
#define HAVE_SPICE_ZAD_H
/*
Prototypes for GF adapters:
*/
logical zzadbail_c ( void );
int zzadstep_c ( doublereal * et,
doublereal * step );
int zzadrefn_c ( doublereal * t1,
doublereal * t2,
logical * s1,
logical * s2,
doublereal * t );
int zzadrepf_c ( void );
int zzadrepi_c ( doublereal * cnfine,
char * srcpre,
char * srcsuf,
ftnlen srcprelen,
ftnlen srcsuflen );
int zzadrepu_c ( doublereal * ivbeg,
doublereal * ivend,
doublereal * et );
int zzadfunc_c ( doublereal * et,
doublereal * value );
int zzadqdec_c ( U_fp udfunc,
doublereal * et,
logical * xbool );
/*
Define the enumerated type
SpicePassedInFunc
for names of passed-in functions. Using this type gives
us compile-time checking and avoids string comparisons.
*/
enum _SpicePassedInFunc {
UDBAIL,
UDREFN,
UDREPF,
UDREPI,
UDREPU,
UDSTEP,
UDFUNC,
UDQDEC,
};
typedef enum _SpicePassedInFunc SpicePassedInFunc;
/*
SPICE_N_PASSED_IN_FUNC is the count of SpicePassedInFunc values.
*/
#define SPICE_N_PASSED_IN_FUNC 8
/*
CSPICE wrappers supporting passed-in function arguments call
the adapter setup interface function once per each such argument;
these calls save the function pointers for later use within the
f2c'd code that calls passed-in functions. The saved pointers
will be used in calls by the adapter functions whose prototypes
are declared above.
Prototypes for adapter setup interface:
*/
void zzadsave_c ( SpicePassedInFunc functionID,
void * functionPtr );
void * zzadget_c ( SpicePassedInFunc functionID );
#endif
/*
End of header file SpiceZad.h
*/
-260
View File
@@ -1,260 +0,0 @@
/*
-Header_File SpiceZdf.h ( CSPICE definitions )
-Abstract
Define CSPICE data types via typedefs; also define some user-visible
enumerated types.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Particulars
CSPICE data types
=================
To assist with long-term maintainability of CSPICE, NAIF has elected
to use typedefs to represent data types occurring in argument lists
and as return values of CSPICE functions. These are:
SpiceBoolean
SpiceChar
SpiceDouble
SpiceInt
ConstSpiceBoolean
ConstSpiceChar
ConstSpiceDouble
ConstSpiceInt
The SPICE typedefs map in an arguably natural way to ANSI C types:
SpiceBoolean -> int
SpiceChar -> char
SpiceDouble -> double
SpiceInt -> int or long
ConstX -> const X (X = any of the above types)
The type SpiceInt is a special case: the corresponding type is picked
so as to be half the size of a double. On most currently supported
platforms, type double occupies 8 bytes and type long occupies 4
bytes. Other platforms may require a SpiceInt to map to type int.
The Alpha/Digital Unix platform is an example of the latter case.
While other data types may be used internally in CSPICE, no other
types appear in the API.
CSPICE enumerated types
=======================
These are provided to enhance readability of the code.
Type name Value set
--------- ---------
_Spicestatus { SPICEFAILURE = -1, SPICESUCCESS = 0 }
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
B.V. Semenov (JPL)
E.D. Wright (JPL)
-Restrictions
None.
-Version
-CSPICE Version 6.2.0, 10-MAR-2014 (BVS)
Updated for:
PC-CYGWIN-64BIT-GCC_C
environment. Added the corresponding tag:
CSPICE_PC_CYGWIN_64BIT_GCC
tag to the #ifdefs set.
-CSPICE Version 6.1.0, 14-MAY-2010 (EDW)(BVS)
Updated for:
MAC-OSX-64BIT-INTEL_C
SUN-SOLARIS-64BIT-NATIVE_C
SUN-SOLARIS-INTEL-64BIT-CC_C
environments. Added the corresponding tags:
CSPICE_MAC_OSX_INTEL_64BIT_GCC
CSPICE_SUN_SOLARIS_64BIT_NATIVE
CSPICE_SUN_SOLARIS_INTEL_64BIT_CC
tag to the #ifdefs set.
-CSPICE Version 6.0.0, 21-FEB-2006 (NJB)
Updated to support the PC Linux 64 bit mode/gcc platform.
-CSPICE Version 5.0.0, 27-JAN-2003 (NJB)
Updated to support the Sun Solaris 64 bit mode/gcc platform.
-CSPICE Version 4.0.0 27-JUL-2002 (NJB)
Added definition of SpiceDataType.
-CSPICE Version 3.0.0 18-SEP-1999 (NJB)
SpiceBoolean implementation changed from enumerated type to
typedef mapping to int.
-CSPICE Version 2.0.0 29-JAN-1999 (NJB)
Made definition of SpiceInt and ConstSpiceInt platform
dependent to accommodate the Alpha/Digital Unix platform.
Removed definitions of SpiceVoid and ConstSpiceVoid.
-CSPICE Version 1.0.0 25-OCT-1997 (KRG) (NJB) (EDW)
*/
#ifndef HAVE_SPICEDEFS_H
#define HAVE_SPICEDEFS_H
/*
Include platform definitions, if they haven't been executed already.
*/
#ifndef HAVE_PLATFORM_MACROS_H
#include "SpiceZpl.h"
#endif
/*
Basic data types. These are defined to be compatible with the
types used by f2c, and so they follow the Fortran notion of what
these things are. See the f2c documentation for the details
about the choices for the sizes of these types.
*/
typedef char SpiceChar;
typedef double SpiceDouble;
typedef float SpiceFloat;
#if ( defined(CSPICE_ALPHA_DIGITAL_UNIX ) \
|| defined(CSPICE_SUN_SOLARIS_64BIT_NATIVE) \
|| defined(CSPICE_SUN_SOLARIS_64BIT_GCC ) \
|| defined(CSPICE_MAC_OSX_INTEL_64BIT_GCC ) \
|| defined(CSPICE_SUN_SOLARIS_INTEL_64BIT_CC ) \
|| defined(CSPICE_PC_CYGWIN_64BIT_GCC ) \
|| defined(CSPICE_PC_LINUX_64BIT_GCC ) )
typedef int SpiceInt;
#else
typedef long SpiceInt;
#endif
typedef const char ConstSpiceChar;
typedef const double ConstSpiceDouble;
typedef const float ConstSpiceFloat;
#if ( defined(CSPICE_ALPHA_DIGITAL_UNIX ) \
|| defined(CSPICE_SUN_SOLARIS_64BIT_NATIVE) \
|| defined(CSPICE_SUN_SOLARIS_64BIT_GCC ) \
|| defined(CSPICE_MAC_OSX_INTEL_64BIT_GCC ) \
|| defined(CSPICE_SUN_SOLARIS_INTEL_64BIT_CC ) \
|| defined(CSPICE_PC_CYGWIN_64BIT_GCC ) \
|| defined(CSPICE_PC_LINUX_64BIT_GCC ) )
typedef const int ConstSpiceInt;
#else
typedef const long ConstSpiceInt;
#endif
/*
More basic data types. These give mnemonics for some other data
types in C that are not used in Fortran written by NAIF or
supported by ANSI Fortran 77. These are for use in C functions
but should not be passed to any C SPICE wrappers, ``*_c.c''
since they are not Fortran compatible.
*/
typedef long SpiceLong;
typedef short SpiceShort;
/*
Unsigned data types
*/
typedef unsigned char SpiceUChar;
typedef unsigned int SpiceUInt;
typedef unsigned long SpiceULong;
typedef unsigned short SpiceUShort;
/*
Signed data types
*/
typedef signed char SpiceSChar;
/*
Other basic types
*/
typedef int SpiceBoolean;
typedef const int ConstSpiceBoolean;
#define SPICETRUE 1
#define SPICEFALSE 0
enum _Spicestatus { SPICEFAILURE = -1, SPICESUCCESS = 0 };
typedef enum _Spicestatus SpiceStatus;
enum _SpiceDataType { SPICE_CHR = 0,
SPICE_DP = 1,
SPICE_INT = 2,
SPICE_TIME = 3,
SPICE_BOOL = 4 };
typedef enum _SpiceDataType SpiceDataType;
#endif
File diff suppressed because it is too large Load Diff
-980
View File
@@ -1,980 +0,0 @@
/*
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
*/
/*
CSPICE private macro file.
-Particulars
Current list of macros (spelling counts)
BLANK
C2F_MAP_CELL
C2F_MAP_CELL2
C2F_MAP_CELL3
CELLINIT
CELLINIT2
CELLINIT3
CELLISSETCHK
CELLISSETCHK2
CELLISSETCHK2_VAL
CELLISSETCHK3
CELLISSETCHK3_VAL
CELLISSETCHK_VAL
CELLMATCH2
CELLMATCH2_VAL
CELLMATCH3
CELLMATCH3_VAL
CELLTYPECHK
CELLTYPECHK2
CELLTYPECHK2_VAL
CELLTYPECHK3
CELLTYPECHK3_VAL
CELLTYPECHK_VAL
CHKFSTR
CHKFSTR_VAL
CHKOSTR
CHKOSTR_VAL
CHKPTR
Constants
Even
F2C_MAP_CELL
Index values
MOVED
MOVEI
MaxAbs
MaxVal
MinAbs
MinVal
Odd
SpiceError
TolOrFail
-Restrictions
This is a private macro file for use within CSPICE.
Do not use or alter any entry. Or else!
-Author_and_Institution
N.J. Bachman (JPL)
E.D. Wright (JPL)
-Version
-CSPICE Version 4.3.0, 18-SEP-2013 (NJB)
Bug fix: missing comma was added to argument list
in body of macro CELLTYPECHK3_VAL.
-CSPICE Version 4.2.0, 16-FEB-2005 (NJB)
Bug fix: in the macro C2F_MAP_CELL, error checking has been
added after the sequence of calls to ssizec_ and scardc_.
If either of these routines signals an error, the dynamically
allocated memory for the "Fortran cell" is freed.
-CSPICE Version 4.1.0, 06-DEC-2002 (NJB)
Bug fix: added previous missing, bracketing parentheses to
references to input cell pointer argument in macro
CELLINIT.
Changed CELLINIT macro so it no longer initializes to zero
length all strings in data array of a character cell. Instead,
strings are terminated with a null in their final element.
-CSPICE Version 4.0.0, 22-AUG-2002 (NJB)
Added macro definitions to support CSPICE cells and sets:
C2F_MAP_CELL
C2F_MAP_CELL2
C2F_MAP_CELL3
CELLINIT
CELLINIT2
CELLINIT3
CELLISSETCHK
CELLISSETCHK2
CELLISSETCHK2_VAL
CELLISSETCHK3
CELLISSETCHK3_VAL
CELLISSETCHK_VAL
CELLMATCH2
CELLMATCH2_VAL
CELLMATCH3
CELLMATCH3_VAL
CELLTYPECHK
CELLTYPECHK2
CELLTYPECHK2_VAL
CELLTYPECHK3
CELLTYPECHK3_VAL
CELLTYPECHK_VAL
F2C_MAP_CELL
-CSPICE Version 3.0.0, 09-JAN-1998 (NJB)
Added output string check macros CHKOSTR and CHKOSTR_VAL.
Removed variable name arguments from macros
CHKPTR
CHKPTR_VAL
CHKFSTR
CHKRSTR_VAL
The strings containing names of the checked variables are now
generated from the variables themselves via the # operator.
-CSPICE Version 2.0.0, 03-DEC-1997 (NJB)
Added pointer check macro CHKPTR and Fortran string check macro
CHKFSTR.
-CSPICE Version 1.0.0, 25-OCT-1997 (EDW)
*/
#include <math.h>
#include <string.h>
#include "SpiceZdf.h"
#define MOVED( arrfrm, ndim, arrto ) \
\
( memmove ( (void*) (arrto) , \
(void*) (arrfrm), \
sizeof (SpiceDouble) * (ndim) ) )
#define MOVEI( arrfrm, ndim, arrto ) \
\
( memmove ( (void*) (arrto) , \
(void*) (arrfrm), \
sizeof (SpiceInt) * (ndim) ) )
/*
Define a tolerance test for those pesky double precision reals.
True if the difference is less than the tolerance, false otherwise.
The tolerance refers to a percentage. x, y and tol should be declared
double. All values are assumed to be non-zero. Okay?
*/
#define TolOrFail( x, y, tol ) \
\
( fabs( x-y ) < ( tol * fabs(x) ) )
/*
Simple error output through standard SPICE error system . Set the error
message and the type
*/
#define SpiceError( errmsg, errtype ) \
\
{ \
setmsg_c ( errmsg ); \
sigerr_c ( errtype ); \
}
/*
Return a value which is the maximum/minimum of the absolute values of
two values.
*/
#define MaxAbs(a,b) ( fabs(a) >= fabs(b) ? fabs(a) : fabs(b) )
#define MinAbs(a,b) ( fabs(a) < fabs(b) ? fabs(a) : fabs(b) )
/*
Return a value which is the maximum/minimum value of two values.
*/
#define MaxVal(A,B) ( (A) >= (B) ? (A) : (B) )
#define MinVal(A,B) ( (A) < (B) ? (A) : (B) )
/*
Determine whether a value is even or odd
*/
#define Even( x ) ( ( (x) & 1 ) == 0 )
#define Odd ( x ) ( ( (x) & 1 ) != 0 )
/*
Array indexes for vectors.
*/
#define SpiceX 0
#define SpiceY 1
#define SpiceZ 2
#define SpiceVx 3
#define SpiceVy 4
#define SpiceVz 5
/*
Physical constants and dates.
*/
#define B1900 2415020.31352
#define J1900 2415020.0
#define JYEAR 31557600.0
#define TYEAR 31556925.9747
#define J1950 2433282.5
#define SPD 86400.0
#define B1950 2433282.42345905
#define J2100 2488070.0
#define CLIGHT 299792.458
#define J2000 2451545.0
/*
Common literal values.
*/
#define NULLCHAR ( (SpiceChar ) 0 )
#define NULLCPTR ( (SpiceChar * ) 0 )
#define BLANK ( (SpiceChar ) ' ' )
/*
Macro CHKPTR is used for checking for a null pointer. CHKPTR uses
the constants
CHK_STANDARD
CHK_DISCOVER
CHK_REMAIN
to control tracing behavior. Values and meanings are:
CHK_STANDARD Standard tracing. If an error
is found, signal it, check out
and return.
CHK_DISCOVER Discovery check-in. If an
error is found, check in, signal
the error, check out, and return.
CHK_REMAIN If an error is found, signal it.
Do not check out or return. This
would allow the caller to clean up
before returning, if necessary.
In such cases the caller must test
failed_c() after the macro call.
CHKPTR should be used in void functions. In non-void functions,
use CHKPTR_VAL, which is defined below.
*/
#define CHK_STANDARD 1
#define CHK_DISCOVER 2
#define CHK_REMAIN 3
#define CHKPTR( errHandling, modname, pointer ) \
\
if ( (void *)(pointer) == (void *)0 ) \
{ \
if ( (errHandling) == CHK_DISCOVER ) \
{ \
chkin_c ( modname ); \
} \
\
setmsg_c ( "Pointer \"#\" is null; a non-null " \
"pointer is required." ); \
errch_c ( "#", (#pointer) ); \
sigerr_c ( "SPICE(NULLPOINTER)" ); \
\
if ( ( (errHandling) == CHK_DISCOVER ) \
|| ( (errHandling) == CHK_STANDARD ) ) \
{ \
chkout_c ( modname ); \
return; \
} \
}
#define CHKPTR_VAL( errHandling, modname, pointer, retval ) \
\
if ( (void *)(pointer) == (void *)0 ) \
{ \
if ( (errHandling) == CHK_DISCOVER ) \
{ \
chkin_c ( modname ); \
} \
\
setmsg_c ( "Pointer \"#\" is null; a non-null " \
"pointer is required." ); \
errch_c ( "#", (#pointer) ); \
sigerr_c ( "SPICE(NULLPOINTER)" ); \
\
if ( ( (errHandling) == CHK_DISCOVER ) \
|| ( (errHandling) == CHK_STANDARD ) ) \
{ \
chkout_c ( modname ); \
return ( retval ); \
} \
}
/*
Macro CHKFSTR checks strings that are to be passed to Fortran or
f2c'd Fortran routines. Such strings must have non-zero length,
and their pointers must be non-null.
CHKFSTR should be used in void functions. In non-void functions,
use CHKFSTR_VAL, which is defined below.
*/
#define CHKFSTR( errHandling, modname, string ) \
\
CHKPTR ( errHandling, modname, string ); \
\
if ( ( (void *)string != (void *)0 ) \
&& ( strlen(string) == 0 ) ) \
{ \
if ( (errHandling) == CHK_DISCOVER ) \
{ \
chkin_c ( modname ); \
} \
\
setmsg_c ( "String \"#\" has length zero." ); \
errch_c ( "#", (#string) ); \
sigerr_c ( "SPICE(EMPTYSTRING)" ); \
\
if ( ( (errHandling) == CHK_DISCOVER ) \
|| ( (errHandling) == CHK_STANDARD ) ) \
{ \
chkout_c ( modname ); \
return; \
} \
}
#define CHKFSTR_VAL( errHandling, modname, string, retval ) \
\
CHKPTR_VAL( errHandling, modname, string, retval); \
\
if ( ( (void *)string != (void *)0 ) \
&& ( strlen(string) == 0 ) ) \
{ \
if ( (errHandling) == CHK_DISCOVER ) \
{ \
chkin_c ( modname ); \
} \
\
setmsg_c ( "String \"#\" has length zero." ); \
errch_c ( "#", (#string) ); \
sigerr_c ( "SPICE(EMPTYSTRING)" ); \
\
if ( ( (errHandling) == CHK_DISCOVER ) \
|| ( (errHandling) == CHK_STANDARD ) ) \
{ \
chkout_c ( modname ); \
return ( retval ); \
} \
}
/*
Macro CHKOSTR checks output string pointers and the associated
string length values supplied as input arguments. Output string
pointers must be non-null, and the string lengths must be at
least 2, so Fortran routine can write at least one character to
the output string, and so a null terminator can be appended.
CHKOSTR should be used in void functions. In non-void functions,
use CHKOSTR_VAL, which is defined below.
*/
#define CHKOSTR( errHandling, modname, string, length ) \
\
CHKPTR ( errHandling, modname, string ); \
\
if ( ( (void *)string != (void *)0 ) \
&& ( length < 2 ) ) \
{ \
if ( (errHandling) == CHK_DISCOVER ) \
{ \
chkin_c ( modname ); \
} \
\
setmsg_c ( "String \"#\" has length #; must be >= 2." ); \
errch_c ( "#", (#string) ); \
errint_c ( "#", (length) ); \
sigerr_c ( "SPICE(STRINGTOOSHORT)" ); \
\
if ( ( (errHandling) == CHK_DISCOVER ) \
|| ( (errHandling) == CHK_STANDARD ) ) \
{ \
chkout_c ( modname ); \
return; \
} \
}
#define CHKOSTR_VAL( errHandling, modname, string, length, retval ) \
\
CHKPTR_VAL( errHandling, modname, string, retval ); \
\
if ( ( (void *)string != (void *)0 ) \
&& ( length < 2 ) ) \
{ \
if ( (errHandling) == CHK_DISCOVER ) \
{ \
chkin_c ( modname ); \
} \
\
setmsg_c ( "String \"#\" has length #; must be >= 2." ); \
errch_c ( "#", (#string) ); \
errint_c ( "#", (length) ); \
sigerr_c ( "SPICE(STRINGTOOSHORT)" ); \
\
if ( ( (errHandling) == CHK_DISCOVER ) \
|| ( (errHandling) == CHK_STANDARD ) ) \
{ \
chkout_c ( modname ); \
return ( retval ); \
} \
}
/*
Definitions for Cells and Sets
*/
/*
Cell initialization macros
*/
#define CELLINIT( cellPtr ) \
\
if ( !( (cellPtr)->init ) ) \
{ \
if ( (cellPtr)->dtype == SPICE_CHR ) \
{ \
/* \
Make sure all elements of the data array, including \
the control area, start off null-terminated. We place \
the null character in the final element of each string, \
so as to avoid wiping out data that may have been \
assigned to the data array prior to initialization. \
*/ \
SpiceChar * sPtr; \
SpiceInt i; \
SpiceInt nmax; \
\
nmax = SPICE_CELL_CTRLSZ + (cellPtr)->size; \
\
for ( i = 1; i <= nmax; i++ ) \
{ \
sPtr = (SpiceChar *)((cellPtr)->base) \
+ i * (cellPtr)->length \
- 1; \
\
*sPtr = NULLCHAR; \
} \
} \
else \
{ \
zzsynccl_c ( C2F, (cellPtr) ); \
} \
\
(cellPtr)->init = SPICETRUE; \
}
#define CELLINIT2( cellPtr1, cellPtr2 ) \
\
CELLINIT ( cellPtr1 ); \
CELLINIT ( cellPtr2 );
#define CELLINIT3( cellPtr1, cellPtr2, cellPtr3 ) \
\
CELLINIT ( cellPtr1 ); \
CELLINIT ( cellPtr2 ); \
CELLINIT ( cellPtr3 );
/*
Data type checking macros:
*/
#define CELLTYPECHK( errHandling, modname, dType, cellPtr1 ) \
\
if ( (cellPtr1)->dtype != (dType) ) \
{ \
SpiceChar * typstr[3] = \
{ \
"character", "double precision", "integer" \
}; \
\
if ( (errHandling) == CHK_DISCOVER ) \
{ \
chkin_c ( modname ); \
} \
\
setmsg_c ( "Data type of # is #; expected type " \
"is #." ); \
errch_c ( "#", (#cellPtr1) ); \
errch_c ( "#", typstr[ (cellPtr1)->dtype ] ); \
errch_c ( "#", typstr[ dType ] ); \
sigerr_c ( "SPICE(TYPEMISMATCH)" ); \
\
if ( ( (errHandling) == CHK_DISCOVER ) \
|| ( (errHandling) == CHK_STANDARD ) ) \
{ \
chkout_c ( modname ); \
return; \
} \
}
#define CELLTYPECHK_VAL( errHandling, modname, \
dType, cellPtr1, retval ) \
\
if ( (cellPtr1)->dtype != (dType) ) \
{ \
SpiceChar * typstr[3] = \
{ \
"character", "double precision", "integer" \
}; \
\
if ( (errHandling) == CHK_DISCOVER ) \
{ \
chkin_c ( modname ); \
} \
\
setmsg_c ( "Data type of # is #; expected type " \
"is #." ); \
errch_c ( "#", (#cellPtr1) ); \
errch_c ( "#", typstr[ (cellPtr1)->dtype ] ); \
errch_c ( "#", typstr[ dType ] ); \
sigerr_c ( "SPICE(TYPEMISMATCH)" ); \
\
if ( ( (errHandling) == CHK_DISCOVER ) \
|| ( (errHandling) == CHK_STANDARD ) ) \
{ \
chkout_c ( modname ); \
return (retval); \
} \
}
#define CELLTYPECHK2( errHandling, modname, dtype, \
cellPtr1, cellPtr2 ) \
\
CELLTYPECHK( errHandling, modname, dtype, cellPtr1 ); \
CELLTYPECHK( errHandling, modname, dtype, cellPtr2 );
#define CELLTYPECHK2_VAL( errHandling, modname, dtype, \
cellPtr1, cellPtr2, retval ) \
\
CELLTYPECHK_VAL( errHandling, modname, dtype, cellPtr1, \
retval ); \
CELLTYPECHK_VAL( errHandling, modname, dtype, cellPtr2, \
retval );
#define CELLTYPECHK3( errHandling, modname, dtype, \
cellPtr1, cellPtr2, cellPtr3 ) \
\
CELLTYPECHK( errHandling, modname, dtype, cellPtr1 ); \
CELLTYPECHK( errHandling, modname, dtype, cellPtr2 ); \
CELLTYPECHK( errHandling, modname, dtype, cellPtr3 );
#define CELLTYPECHK3_VAL( errHandling, modname, dtype, \
cellPtr1, cellPtr2, cellPtr3, \
retval ) \
\
CELLTYPECHK_VAL( errHandling, modname, dtype, cellPtr1, \
retval ); \
CELLTYPECHK_VAL( errHandling, modname, dtype, cellPtr2, \
retval ); \
CELLTYPECHK_VAL( errHandling, modname, dtype, cellPtr3, \
retval );
#define CELLMATCH2( errHandling, modname, cellPtr1, cellPtr2 ) \
\
if ( (cellPtr1)->dtype != (cellPtr2)->dtype ) \
{ \
SpiceChar * typstr[3] = \
{ \
"character", "double precision", "integer" \
}; \
\
if ( (errHandling) == CHK_DISCOVER ) \
{ \
chkin_c ( modname ); \
} \
\
setmsg_c ( "Data type of # is #; data type of # " \
"is #, but types must match." ); \
errch_c ( "#", (#cellPtr1) ); \
errch_c ( "#", typstr[ (cellPtr1)->dtype ] ); \
errch_c ( "#", (#cellPtr2) ); \
errch_c ( "#", typstr[ (cellPtr2)->dtype ] ); \
sigerr_c ( "SPICE(TYPEMISMATCH)" ); \
\
if ( ( (errHandling) == CHK_DISCOVER ) \
|| ( (errHandling) == CHK_STANDARD ) ) \
{ \
chkout_c ( modname ); \
return; \
} \
}
#define CELLMATCH2_VAL( errHandling, modname, \
cellPtr1, cellPtr2, retval ) \
\
if ( (cellPtr1)->dtype != (cellPtr2)->dtype ) \
{ \
SpiceChar * typstr[3] = \
{ \
"character", "double precision", "integer" \
}; \
\
if ( (errHandling) == CHK_DISCOVER ) \
{ \
chkin_c ( modname ); \
} \
\
setmsg_c ( "Data type of # is #; data type of # " \
"is #, but types must match." ); \
errch_c ( "#", (#cellPtr1) ); \
errch_c ( "#", typstr [ (cellPtr1)->dtype ] ); \
errch_c ( "#", (#cellPtr2) ); \
errch_c ( "#", typstr [ (cellPtr2)->dtype ] ); \
sigerr_c ( "SPICE(TYPEMISMATCH)" ); \
\
if ( ( (errHandling) == CHK_DISCOVER ) \
|| ( (errHandling) == CHK_STANDARD ) ) \
{ \
chkout_c ( modname ); \
return ( retval ); \
} \
}
#define CELLMATCH3( errHandling, modname, \
cellPtr1, cellPtr2, cellPtr3 ) \
\
CELLMATCH2 ( errHandling, modname, cellPtr1, cellPtr2 ); \
CELLMATCH2 ( errHandling, modname, cellPtr2, cellPtr3 );
#define CELLMATCH3_VAL( errHandling, modname, cellPtr1, \
cellPtr2, cellPtr3, retval ) \
\
CELLMATCH2_VAL ( errHandling, modname, \
cellPtr1, cellPtr2, retval ); \
\
CELLMATCH2_VAL ( errHandling, modname, \
cellPtr2, cellPtr3, retval );
/*
Set checking macros:
*/
#define CELLISSETCHK( errHandling, modname, cellPtr1 ) \
\
if ( !(cellPtr1)->isSet ) \
{ \
if ( (errHandling) == CHK_DISCOVER ) \
{ \
chkin_c ( modname ); \
} \
\
setmsg_c ( "Cell # must be sorted and have unique " \
"values in order to be a CSPICE set. " \
"The isSet flag in this cell is SPICEFALSE, " \
"indicating the cell may have been modified " \
"by a routine that doesn't preserve these " \
"properties." ); \
errch_c ( "#", (#cellPtr1) ); \
sigerr_c ( "SPICE(NOTASET)" ); \
\
if ( ( (errHandling) == CHK_DISCOVER ) \
|| ( (errHandling) == CHK_STANDARD ) ) \
{ \
chkout_c ( modname ); \
return; \
} \
}
#define CELLISSETCHK_VAL( errHandling, modname, \
cellPtr1, retval ) \
\
if ( !(cellPtr1)->isSet ) \
{ \
if ( (errHandling) == CHK_DISCOVER ) \
{ \
chkin_c ( modname ); \
} \
\
setmsg_c ( "Cell # must be sorted and have unique " \
"values in order to be a CSPICE set. " \
"The isSet flag in this cell is SPICEFALSE, " \
"indicating the cell may have been modified " \
"by a routine that doesn't preserve these " \
"properties." ); \
errch_c ( "#", (#cellPtr1) ); \
sigerr_c ( "SPICE(NOTASET)" ); \
\
if ( ( (errHandling) == CHK_DISCOVER ) \
|| ( (errHandling) == CHK_STANDARD ) ) \
{ \
chkout_c ( modname ); \
return (retval); \
} \
}
#define CELLISSETCHK2( errHandling, modname, \
cellPtr1, cellPtr2 ) \
\
CELLISSETCHK( errHandling, modname, cellPtr1 ); \
CELLISSETCHK( errHandling, modname, cellPtr2 );
#define CELLISSETCHK2_VAL( errHandling, modname, \
cellPtr1, cellPtr2, retval ) \
\
CELLISSETCHK_VAL( errHandling, modname, cellPtr1, retval ); \
CELLISSETCHK_VAL( errHandling, modname, cellPtr2, retval ); \
#define CELLISSETCHK3( errHandling, modname, \
cellPtr1, cellPtr2, cellPtr3 ) \
\
CELLISSETCHK ( errHandling, modname, cellPtr1 ); \
CELLISSETCHK ( errHandling, modname, cellPtr2 ); \
CELLISSETCHK ( errHandling, modname, cellPtr3 );
#define CELLISSETCHK3_VAL( errHandling, modname, cellPtr1, \
cellPtr2, cellPtr3, retval ) \
\
CELLISSETCHK_VAL ( errHandling, modname, cellPtr1, retval ); \
CELLISSETCHK_VAL ( errHandling, modname, cellPtr2, retval ); \
CELLISSETCHK_VAL ( errHandling, modname, cellPtr3, retval );
/*
C-to-Fortran and Fortran-to-C character cell translation macros:
*/
/*
Macros that map one or more character C cells to dynamically
allocated Fortran-style character cells:
*/
#define C2F_MAP_CELL( caller, CCell, fCell, fLen ) \
\
{ \
/* \
fCell and fLen are to be passed by reference, as if this \
macro were a function. \
\
\
Caution: dynamically allocates array fCell, which is to be \
freed by caller! \
*/ \
SpiceInt ndim; \
SpiceInt lenvals; \
\
\
ndim = (CCell)->size + SPICE_CELL_CTRLSZ; \
lenvals = (CCell)->length; \
\
C2F_MapFixStrArr ( (caller), ndim, lenvals, \
(CCell)->base, (fLen), (fCell) ); \
\
if ( !failed_c() ) \
{ \
/* \
Explicitly set the control area info in the Fortran cell.\
*/ \
ssizec_ ( ( integer * ) &((CCell)->size), \
( char * ) *(fCell), \
( ftnlen ) *(fLen) ); \
\
scardc_ ( ( integer * ) &((CCell)->card), \
( char * ) *(fCell), \
( ftnlen ) *(fLen) ); \
\
if ( failed_c() ) \
{ \
/* \
Setting size or cardinality of the Fortran cell \
can fail, for example if the cell's string length \
is too short. \
*/ \
free ( *(fCell) ); \
} \
} \
}
#define C2F_MAP_CELL2( caller, CCell1, fCell1, fLen1, \
CCell2, fCell2, fLen2 ) \
\
{ \
C2F_MAP_CELL( caller, CCell1, fCell1, fLen1 ); \
\
if ( !failed_c() ) \
{ \
C2F_MAP_CELL( caller, CCell2, fCell2, fLen2 ); \
\
if ( failed_c() ) \
{ \
free ( *(fCell1) ); \
} \
} \
}
#define C2F_MAP_CELL3( caller, CCell1, fCell1, fLen1, \
CCell2, fCell2, fLen2, \
CCell3, fCell3, fLen3 ) \
\
{ \
C2F_MAP_CELL2( caller, CCell1, fCell1, fLen1, \
CCell2, fCell2, fLen2 ); \
\
if ( !failed_c() ) \
{ \
C2F_MAP_CELL( caller, CCell3, fCell3, fLen3 ); \
\
if ( failed_c() ) \
{ \
free ( *(fCell1) ); \
free ( *(fCell2) ); \
} \
} \
}
/*
Macro that maps a Fortran-style character cell to a C cell
(Note: this macro frees the Fortran cell):
*/
#define F2C_MAP_CELL( fCell, fLen, CCell ) \
\
{ \
SpiceInt card; \
SpiceInt lenvals; \
SpiceInt ndim; \
SpiceInt nBytes; \
SpiceInt size; \
void * array; \
\
ndim = (CCell)->size + SPICE_CELL_CTRLSZ; \
lenvals = (CCell)->length; \
array = (CCell)->base; \
\
/* \
Capture the size and cardinality of the Fortran cell. \
*/ \
if ( !failed_c() ) \
{ \
size = sizec_ ( ( char * ) (fCell), \
( ftnlen ) fLen ); \
\
card = cardc_ ( ( char * ) (fCell), \
( ftnlen ) fLen ); \
} \
\
\
/* \
Copy the Fortran array into the output array. \
*/ \
\
nBytes = ndim * fLen * sizeof(SpiceChar); \
memmove ( array, fCell, nBytes ); \
/* \
Convert the output array from Fortran to C style. \
*/ \
F2C_ConvertTrStrArr ( ndim, lenvals, (SpiceChar *)array ); \
\
/* \
Sync the size and cardinality of the C cell. \
*/ \
if ( !failed_c() ) \
{ \
(CCell)->size = size; \
(CCell)->card = card; \
} \
}
/*
End of header SpiceZmc.h
*/
-117
View File
@@ -1,117 +0,0 @@
/*
-Header_File SpiceZpl.h ( CSPICE platform macros )
-Abstract
Define macros identifying the host platform for which this
version of CSPICE is targeted.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Literature_References
None.
-Particulars
This header file defines macros that enable CSPICE code to be
compiled conditionally based on the identity of the host platform.
The macros defined here ARE visible in the macro name space of
any file that includes SpiceUsr.h. The names are prefixed with
the string CSPICE_ to help prevent conflicts with macros defined
by users' applications.
-Author_and_Institution
N.J. Bachman (JPL)
B.V. Semenov (JPL)
E.D. Wright (JPL)
-Version
-CSPICE Version 2.1.0, 10-MAR-2014 (BVS)
Updated for the:
PC-CYGWIN-64BIT-GCC_C
environment.
-CSPICE Version 2.2.0, 14-MAY-2010 (EDW)(BVS)
Updated for the:
MAC-OSX-64BIT-INTEL_C
PC-64BIT-MS_C
SUN-SOLARIS-64BIT-NATIVE_C
SUN-SOLARIS-INTEL-64BIT-CC_C
SUN-SOLARIS-INTEL-CC_C
environments.
-CSPICE Version 2.1.0, 15-NOV-2006 (BVS)
Updated for MAC-OSX-INTEL_C environment.
-CSPICE Version 2.0.0, 21-FEB-2006 (NJB)
Updated for PC-LINUX-64BIT-GCC_C environment.
-CSPICE Version 1.3.0, 06-MAR-2005 (NJB)
Updated for SUN-SOLARIS-64BIT-GCC_C environment.
-CSPICE Version 1.2.0, 03-JAN-2005 (BVS)
Updated for PC-CYGWIN_C environment.
-CSPICE Version 1.1.0, 27-JUL-2002 (BVS)
Updated for MAC-OSX-NATIVE_C environment.
-CSPICE Version 1.0.0, 26-FEB-1999 (NJB) (EDW)
-Index_Entries
platform ID defines for CSPICE
*/
#ifndef HAVE_PLATFORM_MACROS_H
#define HAVE_PLATFORM_MACROS_H
#define CSPICE_PC_MS
#endif
File diff suppressed because it is too large Load Diff
-82
View File
@@ -1,82 +0,0 @@
/*
-Header_File SpiceZrnm.h ( CSPICE rename assignments )
-Abstract
Reassign CSPICE symbol names to prevent symbol collisions.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Literature_References
None.
-Particulars
Compiled symbol names in CSPICE may collide with symbols in other,
non-SPICE libraries. This file redefines names which have or may
cause a collision.
-Author_and_Institution
N.J. Bachman (JPL)
E.D. Wright (JPL)
-Version
-CSPICE Version 1.0.0, 17-OCT-2011 (EDW)
-Index_Entries
Rename assignments for CSPICE functions
*/
#ifndef HAVE_SPICERENAME_H
/*
Redefine names causing symbol conflicts:
*/
#define HAVE_SPICERENAME_H
/* dpstrf_ may exist in the LAPACK library. */
#define dpstrf_ zz_dpstrf_
/* Just in case. */
#define pi_ zz_pi_
#define vnorm_ zz_vnorm_
#define vdist_ zz_vdist_
#endif
-199
View File
@@ -1,199 +0,0 @@
/*
-Header_File SpiceZst.h ( Fortran/C string conversion utilities )
-Abstract
Define prototypes for CSPICE Fortran/C string conversion utilities.
Caution: these prototypes are subject to revision without notice.
These are private routines and are not part of the official CSPICE
user interface.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Particulars
None.
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
K.R. Gehringer (JPL)
E.D. Wright (JPL)
-Version
-CSPICE Version 6.0.0, 10-JUL-2002 (NJB)
Added prototype for new functions C2F_MapStrArr and
C2F_MapFixStrArr.
-CSPICE Version 5.0.0, 18-MAY-2001 (WLT)
Added #ifdef's to add namespace specification for C++ compilation.
-CSPICE Version 4.0.0, 14-FEB-2000 (NJB)
Added prototype for new function C2F_CreateStrArr_Sig.
-CSPICE Version 3.0.0, 12-JUL-1999 (NJB)
Added prototype for function C2F_CreateFixStrArr.
Added prototype for function F2C_ConvertTrStrArr.
Removed reference in comments to C2F_CreateStrArr_Sig, which
does not exist.
-CSPICE Version 2.0.1, 06-MAR-1998 (NJB)
Type SpiceVoid was changed to void.
-CSPICE Version 2.0.1, 09-FEB-1998 (EDW)
Added prototype for F2C_ConvertStrArr.
-CSPICE Version 2.0.0, 04-JAN-1998 (NJB)
Added prototype for F2C_ConvertStr.
-CSPICE Version 1.0.0, 25-OCT-1997 (NJB) (KRG) (EDW)
-Index_Entries
protoypes of CSPICE Fortran/C string conversion utilities
*/
#include <stdlib.h>
#include <string.h>
#include "SpiceZdf.h"
#ifndef HAVE_FCSTRINGS_H
#define HAVE_FCSTRINGS_H
#ifdef __cplusplus
namespace Jpl_NAIF_CSpice {
#endif
SpiceStatus C2F_CreateStr ( ConstSpiceChar *,
SpiceInt *,
SpiceChar ** );
void C2F_CreateStr_Sig ( ConstSpiceChar *,
SpiceInt *,
SpiceChar ** );
void C2F_CreateFixStrArr ( SpiceInt nStr,
SpiceInt cStrDim,
ConstSpiceChar ** cStrArr,
SpiceInt * fStrLen,
SpiceChar ** fStrArr );
SpiceStatus C2F_CreateStrArr ( SpiceInt,
ConstSpiceChar **,
SpiceInt *,
SpiceChar ** );
void C2F_CreateStrArr_Sig ( SpiceInt nStr,
ConstSpiceChar ** cStrArr,
SpiceInt * fStrLen,
SpiceChar ** fStrArr );
void C2F_MapFixStrArr ( ConstSpiceChar * caller,
SpiceInt nStr,
SpiceInt cStrLen,
const void * cStrArr,
SpiceInt * fStrLen,
SpiceChar ** fStrArr );
void C2F_MapStrArr ( ConstSpiceChar * caller,
SpiceInt nStr,
SpiceInt cStrLen,
const void * cStrArr,
SpiceInt * fStrLen,
SpiceChar ** fStrArr );
SpiceStatus C2F_StrCpy ( ConstSpiceChar *,
SpiceInt,
SpiceChar * );
void F_Alloc ( SpiceInt,
SpiceChar** );
void F2C_ConvertStr ( SpiceInt,
SpiceChar * );
void F2C_ConvertStrArr ( SpiceInt n,
SpiceInt lenout,
SpiceChar * cvals );
void F2C_ConvertTrStrArr ( SpiceInt n,
SpiceInt lenout,
SpiceChar * cvals );
SpiceStatus F2C_CreateStr ( SpiceInt,
ConstSpiceChar *,
SpiceChar ** );
void F2C_CreateStr_Sig ( SpiceInt,
ConstSpiceChar *,
SpiceChar ** );
SpiceStatus F2C_CreateStrArr ( SpiceInt,
SpiceInt,
ConstSpiceChar *,
SpiceChar *** );
void F2C_CreateStrArr_Sig ( SpiceInt,
SpiceInt,
ConstSpiceChar *,
SpiceChar *** );
void F2C_FreeStrArr ( SpiceChar **cStrArr );
SpiceStatus F2C_StrCpy ( SpiceInt,
ConstSpiceChar *,
SpiceInt,
SpiceChar * );
SpiceInt F_StrLen ( SpiceInt,
ConstSpiceChar * );
#ifdef __cplusplus
}
#endif
#endif
-232
View File
@@ -1,232 +0,0 @@
/*
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
*/
/* STARTUP PROCEDURE FOR UNIX FORTRAN PROGRAMS */
/*
This is the main.c file from the f2c libF77 set of source files,
modified for use within CSPICE. The changes made were:
- The file SpiceUsr.h is included.
- A call to putcml_c is made to store the command line arguments
and make them accessible via getcml_ or getcml_c.
This file is intended to be used as the main function for all
programs in the CSPICE Toolkit.
-Version
-CSPICE Version 2.0.0, 19-DEC-2001 (NJB)
Updated to support linking CSPICE into executables that
also link in objects compiled from Fortran, in particular
ones that perform Fortran I/O. To enable this odd mix,
one defines the preprocessor flag
MIX_C_AND_FORTRAN
This macro is undefined by default, since the action it invokes
is usually not desirable. See the header
f2cMang.h
for further information.
-CSPICE Version 1.1.0 29-FEB-2000 (NJB)
Updated to use the main.c source code from a newer version of
f2c, dated 1998-09-13.
-CSPICE Version 1.0.0 28-OCT-1998 (NJB)
*/
/*
Optionally include name-mangling macros for f2c external symbols.
*/
#ifdef MIX_C_AND_FORTRAN
#include "f2cMang.h"
#endif
/*
This header file is included for use within CSPICE.
*/
#include "SpiceUsr.h"
#include "stdio.h"
#include "signal1.h"
#ifndef SIGIOT
#ifdef SIGABRT
#define SIGIOT SIGABRT
#endif
#endif
#ifndef KR_headers
#undef VOID
#include "stdlib.h"
#endif
#ifndef VOID
#define VOID void
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifdef NO__STDC
#define ONEXIT onexit
extern VOID f_exit();
#else
#ifndef KR_headers
extern void f_exit(void);
#ifndef NO_ONEXIT
#define ONEXIT atexit
extern int atexit(void (*)(void));
#endif
#else
#ifndef NO_ONEXIT
#define ONEXIT onexit
extern VOID f_exit();
#endif
#endif
#endif
#ifdef KR_headers
extern VOID f_init(), sig_die();
extern int MAIN__();
#define Int /* int */
#else
extern void f_init(void), sig_die(char*, int);
extern int MAIN__(void);
#define Int int
#endif
static VOID sigfdie(Sigarg)
{
Use_Sigarg;
sig_die("Floating Exception", 1);
}
static VOID sigidie(Sigarg)
{
Use_Sigarg;
sig_die("IOT Trap", 1);
}
#ifdef SIGQUIT
static VOID sigqdie(Sigarg)
{
Use_Sigarg;
sig_die("Quit signal", 1);
}
#endif
static VOID sigindie(Sigarg)
{
Use_Sigarg;
sig_die("Interrupt", 0);
}
static VOID sigtdie(Sigarg)
{
Use_Sigarg;
sig_die("Killed", 0);
}
#ifdef SIGTRAP
static VOID sigtrdie(Sigarg)
{
Use_Sigarg;
sig_die("Trace trap", 1);
}
#endif
int xargc;
char **xargv;
#ifdef __cplusplus
}
#endif
#ifdef KR_headers
main(argc, argv) int argc; char **argv;
#else
main(int argc, char **argv)
#endif
{
/*
This call was added for use within CSPICE. It did not appear in the
original main.c function.
*/
putcml_c ( argc, argv );
xargc = argc;
xargv = argv;
signal1(SIGFPE, sigfdie); /* ignore underflow, enable overflow */
#ifdef SIGIOT
signal1(SIGIOT, sigidie);
#endif
#ifdef SIGTRAP
signal1(SIGTRAP, sigtrdie);
#endif
#ifdef SIGQUIT
if(signal1(SIGQUIT,sigqdie) == SIG_IGN)
signal1(SIGQUIT, SIG_IGN);
#endif
if(signal1(SIGINT, sigindie) == SIG_IGN)
signal1(SIGINT, SIG_IGN);
signal1(SIGTERM,sigtdie);
#ifdef pdp11
ldfps(01200); /* detect overflow as an exception */
#endif
f_init();
#ifndef NO_ONEXIT
ONEXIT(f_exit);
#endif
MAIN__();
#ifdef NO_ONEXIT
f_exit();
#endif
exit(0); /* exit(0) rather than return(0) to bypass Cray bug */
return 0; /* For compilers that complain of missing return values; */
/* others will complain that this is unreachable code. */
}
File diff suppressed because it is too large Load Diff
-345
View File
@@ -1,345 +0,0 @@
/* crcnst.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* $ Procedure CRCNST ( CHRONOS Parameter Arrays ) */
/* Subroutine */ int crcnst_(char *systms, char *types, char *deftyp, logical
*systyp, logical *fmtted, char *fmtpic, char *clkeys, ftnlen
systms_len, ftnlen types_len, ftnlen deftyp_len, ftnlen fmtpic_len,
ftnlen clkeys_len)
{
/* Initialized data */
static char lsystm[32*4] = "UTC " "ET "
" " "SCLK " "LST"
" ";
static char ltypes[32*10] = "SCET " "ERT "
" " "SCLK "
"HEX " "TICKS "
" " "LT " "SECONDS "
" " "LST " "ETT "
" " "LSUN ";
static char ldefty[32*4] = "SCET " "SCET "
" " "SCLK " "LST"
" ";
static logical lsysty[40] /* was [4][10] */ = { TRUE_,TRUE_,FALSE_,
FALSE_,TRUE_,TRUE_,FALSE_,FALSE_,FALSE_,FALSE_,TRUE_,FALSE_,
FALSE_,FALSE_,TRUE_,FALSE_,FALSE_,FALSE_,TRUE_,FALSE_,TRUE_,TRUE_,
FALSE_,FALSE_,FALSE_,TRUE_,FALSE_,FALSE_,FALSE_,FALSE_,FALSE_,
TRUE_,TRUE_,TRUE_,FALSE_,FALSE_,FALSE_,FALSE_,FALSE_,TRUE_ };
static logical lfmtte[40] /* was [4][10] */ = { TRUE_,TRUE_,FALSE_,
FALSE_,TRUE_,TRUE_,FALSE_,FALSE_,FALSE_,FALSE_,FALSE_,FALSE_,
FALSE_,FALSE_,FALSE_,FALSE_,FALSE_,FALSE_,TRUE_,FALSE_,TRUE_,
TRUE_,FALSE_,FALSE_,FALSE_,TRUE_,FALSE_,FALSE_,FALSE_,FALSE_,
FALSE_,FALSE_,TRUE_,TRUE_,FALSE_,FALSE_,FALSE_,FALSE_,FALSE_,
TRUE_ };
static char lfmtpi[64*4*10] = "YYYY-MM-DD HR:MN:SC.### ::RND "
" " "YYYY-MM-DD, HR:MN:SC.### ::TDB ::RND "
" " " "
" " " "
" " "YYYY-MM-DD HR:MN:SC.### ::RND"
" " "YYYY-MM-DD, HR:MN:SC.### :"
":TDB ::RND " " "
" " " "
" " " "
" " " "
" " " "
" " " "
" " " "
" "
" "
" "
" " " "
" " " "
" " " "
" " "xxxxxxxxxxxxxxxx "
" " " "
" " "xxxxxxxxxxxx.xxx "
" " "xxxxxxxxxxxx.xxx "
" " " "
" " " "
" " " "
" " "xxxxxxxxxxxxxxx.xxx "
" " " "
" " " "
" " " "
" " " "
" " " "
" " " "
" " "YYYY-MM-"
"DD HR:MN:SC.### ::RND " "YYYY-"
"MM-DD, HR:MN:SC.### ::TDB ::RND "
" "
" "
" " " "
" " " "
" " " "
" " "xxxxxx.xxx "
" ";
static char lclkey[32*19] = "-SETUP " "-FROM "
" " "-FROMTYPE "
"-TO " "-TOTYPE "
" " "-FORMAT " "-TIME "
" " "-HELP " "-H "
" " "-USAGE " "-U "
" " "-TEMPLATE " "-BAT"
"CH " "-NOLABEL "
"-TRACE " "-SC "
" " "-CENTER " "-LANDINGTIME "
" " "-SOL1INDEX ";
/* System generated locals */
integer i__1, i__2;
/* Builtin functions */
integer s_rnge(char *, integer, char *, integer);
/* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
/* Local variables */
static integer i__, j;
/* $ Abstract */
/* Returns arrays with parameterized time systems/types, output */
/* system/type formats, and command line keys used by CRONOS routine */
/* and CHRONOS executable. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Required_Reading */
/* None. */
/* $ Keywords */
/* None. */
/* $ Declarations */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* CHRONOS Include file. */
/* CHRONOS Version. */
/* Environment variable that contains CHRONOS setup file name. */
/* LST SOL marker. */
/* Command lines keys and total number of them. */
/* Setup file variables. */
/* Time system indentifier strings and total number of time */
/* systems. */
/* Time types identitifier strings and total number of time types. */
/* Line size parameters. */
/* File name length parameters. */
/* $ Brief_I/O */
/* VARIABLE I/O DESCRIPTION */
/* -------- --- -------------------------------------------------- */
/* SYSTMS O Array of supported time systems. */
/* TYPES O Array of supported time types. */
/* DEFTYP O Array of default time types. */
/* SYSTYP O Time system-type matrix. */
/* FMTTED O Output format applicability matrix. */
/* FMTPIC O Array of default output formats. */
/* CLKEYS O Array of recongnized command line keys. */
/* $ Detailed_Input */
/* None. */
/* $ Detailed_Output */
/* SYSTMS is the array of supported time systems. */
/* TYPES is the array of supported time types. */
/* DEFTYP is the array of default time types. */
/* SYSTYP is the time system-type matrix. */
/* FMTTED is the output format applicability matrix. */
/* FMTPIC is the array of default output formats. */
/* CLKEYS is the array of recongnized command line keys. */
/* $ Parameters */
/* See CHRONOS include file. */
/* $ Files */
/* None. */
/* $ Exceptions */
/* Error free. */
/* $ Particulars */
/* This routine provides consistent parameter arrays to CRONOS */
/* routine and CHRONOS main module. In essence, it's just an */
/* augmentation to the CHRONOS include file. */
/* $ Examples */
/* None. */
/* $ Restrictions */
/* None. */
/* $ Author_and_Institution */
/* B.V. Semenov (JPL) */
/* $ Literature_References */
/* None. */
/* $ Version */
/* - CHRONOS Version 1.0.0, 17-DEC-2001 (BVS) */
/* -& */
/* Local array declarations. */
/* Save all local arrays. */
/* The data. */
/* Time systems */
/* Types within systems. */
/* Default types for the systems. */
/* This array defines whether TYPE is applicable for a system. */
/* This array defines whether an output of SYSTEM/TYPE can be */
/* formatted. */
/* This array defines default picture for output format */
/* for a combination of SYSTEM/TYPE. */
/* Command line keys. */
/* Copy local arrays to outputs and return. */
for (i__ = 1; i__ <= 4; ++i__) {
s_copy(systms + (((i__1 = i__ - 1) < 4 && 0 <= i__1 ? i__1 : s_rnge(
"systms", i__1, "crcnst_", (ftnlen)279)) << 5), lsystm + (((
i__2 = i__ - 1) < 4 && 0 <= i__2 ? i__2 : s_rnge("lsystm",
i__2, "crcnst_", (ftnlen)279)) << 5), (ftnlen)32, (ftnlen)32);
s_copy(deftyp + (((i__1 = i__ - 1) < 4 && 0 <= i__1 ? i__1 : s_rnge(
"deftyp", i__1, "crcnst_", (ftnlen)280)) << 5), ldefty + (((
i__2 = i__ - 1) < 4 && 0 <= i__2 ? i__2 : s_rnge("ldefty",
i__2, "crcnst_", (ftnlen)280)) << 5), (ftnlen)32, (ftnlen)32);
for (j = 1; j <= 10; ++j) {
systyp[(i__1 = i__ + (j << 2) - 5) < 40 && 0 <= i__1 ? i__1 :
s_rnge("systyp", i__1, "crcnst_", (ftnlen)282)] = lsysty[(
i__2 = i__ + (j << 2) - 5) < 40 && 0 <= i__2 ? i__2 :
s_rnge("lsysty", i__2, "crcnst_", (ftnlen)282)];
fmtted[(i__1 = i__ + (j << 2) - 5) < 40 && 0 <= i__1 ? i__1 :
s_rnge("fmtted", i__1, "crcnst_", (ftnlen)283)] = lfmtte[(
i__2 = i__ + (j << 2) - 5) < 40 && 0 <= i__2 ? i__2 :
s_rnge("lfmtte", i__2, "crcnst_", (ftnlen)283)];
s_copy(fmtpic + (((i__1 = i__ + (j << 2) - 5) < 40 && 0 <= i__1 ?
i__1 : s_rnge("fmtpic", i__1, "crcnst_", (ftnlen)284)) <<
6), lfmtpi + (((i__2 = i__ + (j << 2) - 5) < 40 && 0 <=
i__2 ? i__2 : s_rnge("lfmtpi", i__2, "crcnst_", (ftnlen)
284)) << 6), (ftnlen)64, (ftnlen)64);
}
}
for (j = 1; j <= 10; ++j) {
s_copy(types + (((i__1 = j - 1) < 10 && 0 <= i__1 ? i__1 : s_rnge(
"types", i__1, "crcnst_", (ftnlen)289)) << 5), ltypes + (((
i__2 = j - 1) < 10 && 0 <= i__2 ? i__2 : s_rnge("ltypes",
i__2, "crcnst_", (ftnlen)289)) << 5), (ftnlen)32, (ftnlen)32);
}
for (i__ = 1; i__ <= 19; ++i__) {
s_copy(clkeys + (((i__1 = i__ - 1) < 19 && 0 <= i__1 ? i__1 : s_rnge(
"clkeys", i__1, "crcnst_", (ftnlen)293)) << 5), lclkey + (((
i__2 = i__ - 1) < 19 && 0 <= i__2 ? i__2 : s_rnge("lclkey",
i__2, "crcnst_", (ftnlen)293)) << 5), (ftnlen)32, (ftnlen)32);
}
return 0;
} /* crcnst_ */
File diff suppressed because it is too large Load Diff
-566
View File
@@ -1,566 +0,0 @@
/* dsplay.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* Table of constant values */
static integer c__4 = 4;
static integer c__26 = 26;
static integer c__18 = 18;
static integer c__54 = 54;
/* $Procedure DSPLAY( Display static descriptive information ) */
/* Subroutine */ int dsplay_(char *what, char *action, ftnlen what_len,
ftnlen action_len)
{
/* Builtin functions */
/* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
integer s_cmp(char *, char *, ftnlen, ftnlen);
/* Subroutine */ int s_stop(char *, ftnlen);
/* Local variables */
extern /* Subroutine */ int chkin_(char *, ftnlen), repmc_(char *, char *,
char *, char *, ftnlen, ftnlen, ftnlen, ftnlen), stdio_(char *,
integer *, ftnlen);
char hlpmsg[80*18], vermsg[80*4], usgmsg[80*26], tmlmsg[80*54];
integer stdout;
extern logical return_(void);
extern /* Subroutine */ int writla_(integer *, char *, integer *, ftnlen),
chkout_(char *, ftnlen);
/* $ Abstract */
/* Displays CHRONOS usage, help or template information and stops */
/* the program if needed. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Required_Reading */
/* None. */
/* $ Keywords */
/* None */
/* $ Declarations */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* CHRONOS Include file. */
/* CHRONOS Version. */
/* Environment variable that contains CHRONOS setup file name. */
/* LST SOL marker. */
/* Command lines keys and total number of them. */
/* Setup file variables. */
/* Time system indentifier strings and total number of time */
/* systems. */
/* Time types identitifier strings and total number of time types. */
/* Line size parameters. */
/* File name length parameters. */
/* $ Brief_I/O */
/* VARIABLE I/O DESCRIPTION */
/* -------- --- -------------------------------------------------- */
/* WHAT I "What should be displayed" key. */
/* ACTION I Stop/continue key. */
/* $ Detailed_Input */
/* WHAT Key specifying what should be displayed. The value */
/* can be 'VERSION', 'USAGE', 'HELP' or 'TEMPLATE'. */
/* ACTION Key specifying whether program should proceed */
/* or stop ('STOP', 'PROCEED') */
/* $ Detailed_Output */
/* None. */
/* The routine prints requested message to STDOUT and stops (or not) */
/* depending on the requested action. */
/* $ Parameters */
/* See the include file. */
/* $ Files */
/* None. */
/* $ Exceptions */
/* Error free. */
/* $ Particulars */
/* If WHAT value is not one of the values listed in Detailed_Input, */
/* then no message is displayed. */
/* If ACTION value is not 'STOP', then the routine does not stop the */
/* program. */
/* $ Examples */
/* None. */
/* $ Restrictions */
/* None. */
/* $ Author_and_Institution */
/* B.V.Semenov (JPL) */
/* $ Literature_References */
/* None. */
/* $ Version */
/* - CHRONOS Version 2.0.0, 03-JAN-2002 (BVS) */
/* Updated usage and template displays to reflect addition of */
/* the new command line switches and FURNSH capability in the */
/* calling program. */
/* - CHRONOS Version 1.2.2, 03-MAY-2001 (BVS) */
/* Fixed "disappearing" backslashes in template output. */
/* - CHRONOS Version 1.0.0, 13-MAY-1998 (BVS) */
/* -& */
/* Local parameters. */
/* Backslash character ord. */
/* Local variables. */
/* SPICELIB function. */
/* Standard SPICE error handling. */
if (return_()) {
return 0;
} else {
chkin_("DSPLAY", (ftnlen)6);
}
/* Version display. */
s_copy(vermsg, " ", (ftnlen)80, (ftnlen)1);
s_copy(vermsg + 80, "CHRONOS -- Universal Time Conversion Tool", (ftnlen)
80, (ftnlen)41);
s_copy(vermsg + 160, "Version 2.2.0, October 28, 2011", (ftnlen)80, (
ftnlen)31);
s_copy(vermsg + 240, " ", (ftnlen)80, (ftnlen)1);
/* Usage display. */
s_copy(usgmsg, "CHRONOS Usage", (ftnlen)80, (ftnlen)13);
s_copy(usgmsg + 80, "---------------------------------------------------"
"---------------", (ftnlen)80, (ftnlen)66);
s_copy(usgmsg + 160, " ", (ftnlen)80, (ftnlen)1);
s_copy(usgmsg + 240, " To convert time from one supported system/type "
"to another:", (ftnlen)80, (ftnlen)61);
s_copy(usgmsg + 320, " ", (ftnlen)80, (ftnlen)1);
s_copy(usgmsg + 400, " % CHRONOS # <setup file name OR kernel file "
"name(s)>", (ftnlen)80, (ftnlen)58);
s_copy(usgmsg + 480, " # <\"from\" time system>", (ftnlen)
80, (ftnlen)38);
s_copy(usgmsg + 560, " [# <\"from\" time type>]", (ftnlen)
80, (ftnlen)37);
s_copy(usgmsg + 640, " # <\"to\" time system>", (ftnlen)80,
(ftnlen)36);
s_copy(usgmsg + 720, " [# <\"to\" time type>]", (ftnlen)80,
(ftnlen)35);
s_copy(usgmsg + 800, " [# <output time format picture>]", (
ftnlen)80, (ftnlen)47);
s_copy(usgmsg + 880, " # <input time> | #", (ftnlen)80, (
ftnlen)34);
s_copy(usgmsg + 960, " [# <sc ID>]", (ftnlen)80, (ftnlen)26)
;
s_copy(usgmsg + 1040, " [# <cental body ID>]", (ftnlen)80, (
ftnlen)35);
s_copy(usgmsg + 1120, " [# <UTC time of the landing>]", (
ftnlen)80, (ftnlen)44);
s_copy(usgmsg + 1200, " [# <index of the first SOL>]", (
ftnlen)80, (ftnlen)43);
s_copy(usgmsg + 1280, " [#]", (ftnlen)80, (ftnlen)18);
s_copy(usgmsg + 1360, " [#]", (ftnlen)80, (ftnlen)18);
s_copy(usgmsg + 1440, " ", (ftnlen)80, (ftnlen)1);
s_copy(usgmsg + 1520, " To display usage: % CHRONOS [#|#]"
, (ftnlen)80, (ftnlen)50);
s_copy(usgmsg + 1600, " To display help: % CHRONOS #|#",
(ftnlen)80, (ftnlen)48);
s_copy(usgmsg + 1680, " To display setup file template: % CHRONOS #", (
ftnlen)80, (ftnlen)46);
s_copy(usgmsg + 1760, " ", (ftnlen)80, (ftnlen)1);
s_copy(usgmsg + 1840, " The case of command line switches is insignifi"
"cant. Switches shown within ", (ftnlen)80, (ftnlen)77);
s_copy(usgmsg + 1920, " square braces [] are optional. See User's Guid"
"e for details on # usage.", (ftnlen)80, (ftnlen)74);
s_copy(usgmsg + 2000, " ", (ftnlen)80, (ftnlen)1);
repmc_(usgmsg + 400, "#", "-SETUP", usgmsg + 400, (ftnlen)80, (ftnlen)1, (
ftnlen)6, (ftnlen)80);
repmc_(usgmsg + 480, "#", "-FROM", usgmsg + 480, (ftnlen)80, (ftnlen)1, (
ftnlen)5, (ftnlen)80);
repmc_(usgmsg + 560, "#", "-FROMTYPE", usgmsg + 560, (ftnlen)80, (ftnlen)
1, (ftnlen)9, (ftnlen)80);
repmc_(usgmsg + 640, "#", "-TO", usgmsg + 640, (ftnlen)80, (ftnlen)1, (
ftnlen)3, (ftnlen)80);
repmc_(usgmsg + 720, "#", "-TOTYPE", usgmsg + 720, (ftnlen)80, (ftnlen)1,
(ftnlen)7, (ftnlen)80);
repmc_(usgmsg + 800, "#", "-FORMAT", usgmsg + 800, (ftnlen)80, (ftnlen)1,
(ftnlen)7, (ftnlen)80);
repmc_(usgmsg + 880, "#", "-TIME", usgmsg + 880, (ftnlen)80, (ftnlen)1, (
ftnlen)5, (ftnlen)80);
repmc_(usgmsg + 880, "#", "-BATCH", usgmsg + 880, (ftnlen)80, (ftnlen)1, (
ftnlen)6, (ftnlen)80);
repmc_(usgmsg + 960, "#", "-SC", usgmsg + 960, (ftnlen)80, (ftnlen)1, (
ftnlen)3, (ftnlen)80);
repmc_(usgmsg + 1040, "#", "-CENTER", usgmsg + 1040, (ftnlen)80, (ftnlen)
1, (ftnlen)7, (ftnlen)80);
repmc_(usgmsg + 1120, "#", "-LANDINGTIME", usgmsg + 1120, (ftnlen)80, (
ftnlen)1, (ftnlen)12, (ftnlen)80);
repmc_(usgmsg + 1200, "#", "-SOL1INDEX", usgmsg + 1200, (ftnlen)80, (
ftnlen)1, (ftnlen)10, (ftnlen)80);
repmc_(usgmsg + 1280, "#", "-NOLABEL", usgmsg + 1280, (ftnlen)80, (ftnlen)
1, (ftnlen)8, (ftnlen)80);
repmc_(usgmsg + 1360, "#", "-TRACE", usgmsg + 1360, (ftnlen)80, (ftnlen)1,
(ftnlen)6, (ftnlen)80);
repmc_(usgmsg + 1520, "#", "-HELP", usgmsg + 1520, (ftnlen)80, (ftnlen)1,
(ftnlen)5, (ftnlen)80);
repmc_(usgmsg + 1520, "#", "-H", usgmsg + 1520, (ftnlen)80, (ftnlen)1, (
ftnlen)2, (ftnlen)80);
repmc_(usgmsg + 1600, "#", "-USAGE", usgmsg + 1600, (ftnlen)80, (ftnlen)1,
(ftnlen)6, (ftnlen)80);
repmc_(usgmsg + 1600, "#", "-U", usgmsg + 1600, (ftnlen)80, (ftnlen)1, (
ftnlen)2, (ftnlen)80);
repmc_(usgmsg + 1680, "#", "-TEMPLATE", usgmsg + 1680, (ftnlen)80, (
ftnlen)1, (ftnlen)9, (ftnlen)80);
repmc_(usgmsg + 1920, "#", "-BATCH", usgmsg + 1920, (ftnlen)80, (ftnlen)1,
(ftnlen)6, (ftnlen)80);
/* Help display. */
s_copy(hlpmsg, "CHRONOS Help", (ftnlen)80, (ftnlen)12);
s_copy(hlpmsg + 80, "---------------------------------------------------"
"---------------", (ftnlen)80, (ftnlen)66);
s_copy(hlpmsg + 160, " ", (ftnlen)80, (ftnlen)1);
s_copy(hlpmsg + 240, "CHRONOS is a time conversion tool capable of conve"
"rting times", (ftnlen)80, (ftnlen)61);
s_copy(hlpmsg + 320, "between the following time systems:", (ftnlen)80, (
ftnlen)35);
s_copy(hlpmsg + 400, " ", (ftnlen)80, (ftnlen)1);
s_copy(hlpmsg + 480, " # -- Universal Time Coordinated (types: #, #, "
"#, #)", (ftnlen)80, (ftnlen)55);
s_copy(hlpmsg + 560, " # -- Ephemeris Time (types: #, #, #, #, #)", (
ftnlen)80, (ftnlen)46);
s_copy(hlpmsg + 640, " # -- Spacecraft On-board Clock Time (types: #,"
" #, #)", (ftnlen)80, (ftnlen)56);
s_copy(hlpmsg + 720, " # -- Local True Solar Time (types: #, #)", (
ftnlen)80, (ftnlen)44);
s_copy(hlpmsg + 800, " ", (ftnlen)80, (ftnlen)1);
s_copy(hlpmsg + 880, "CHRONOS takes inputs from the command line. Run CH"
"RONOS with the ", (ftnlen)80, (ftnlen)65);
s_copy(hlpmsg + 960, "\"#\" switch to display usage information.", (
ftnlen)80, (ftnlen)40);
s_copy(hlpmsg + 1040, " ", (ftnlen)80, (ftnlen)1);
s_copy(hlpmsg + 1120, "Although not required, CHRONOS allows certain par"
"ameters to be ", (ftnlen)80, (ftnlen)63);
s_copy(hlpmsg + 1200, "provided via a setup file. Run CHRONOS with the"
" \"#\" switch ", (ftnlen)80, (ftnlen)59);
s_copy(hlpmsg + 1280, "to display setup file template. ", (ftnlen)80, (
ftnlen)32);
s_copy(hlpmsg + 1360, " ", (ftnlen)80, (ftnlen)1);
repmc_(hlpmsg + 480, "#", "UTC", hlpmsg + 480, (ftnlen)80, (ftnlen)1, (
ftnlen)3, (ftnlen)80);
repmc_(hlpmsg + 480, "#", "SCET", hlpmsg + 480, (ftnlen)80, (ftnlen)1, (
ftnlen)4, (ftnlen)80);
repmc_(hlpmsg + 480, "#", "ERT", hlpmsg + 480, (ftnlen)80, (ftnlen)1, (
ftnlen)3, (ftnlen)80);
repmc_(hlpmsg + 480, "#", "ETT", hlpmsg + 480, (ftnlen)80, (ftnlen)1, (
ftnlen)3, (ftnlen)80);
repmc_(hlpmsg + 480, "#", "LT", hlpmsg + 480, (ftnlen)80, (ftnlen)1, (
ftnlen)2, (ftnlen)80);
repmc_(hlpmsg + 560, "#", "ET", hlpmsg + 560, (ftnlen)80, (ftnlen)1, (
ftnlen)2, (ftnlen)80);
repmc_(hlpmsg + 560, "#", "SCET", hlpmsg + 560, (ftnlen)80, (ftnlen)1, (
ftnlen)4, (ftnlen)80);
repmc_(hlpmsg + 560, "#", "ERT", hlpmsg + 560, (ftnlen)80, (ftnlen)1, (
ftnlen)3, (ftnlen)80);
repmc_(hlpmsg + 560, "#", "ETT", hlpmsg + 560, (ftnlen)80, (ftnlen)1, (
ftnlen)3, (ftnlen)80);
repmc_(hlpmsg + 560, "#", "LT", hlpmsg + 560, (ftnlen)80, (ftnlen)1, (
ftnlen)2, (ftnlen)80);
repmc_(hlpmsg + 560, "#", "SECONDS", hlpmsg + 560, (ftnlen)80, (ftnlen)1,
(ftnlen)7, (ftnlen)80);
repmc_(hlpmsg + 640, "#", "SCLK", hlpmsg + 640, (ftnlen)80, (ftnlen)1, (
ftnlen)4, (ftnlen)80);
repmc_(hlpmsg + 640, "#", "SCLK", hlpmsg + 640, (ftnlen)80, (ftnlen)1, (
ftnlen)4, (ftnlen)80);
repmc_(hlpmsg + 640, "#", "HEX", hlpmsg + 640, (ftnlen)80, (ftnlen)1, (
ftnlen)3, (ftnlen)80);
repmc_(hlpmsg + 640, "#", "TICKS", hlpmsg + 640, (ftnlen)80, (ftnlen)1, (
ftnlen)5, (ftnlen)80);
repmc_(hlpmsg + 720, "#", "LST", hlpmsg + 720, (ftnlen)80, (ftnlen)1, (
ftnlen)3, (ftnlen)80);
repmc_(hlpmsg + 720, "#", "LST", hlpmsg + 720, (ftnlen)80, (ftnlen)1, (
ftnlen)3, (ftnlen)80);
repmc_(hlpmsg + 720, "#", "LSUN", hlpmsg + 720, (ftnlen)80, (ftnlen)1, (
ftnlen)4, (ftnlen)80);
repmc_(hlpmsg + 960, "#", "-USAGE", hlpmsg + 960, (ftnlen)80, (ftnlen)1, (
ftnlen)6, (ftnlen)80);
repmc_(hlpmsg + 1200, "#", "-TEMPLATE", hlpmsg + 1200, (ftnlen)80, (
ftnlen)1, (ftnlen)9, (ftnlen)80);
/* Template diplay */
s_copy(tmlmsg, "CHRONOS Setup File", (ftnlen)80, (ftnlen)18);
s_copy(tmlmsg + 80, "---------------------------------------------------"
"---------------", (ftnlen)80, (ftnlen)66);
s_copy(tmlmsg + 160, " ", (ftnlen)80, (ftnlen)1);
s_copy(tmlmsg + 240, "CHRONOS allows a few parameters to be provided in "
"a setup file.", (ftnlen)80, (ftnlen)63);
s_copy(tmlmsg + 320, "The setup file format should correspond to the SPI"
"CE Kernel Text", (ftnlen)80, (ftnlen)64);
s_copy(tmlmsg + 400, "file format specification, i.e. it must contain da"
"ta formatted as", (ftnlen)80, (ftnlen)65);
s_copy(tmlmsg + 480, "a set of KEYWORD=VALUE assignments enclosed between"
, (ftnlen)80, (ftnlen)51);
s_copy(tmlmsg + 560, " ", (ftnlen)80, (ftnlen)1);
s_copy(tmlmsg + 640, " \\begindata", (ftnlen)80, (ftnlen)13);
s_copy(tmlmsg + 720, " \\begintext", (ftnlen)80, (ftnlen)13);
s_copy(tmlmsg + 800, " ", (ftnlen)80, (ftnlen)1);
s_copy(tmlmsg + 880, "markers. Each assignment and marker must be on a l"
"ine by itself.", (ftnlen)80, (ftnlen)64);
s_copy(tmlmsg + 960, " ", (ftnlen)80, (ftnlen)1);
s_copy(tmlmsg + 1040, "The following parameters may be provided in a set"
"up file:", (ftnlen)80, (ftnlen)57);
s_copy(tmlmsg + 1120, " ", (ftnlen)80, (ftnlen)1);
s_copy(tmlmsg + 1200, " \\begindata", (ftnlen)80, (ftnlen)13);
s_copy(tmlmsg + 1280, " # = 'name of a LSK file'", (ftnlen)80, (
ftnlen)30);
s_copy(tmlmsg + 1360, " # = 'name of a SCLK file for the mission'", (
ftnlen)80, (ftnlen)47);
s_copy(tmlmsg + 1440, " # = 'name of a PCK file'", (ftnlen)80, (
ftnlen)30);
s_copy(tmlmsg + 1520, " # = ( 'name of an SPK file', '...' )", (
ftnlen)80, (ftnlen)42);
s_copy(tmlmsg + 1600, " # = ( 'name of a CK file', '...' )", (ftnlen)
80, (ftnlen)40);
s_copy(tmlmsg + 1680, " # = 'name of a frame definitions file'", (
ftnlen)80, (ftnlen)44);
s_copy(tmlmsg + 1760, " # = NAIF ID for the spacecraft", (ftnlen)80,
(ftnlen)36);
s_copy(tmlmsg + 1840, " # = NAIF ID for the center body", (ftnlen)80,
(ftnlen)37);
s_copy(tmlmsg + 1920, " # = 'UTC time of the landing'", (ftnlen)80, (
ftnlen)35);
s_copy(tmlmsg + 2000, " # = SOL index of the landing", (ftnlen)80, (
ftnlen)34);
s_copy(tmlmsg + 2080, " \\begintext", (ftnlen)80, (ftnlen)13);
s_copy(tmlmsg + 2160, " ", (ftnlen)80, (ftnlen)1);
s_copy(tmlmsg + 2240, "Note that either or all of the #, #, #, ", (ftnlen)
80, (ftnlen)40);
s_copy(tmlmsg + 2320, "and # parameters can also be provided using the c"
"ommand", (ftnlen)80, (ftnlen)55);
s_copy(tmlmsg + 2400, "line switches. If done so, the setup file value c"
"orresponding to a command ", (ftnlen)80, (ftnlen)75);
s_copy(tmlmsg + 2480, "line value is not needed, and, if present, is ign"
"ored by the program.", (ftnlen)80, (ftnlen)69);
s_copy(tmlmsg + 2560, " ", (ftnlen)80, (ftnlen)1);
s_copy(tmlmsg + 2640, "Similarly, the kernels files to be loaded can be "
"provided using the ", (ftnlen)80, (ftnlen)68);
s_copy(tmlmsg + 2720, "standard SPICE interface -- with the KERNELS_TO_L"
"OAD parameter:", (ftnlen)80, (ftnlen)63);
s_copy(tmlmsg + 2800, " ", (ftnlen)80, (ftnlen)1);
s_copy(tmlmsg + 2880, " \\begindata", (ftnlen)80, (ftnlen)13);
s_copy(tmlmsg + 2960, " KERNELS_TO_LOAD = ( ", (ftnlen)80, (ftnlen)
26);
s_copy(tmlmsg + 3040, " 'name of a LSK file',", (
ftnlen)80, (ftnlen)41);
s_copy(tmlmsg + 3120, " 'name of a SCLK file ',", (
ftnlen)80, (ftnlen)43);
s_copy(tmlmsg + 3200, " 'name of a PCK file',", (
ftnlen)80, (ftnlen)41);
s_copy(tmlmsg + 3280, " 'name of an SPK file',", (
ftnlen)80, (ftnlen)42);
s_copy(tmlmsg + 3360, " '...',", (ftnlen)80, (ftnlen)
26);
s_copy(tmlmsg + 3440, " 'name of a CK file',", (ftnlen)
80, (ftnlen)40);
s_copy(tmlmsg + 3520, " '...',", (ftnlen)80, (ftnlen)
26);
s_copy(tmlmsg + 3600, " 'name of an FK file'", (ftnlen)
80, (ftnlen)40);
s_copy(tmlmsg + 3680, " )", (ftnlen)80, (ftnlen)25)
;
s_copy(tmlmsg + 3760, " \\begintext", (ftnlen)80, (ftnlen)13);
s_copy(tmlmsg + 3840, " ", (ftnlen)80, (ftnlen)1);
s_copy(tmlmsg + 3920, "or even by simply listing them after the # comman"
"d line switch. In", (ftnlen)80, (ftnlen)66);
s_copy(tmlmsg + 4000, "either of these two cases, specifying the #, #, ",
(ftnlen)80, (ftnlen)48);
s_copy(tmlmsg + 4080, "#, #, #, and # setup file parameters ", (ftnlen)80,
(ftnlen)37);
s_copy(tmlmsg + 4160, "is not necessary.", (ftnlen)80, (ftnlen)17);
s_copy(tmlmsg + 4240, " ", (ftnlen)80, (ftnlen)1);
repmc_(tmlmsg + 1280, "#", "LEAPSECONDS_FILE", tmlmsg + 1280, (ftnlen)80,
(ftnlen)1, (ftnlen)16, (ftnlen)80);
repmc_(tmlmsg + 1360, "#", "SCLK_FILE", tmlmsg + 1360, (ftnlen)80, (
ftnlen)1, (ftnlen)9, (ftnlen)80);
repmc_(tmlmsg + 1440, "#", "PCK_FILE", tmlmsg + 1440, (ftnlen)80, (ftnlen)
1, (ftnlen)8, (ftnlen)80);
repmc_(tmlmsg + 1520, "#", "SPK_FILES", tmlmsg + 1520, (ftnlen)80, (
ftnlen)1, (ftnlen)9, (ftnlen)80);
repmc_(tmlmsg + 1600, "#", "CK_FILES", tmlmsg + 1600, (ftnlen)80, (ftnlen)
1, (ftnlen)8, (ftnlen)80);
repmc_(tmlmsg + 1680, "#", "FRAMES_FILE", tmlmsg + 1680, (ftnlen)80, (
ftnlen)1, (ftnlen)11, (ftnlen)80);
repmc_(tmlmsg + 1760, "#", "SPACECRAFT_ID", tmlmsg + 1760, (ftnlen)80, (
ftnlen)1, (ftnlen)13, (ftnlen)80);
repmc_(tmlmsg + 1840, "#", "CENTER_ID", tmlmsg + 1840, (ftnlen)80, (
ftnlen)1, (ftnlen)9, (ftnlen)80);
repmc_(tmlmsg + 1920, "#", "LANDING_TIME", tmlmsg + 1920, (ftnlen)80, (
ftnlen)1, (ftnlen)12, (ftnlen)80);
repmc_(tmlmsg + 2000, "#", "LANDING_SOL_INDEX", tmlmsg + 2000, (ftnlen)80,
(ftnlen)1, (ftnlen)17, (ftnlen)80);
repmc_(tmlmsg + 2240, "#", "SPACECRAFT_ID", tmlmsg + 2240, (ftnlen)80, (
ftnlen)1, (ftnlen)13, (ftnlen)80);
repmc_(tmlmsg + 2240, "#", "CENTER_ID", tmlmsg + 2240, (ftnlen)80, (
ftnlen)1, (ftnlen)9, (ftnlen)80);
repmc_(tmlmsg + 2240, "#", "LANDING_TIME", tmlmsg + 2240, (ftnlen)80, (
ftnlen)1, (ftnlen)12, (ftnlen)80);
repmc_(tmlmsg + 2320, "#", "LANDING_SOL_INDEX", tmlmsg + 2320, (ftnlen)80,
(ftnlen)1, (ftnlen)17, (ftnlen)80);
repmc_(tmlmsg + 3920, "#", "-SETUP", tmlmsg + 3920, (ftnlen)80, (ftnlen)1,
(ftnlen)6, (ftnlen)80);
repmc_(tmlmsg + 4000, "#", "LEAPSECONDS_FILE", tmlmsg + 4000, (ftnlen)80,
(ftnlen)1, (ftnlen)16, (ftnlen)80);
repmc_(tmlmsg + 4000, "#", "SCLK_FILE", tmlmsg + 4000, (ftnlen)80, (
ftnlen)1, (ftnlen)9, (ftnlen)80);
repmc_(tmlmsg + 4080, "#", "PCK_FILE", tmlmsg + 4080, (ftnlen)80, (ftnlen)
1, (ftnlen)8, (ftnlen)80);
repmc_(tmlmsg + 4080, "#", "SPK_FILES", tmlmsg + 4080, (ftnlen)80, (
ftnlen)1, (ftnlen)9, (ftnlen)80);
repmc_(tmlmsg + 4080, "#", "CK_FILES", tmlmsg + 4080, (ftnlen)80, (ftnlen)
1, (ftnlen)8, (ftnlen)80);
repmc_(tmlmsg + 4080, "#", "FRAMES_FILE", tmlmsg + 4080, (ftnlen)80, (
ftnlen)1, (ftnlen)11, (ftnlen)80);
/* Get STDOUT */
stdio_("STDOUT", &stdout, (ftnlen)6);
/* What was requested for display? */
if (s_cmp(what, "VERSION", what_len, (ftnlen)7) == 0) {
/* Display version. */
writla_(&c__4, vermsg, &stdout, (ftnlen)80);
} else if (s_cmp(what, "USAGE", what_len, (ftnlen)5) == 0) {
/* Display usage. */
writla_(&c__4, vermsg, &stdout, (ftnlen)80);
writla_(&c__26, usgmsg, &stdout, (ftnlen)80);
} else if (s_cmp(what, "HELP", what_len, (ftnlen)4) == 0) {
/* Display help. */
writla_(&c__4, vermsg, &stdout, (ftnlen)80);
writla_(&c__18, hlpmsg, &stdout, (ftnlen)80);
} else if (s_cmp(what, "TEMPLATE", what_len, (ftnlen)8) == 0) {
/* Display help. */
writla_(&c__4, vermsg, &stdout, (ftnlen)80);
writla_(&c__54, tmlmsg, &stdout, (ftnlen)80);
}
/* Should we stop the program? */
if (s_cmp(action, "STOP", action_len, (ftnlen)4) == 0) {
s_stop("", (ftnlen)0);
}
chkout_("DSPLAY", (ftnlen)6);
return 0;
} /* dsplay_ */
-683
View File
@@ -1,683 +0,0 @@
/*
-Header_File f2c.h ( CSPICE version of the f2c standard header file )
-Abstract
Perform standard f2c declarations, customized for the host
environment.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Particulars
The standard f2c header file f2c.h must be included by every function
generated by running f2c on Fortran source code. The header f2c.h
includes typedefs used to provide a level of indirection in mapping
Fortran data types to native C data types. For example, Fortran
INTEGER variables are mapped to variables of type integer, where
integer is a C typedef. In the standard f2c.h header, the typedef
integer translates to the C type long.
Because the standard version of f2c.h does not work on all platforms,
this header file contains two platform-dependent versions of it,
meant to be selected at build time via precompiler switches. The
precompiler switches reference macros defined in SpiceZpl.h to
determine for which host platform the code is targeted. The first
version of f2c.h, which works on most platforms, is copied directly
from the standard version of f2c.h. The second version is intended
for use on the DEC Alpha running Digital Unix and the Sun/Solaris
platform using 64 bit mode and running gcc. On those systems, longs
occupy 8 bytes, as do doubles. Because the Fortran standard requires
that INTEGERS occupy half the storage of DOUBLE PRECISION numbers,
INTEGERS should be mapped to 4-byte ints rather than 8-byte longs
on the platforms having 8-byte longs. In order to achieve this, the
header f2c.h was transformed using the sed command
sed 's/long //' f2c.h
The high-level structure of this file is then:
# if ( defined(CSPICE_ALPHA_DIGITAL_UNIX ) \
|| defined(CSPICE_SUN_SOLARIS_64BIT_GCC ) )
[ Alpha/Digital Unix and Sun Solaris 64 bit mode/gcc
version of f2c.h source code ]
# else
[ Standard version of f2c.h source code ]
# endif
-Restrictions
1) This header file must be updated whenever the f2c processor
or the f2c libraries libI77 and libF77 are updated.
2) This header may need to be updated to support new platforms.
The supported platforms at the time of the 31-JAN-1999 release
are:
ALPHA-DIGITAL-UNIX
HP
NEXT
PC-LINUX
PC-MS
SGI-IRIX-N32
SGI-IRIX-NO2
SUN-SOLARIS
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
B.V. Semenov (JPL)
E.D. Wright (JPL)
-Version
-CSPICE Version 4.2.0, 09-APR-2014 (EDW) (BVS)
Added include for SpiceZrnm.h to eliminate symbol conflict
encountered from Icy and JNISpice under OS X 10.7.
Minor text format correction to eliminate error signal from
OS X cpp. The edit removes leading whitespace from the
final "#endif".
Updated for:
PC-CYGWIN-64BIT-GCC_C
environment. Added the corresponding tag:
CSPICE_PC_CYGWIN_64BIT_GCC
tag to the #ifdefs set.
-CSPICE Version 4.1.0, 14-MAY-2010 (EDW)(BVS)
Updated for:
MAC-OSX-64BIT-INTEL_C
SUN-SOLARIS-64BIT-NATIVE_C
SUN-SOLARIS-INTEL-64BIT-CC_C
environments. Added the corresponding tags:
CSPICE_MAC_OSX_INTEL_64BIT_GCC
CSPICE_SUN_SOLARIS_64BIT_NATIVE
CSPICE_SUN_SOLARIS_INTEL_64BIT_CC
tag to the #ifdefs set.
-CSPICE Version 4.0.0, 21-FEB-2006 (NJB)
Updated to support the PC Linux 64 bit mode/gcc platform.
-CSPICE Version 3.0.0, 27-JAN-2003 (NJB)
Updated to support the Sun Solaris 64 bit mode/gcc platform.
-CSPICE Version 2.0.0, 19-DEC-2001 (NJB)
Updated to support linking CSPICE into executables that
also link in objects compiled from Fortran, in particular
ones that perform Fortran I/O. To enable this odd mix,
one defines the preprocessor flag
MIX_C_AND_FORTRAN
This macro is undefined by default, since the action it invokes
is usually not desirable. See the header
f2cMang.h
for further information.
-CSPICE Version 1.0.0, 07-FEB-1999 (NJB)
*/
/*
Include those rename assignments for routines whose symbols will
collide with other libraries.
*/
#ifndef HAVE_SPICERENAME_H
#include "SpiceZrnm.h"
#endif
/*
Optionally include name-mangling macros for f2c external symbols.
*/
#ifdef MIX_C_AND_FORTRAN
#include "f2cMang.h"
#endif
/*
Include CSPICE platform macro definitions.
*/
#include "SpiceZpl.h"
#if ( defined(CSPICE_ALPHA_DIGITAL_UNIX ) \
|| defined(CSPICE_SUN_SOLARIS_64BIT_GCC ) \
|| defined(CSPICE_SUN_SOLARIS_64BIT_NATIVE ) \
|| defined(CSPICE_MAC_OSX_INTEL_64BIT_GCC ) \
|| defined(CSPICE_SUN_SOLARIS_INTEL_64BIT_CC ) \
|| defined(CSPICE_PC_CYGWIN_64BIT_GCC ) \
|| defined(CSPICE_PC_LINUX_64BIT_GCC ) )
/*
MODIFICATION
The following code is intended to be used on the platforms where
a long is the size of a double and an int is half the
size of a double.
Note that the comment line below indicating that the header is
"Standard" has been retained from the original, but is no longer
true.
*/
/* f2c.h -- Standard Fortran to C header file */
#ifndef F2C_INCLUDE
#define F2C_INCLUDE
typedef int integer;
typedef unsigned uinteger;
typedef char *address;
typedef short int shortint;
typedef float real;
typedef double doublereal;
typedef struct { real r, i; } complex;
typedef struct { doublereal r, i; } doublecomplex;
typedef int logical;
typedef short int shortlogical;
typedef char logical1;
typedef char integer1;
#if 0 /* Adjust for integer*8. */
typedef long longint; /* system-dependent */
typedef unsigned long ulongint; /* system-dependent */
#define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b)))
#define qbit_set(a,b) ((a) | ((ulongint)1 << (b)))
#endif
#define TRUE_ (1)
#define FALSE_ (0)
/* Extern is for use with -E */
#ifndef Extern
#define Extern extern
#endif
/* I/O stuff */
#ifdef f2c_i2
/* for -i2 */
typedef short flag;
typedef short ftnlen;
typedef short ftnint;
#else
typedef int flag;
typedef int ftnlen;
typedef int ftnint;
#endif
/*external read, write*/
typedef struct
{ flag cierr;
ftnint ciunit;
flag ciend;
char *cifmt;
ftnint cirec;
} cilist;
/*internal read, write*/
typedef struct
{ flag icierr;
char *iciunit;
flag iciend;
char *icifmt;
ftnint icirlen;
ftnint icirnum;
} icilist;
/*open*/
typedef struct
{ flag oerr;
ftnint ounit;
char *ofnm;
ftnlen ofnmlen;
char *osta;
char *oacc;
char *ofm;
ftnint orl;
char *oblnk;
} olist;
/*close*/
typedef struct
{ flag cerr;
ftnint cunit;
char *csta;
} cllist;
/*rewind, backspace, endfile*/
typedef struct
{ flag aerr;
ftnint aunit;
} alist;
/* inquire */
typedef struct
{ flag inerr;
ftnint inunit;
char *infile;
ftnlen infilen;
ftnint *inex; /*parameters in standard's order*/
ftnint *inopen;
ftnint *innum;
ftnint *innamed;
char *inname;
ftnlen innamlen;
char *inacc;
ftnlen inacclen;
char *inseq;
ftnlen inseqlen;
char *indir;
ftnlen indirlen;
char *infmt;
ftnlen infmtlen;
char *inform;
ftnint informlen;
char *inunf;
ftnlen inunflen;
ftnint *inrecl;
ftnint *innrec;
char *inblank;
ftnlen inblanklen;
} inlist;
#define VOID void
union Multitype { /* for multiple entry points */
integer1 g;
shortint h;
integer i;
/* longint j; */
real r;
doublereal d;
complex c;
doublecomplex z;
};
typedef union Multitype Multitype;
/*typedef int Long;*/ /* No longer used; formerly in Namelist */
struct Vardesc { /* for Namelist */
char *name;
char *addr;
ftnlen *dims;
int type;
};
typedef struct Vardesc Vardesc;
struct Namelist {
char *name;
Vardesc **vars;
int nvars;
};
typedef struct Namelist Namelist;
#define abs(x) ((x) >= 0 ? (x) : -(x))
#define dabs(x) (doublereal)abs(x)
#define min(a,b) ((a) <= (b) ? (a) : (b))
#define max(a,b) ((a) >= (b) ? (a) : (b))
#define dmin(a,b) (doublereal)min(a,b)
#define dmax(a,b) (doublereal)max(a,b)
#define bit_test(a,b) ((a) >> (b) & 1)
#define bit_clear(a,b) ((a) & ~((uinteger)1 << (b)))
#define bit_set(a,b) ((a) | ((uinteger)1 << (b)))
/* procedure parameter types for -A and -C++ */
#define F2C_proc_par_types 1
#ifdef __cplusplus
typedef int /* Unknown procedure type */ (*U_fp)(...);
typedef shortint (*J_fp)(...);
typedef integer (*I_fp)(...);
typedef real (*R_fp)(...);
typedef doublereal (*D_fp)(...), (*E_fp)(...);
typedef /* Complex */ VOID (*C_fp)(...);
typedef /* Double Complex */ VOID (*Z_fp)(...);
typedef logical (*L_fp)(...);
typedef shortlogical (*K_fp)(...);
typedef /* Character */ VOID (*H_fp)(...);
typedef /* Subroutine */ int (*S_fp)(...);
#else
typedef int /* Unknown procedure type */ (*U_fp)();
typedef shortint (*J_fp)();
typedef integer (*I_fp)();
typedef real (*R_fp)();
typedef doublereal (*D_fp)(), (*E_fp)();
typedef /* Complex */ VOID (*C_fp)();
typedef /* Double Complex */ VOID (*Z_fp)();
typedef logical (*L_fp)();
typedef shortlogical (*K_fp)();
typedef /* Character */ VOID (*H_fp)();
typedef /* Subroutine */ int (*S_fp)();
#endif
/* E_fp is for real functions when -R is not specified */
typedef VOID C_f; /* complex function */
typedef VOID H_f; /* character function */
typedef VOID Z_f; /* double complex function */
typedef doublereal E_f; /* real function with -R not specified */
/* undef any lower-case symbols that your C compiler predefines, e.g.: */
#ifndef Skip_f2c_Undefs
#undef cray
#undef gcos
#undef mc68010
#undef mc68020
#undef mips
#undef pdp11
#undef sgi
#undef sparc
#undef sun
#undef sun2
#undef sun3
#undef sun4
#undef u370
#undef u3b
#undef u3b2
#undef u3b5
#undef unix
#undef vax
#endif
#endif
/*
This marks the end of the MODIFICATION section version of f2c.h.
*/
#else
/*
The following code is the standard f2c.h header. In this
header, an "integer" is defined to be of type long.
Because the code is copied verbatim, it does not follow the usual
CSPICE indentation pattern.
*/
/* f2c.h -- Standard Fortran to C header file */
#ifndef F2C_INCLUDE
#define F2C_INCLUDE
typedef long int integer;
typedef unsigned long uinteger;
typedef char *address;
typedef short int shortint;
typedef float real;
typedef double doublereal;
typedef struct { real r, i; } complex;
typedef struct { doublereal r, i; } doublecomplex;
typedef long int logical;
typedef short int shortlogical;
typedef char logical1;
typedef char integer1;
#if 0 /* Adjust for integer*8. */
typedef long long longint; /* system-dependent */
typedef unsigned long long ulongint; /* system-dependent */
#define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b)))
#define qbit_set(a,b) ((a) | ((ulongint)1 << (b)))
#endif
#define TRUE_ (1)
#define FALSE_ (0)
/* Extern is for use with -E */
#ifndef Extern
#define Extern extern
#endif
/* I/O stuff */
#ifdef f2c_i2
/* for -i2 */
typedef short flag;
typedef short ftnlen;
typedef short ftnint;
#else
typedef long int flag;
typedef long int ftnlen;
typedef long int ftnint;
#endif
/*external read, write*/
typedef struct
{ flag cierr;
ftnint ciunit;
flag ciend;
char *cifmt;
ftnint cirec;
} cilist;
/*internal read, write*/
typedef struct
{ flag icierr;
char *iciunit;
flag iciend;
char *icifmt;
ftnint icirlen;
ftnint icirnum;
} icilist;
/*open*/
typedef struct
{ flag oerr;
ftnint ounit;
char *ofnm;
ftnlen ofnmlen;
char *osta;
char *oacc;
char *ofm;
ftnint orl;
char *oblnk;
} olist;
/*close*/
typedef struct
{ flag cerr;
ftnint cunit;
char *csta;
} cllist;
/*rewind, backspace, endfile*/
typedef struct
{ flag aerr;
ftnint aunit;
} alist;
/* inquire */
typedef struct
{ flag inerr;
ftnint inunit;
char *infile;
ftnlen infilen;
ftnint *inex; /*parameters in standard's order*/
ftnint *inopen;
ftnint *innum;
ftnint *innamed;
char *inname;
ftnlen innamlen;
char *inacc;
ftnlen inacclen;
char *inseq;
ftnlen inseqlen;
char *indir;
ftnlen indirlen;
char *infmt;
ftnlen infmtlen;
char *inform;
ftnint informlen;
char *inunf;
ftnlen inunflen;
ftnint *inrecl;
ftnint *innrec;
char *inblank;
ftnlen inblanklen;
} inlist;
#define VOID void
union Multitype { /* for multiple entry points */
integer1 g;
shortint h;
integer i;
/* longint j; */
real r;
doublereal d;
complex c;
doublecomplex z;
};
typedef union Multitype Multitype;
/*typedef long int Long;*/ /* No longer used; formerly in Namelist */
struct Vardesc { /* for Namelist */
char *name;
char *addr;
ftnlen *dims;
int type;
};
typedef struct Vardesc Vardesc;
struct Namelist {
char *name;
Vardesc **vars;
int nvars;
};
typedef struct Namelist Namelist;
#define abs(x) ((x) >= 0 ? (x) : -(x))
#define dabs(x) (doublereal)abs(x)
#define min(a,b) ((a) <= (b) ? (a) : (b))
#define max(a,b) ((a) >= (b) ? (a) : (b))
#define dmin(a,b) (doublereal)min(a,b)
#define dmax(a,b) (doublereal)max(a,b)
#define bit_test(a,b) ((a) >> (b) & 1)
#define bit_clear(a,b) ((a) & ~((uinteger)1 << (b)))
#define bit_set(a,b) ((a) | ((uinteger)1 << (b)))
/* procedure parameter types for -A and -C++ */
#define F2C_proc_par_types 1
#ifdef __cplusplus
typedef int /* Unknown procedure type */ (*U_fp)(...);
typedef shortint (*J_fp)(...);
typedef integer (*I_fp)(...);
typedef real (*R_fp)(...);
typedef doublereal (*D_fp)(...), (*E_fp)(...);
typedef /* Complex */ VOID (*C_fp)(...);
typedef /* Double Complex */ VOID (*Z_fp)(...);
typedef logical (*L_fp)(...);
typedef shortlogical (*K_fp)(...);
typedef /* Character */ VOID (*H_fp)(...);
typedef /* Subroutine */ int (*S_fp)(...);
#else
typedef int /* Unknown procedure type */ (*U_fp)();
typedef shortint (*J_fp)();
typedef integer (*I_fp)();
typedef real (*R_fp)();
typedef doublereal (*D_fp)(), (*E_fp)();
typedef /* Complex */ VOID (*C_fp)();
typedef /* Double Complex */ VOID (*Z_fp)();
typedef logical (*L_fp)();
typedef shortlogical (*K_fp)();
typedef /* Character */ VOID (*H_fp)();
typedef /* Subroutine */ int (*S_fp)();
#endif
/* E_fp is for real functions when -R is not specified */
typedef VOID C_f; /* complex function */
typedef VOID H_f; /* character function */
typedef VOID Z_f; /* double complex function */
typedef doublereal E_f; /* real function with -R not specified */
/* undef any lower-case symbols that your C compiler predefines, e.g.: */
#ifndef Skip_f2c_Undefs
#undef cray
#undef gcos
#undef mc68010
#undef mc68020
#undef mips
#undef pdp11
#undef sgi
#undef sparc
#undef sun
#undef sun2
#undef sun3
#undef sun4
#undef u370
#undef u3b
#undef u3b2
#undef u3b5
#undef unix
#undef vax
#endif
#endif
#endif
-390
View File
@@ -1,390 +0,0 @@
/*
-Header_File f2cMang.h ( f2c external symbol mangling )
-Abstract
Define macros that mangle the external symbols in the f2c F77 and I77
libraries.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Particulars
This header supports linking CSPICE into executables that
also link in objects compiled from Fortran, in particular
ones that perform Fortran I/O. To enable this odd mix,
one defines the preprocessor flag
MIX_C_AND_FORTRAN
This macro is undefined by default, since the action it invokes
is usually not desirable. When the flag is defined, this header
defines macros that mangle the f2c library external symbols:
the symbol
xxx
gets mapped to
xxx_f2c
This mangling prevents name collisions between the f2c
implementations of the F77 and I77 library routines and those
in the corresponding Fortran libraries on a host system.
The set of external symbols defined in the f2c libraries can
be determined by combining objects from both F77 and I77 into
a single Unix archive libarary, then running the Unix utility
nm on the that archive. If available, an nm option that selects
only external symbols should be invoked.
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
-Restrictions
1) It is recommended that use of the features implemented by this
header be avoided if at all possible. There are robustness and
portability problems associated with linking Fortran and C objects
together in one executable.
2) When f2c external symbol name mangling is invoked, objects
derived from C code translated from Fortran by f2c won't
link against CSPICE any longer, if these objects reference
the standard f2c external symbols.
3) The features implemented by this header have been tested only
under the Sun Solaris GCC, Sun Solaris native ANSI C, and
PC/Linux/gcc environments.
-Version
-CSPICE Version 2.0.1, 07-MAR-2009 (NJB)
Restrictions header section was updated to note successful
testing on the PC/Linux/gcc platform.
-CSPICE Version 2.0.0, 19-DEC-2001 (NJB)
*/
/*
Define masking macros for f2c external symbols.
*/
#ifdef MIX_C_AND_FORTRAN
/*
Define the macros only once, if they need to be defined.
*/
#ifndef F2C_MANGLING_DONE
#define F77_aloc F77_aloc_f2c
#define F_err F_err_f2c
#define L_len L_len_f2c
#define abort_ abort__f2c
#define b_char b_char_f2c
#define c_abs c_abs_f2c
#define c_cos c_cos_f2c
#define c_dfe c_dfe_f2c
#define c_div c_div_f2c
#define c_due c_due_f2c
#define c_exp c_exp_f2c
#define c_le c_le_f2c
#define c_log c_log_f2c
#define c_sfe c_sfe_f2c
#define c_si c_si_f2c
#define c_sin c_sin_f2c
#define c_sqrt c_sqrt_f2c
#define c_sue c_sue_f2c
#define d_abs d_abs_f2c
#define d_acos d_acos_f2c
#define d_asin d_asin_f2c
#define d_atan d_atan_f2c
#define d_atn2 d_atn2_f2c
#define d_cnjg d_cnjg_f2c
#define d_cos d_cos_f2c
#define d_cosh d_cosh_f2c
#define d_dim d_dim_f2c
#define d_exp d_exp_f2c
#define d_imag d_imag_f2c
#define d_int d_int_f2c
#define d_lg10 d_lg10_f2c
#define d_log d_log_f2c
#define d_mod d_mod_f2c
#define d_nint d_nint_f2c
#define d_prod d_prod_f2c
#define d_sign d_sign_f2c
#define d_sin d_sin_f2c
#define d_sinh d_sinh_f2c
#define d_sqrt d_sqrt_f2c
#define d_tan d_tan_f2c
#define d_tanh d_tanh_f2c
#define derf_ derf__f2c
#define derfc_ derfc__f2c
#define do_fio do_fio_f2c
#define do_lio do_lio_f2c
#define do_ud do_ud_f2c
#define do_uio do_uio_f2c
#define do_us do_us_f2c
#define dtime_ dtime__f2c
#define e_rdfe e_rdfe_f2c
#define e_rdue e_rdue_f2c
#define e_rsfe e_rsfe_f2c
#define e_rsfi e_rsfi_f2c
#define e_rsle e_rsle_f2c
#define e_rsli e_rsli_f2c
#define e_rsue e_rsue_f2c
#define e_wdfe e_wdfe_f2c
#define e_wdue e_wdue_f2c
#define e_wsfe e_wsfe_f2c
#define e_wsfi e_wsfi_f2c
#define e_wsle e_wsle_f2c
#define e_wsli e_wsli_f2c
#define e_wsue e_wsue_f2c
#define ef1asc_ ef1asc__f2c
#define ef1cmc_ ef1cmc__f2c
#define en_fio en_fio_f2c
#define erf_ erf__f2c
#define erfc_ erfc__f2c
#define err__fl err__fl_f2c
#define etime_ etime__f2c
#define exit_ exit__f2c
#define f__Aquote f__Aquote_f2c
#define f__buflen f__buflen_f2c
#define f__cabs f__cabs_f2c
#define f__canseek f__canseek_f2c
#define f__cblank f__cblank_f2c
#define f__cf f__cf_f2c
#define f__cnt f__cnt_f2c
#define f__cp f__cp_f2c
#define f__cplus f__cplus_f2c
#define f__cursor f__cursor_f2c
#define f__curunit f__curunit_f2c
#define f__doed f__doed_f2c
#define f__doend f__doend_f2c
#define f__doned f__doned_f2c
#define f__donewrec f__donewrec_f2c
#define f__dorevert f__dorevert_f2c
#define f__elist f__elist_f2c
#define f__external f__external_f2c
#define f__fatal f__fatal_f2c
#define f__fmtbuf f__fmtbuf_f2c
#define f__formatted f__formatted_f2c
#define f__getn f__getn_f2c
#define f__hiwater f__hiwater_f2c
#define f__icend f__icend_f2c
#define f__icnum f__icnum_f2c
#define f__icptr f__icptr_f2c
#define f__icvt f__icvt_f2c
#define f__init f__init_f2c
#define f__inode f__inode_f2c
#define f__lchar f__lchar_f2c
#define f__lcount f__lcount_f2c
#define f__lioproc f__lioproc_f2c
#define f__lquit f__lquit_f2c
#define f__ltab f__ltab_f2c
#define f__ltype f__ltype_f2c
#define f__lx f__lx_f2c
#define f__ly f__ly_f2c
#define f__nonl f__nonl_f2c
#define f__nowreading f__nowreading_f2c
#define f__nowwriting f__nowwriting_f2c
#define f__parenlvl f__parenlvl_f2c
#define f__pc f__pc_f2c
#define f__putbuf f__putbuf_f2c
#define f__putn f__putn_f2c
#define f__r_mode f__r_mode_f2c
#define f__reading f__reading_f2c
#define f__reclen f__reclen_f2c
#define f__recloc f__recloc_f2c
#define f__recpos f__recpos_f2c
#define f__ret f__ret_f2c
#define f__revloc f__revloc_f2c
#define f__rp f__rp_f2c
#define f__scale f__scale_f2c
#define f__sequential f__sequential_f2c
#define f__svic f__svic_f2c
#define f__typesize f__typesize_f2c
#define f__units f__units_f2c
#define f__w_mode f__w_mode_f2c
#define f__workdone f__workdone_f2c
#define f_back f_back_f2c
#define f_clos f_clos_f2c
#define f_end f_end_f2c
#define f_exit f_exit_f2c
#define f_init f_init_f2c
#define f_inqu f_inqu_f2c
#define f_open f_open_f2c
#define f_rew f_rew_f2c
#define fk_open fk_open_f2c
#define flush_ flush__f2c
#define fmt_bg fmt_bg_f2c
#define fseek_ fseek__f2c
#define ftell_ ftell__f2c
#define g_char g_char_f2c
#define getenv_ getenv__f2c
#define h_abs h_abs_f2c
#define h_dim h_dim_f2c
#define h_dnnt h_dnnt_f2c
#define h_indx h_indx_f2c
#define h_len h_len_f2c
#define h_mod h_mod_f2c
#define h_nint h_nint_f2c
#define h_sign h_sign_f2c
#define hl_ge hl_ge_f2c
#define hl_gt hl_gt_f2c
#define hl_le hl_le_f2c
#define hl_lt hl_lt_f2c
#define i_abs i_abs_f2c
#define i_dim i_dim_f2c
#define i_dnnt i_dnnt_f2c
#define i_indx i_indx_f2c
#define i_len i_len_f2c
#define i_mod i_mod_f2c
#define i_nint i_nint_f2c
#define i_sign i_sign_f2c
#define iw_rev iw_rev_f2c
#define l_eof l_eof_f2c
#define l_ge l_ge_f2c
#define l_getc l_getc_f2c
#define l_gt l_gt_f2c
#define l_le l_le_f2c
#define l_lt l_lt_f2c
#define l_read l_read_f2c
#define l_ungetc l_ungetc_f2c
#define l_write l_write_f2c
#define lbit_bits lbit_bits_f2c
#define lbit_cshift lbit_cshift_f2c
#define lbit_shift lbit_shift_f2c
#define mk_hashtab mk_hashtab_f2c
#define nml_read nml_read_f2c
#define pars_f pars_f_f2c
#define pow_ci pow_ci_f2c
#define pow_dd pow_dd_f2c
#define pow_di pow_di_f2c
#define pow_hh pow_hh_f2c
#define pow_ii pow_ii_f2c
#define pow_ri pow_ri_f2c
#define pow_zi pow_zi_f2c
#define pow_zz pow_zz_f2c
#define r_abs r_abs_f2c
#define r_acos r_acos_f2c
#define r_asin r_asin_f2c
#define r_atan r_atan_f2c
#define r_atn2 r_atn2_f2c
#define r_cnjg r_cnjg_f2c
#define r_cos r_cos_f2c
#define r_cosh r_cosh_f2c
#define r_dim r_dim_f2c
#define r_exp r_exp_f2c
#define r_imag r_imag_f2c
#define r_int r_int_f2c
#define r_lg10 r_lg10_f2c
#define r_log r_log_f2c
#define r_mod r_mod_f2c
#define r_nint r_nint_f2c
#define r_sign r_sign_f2c
#define r_sin r_sin_f2c
#define r_sinh r_sinh_f2c
#define r_sqrt r_sqrt_f2c
#define r_tan r_tan_f2c
#define r_tanh r_tanh_f2c
#define rd_ed rd_ed_f2c
#define rd_ned rd_ned_f2c
#define s_cat s_cat_f2c
#define s_cmp s_cmp_f2c
#define s_copy s_copy_f2c
#define s_paus s_paus_f2c
#define s_rdfe s_rdfe_f2c
#define s_rdue s_rdue_f2c
#define s_rnge s_rnge_f2c
#define s_rsfe s_rsfe_f2c
#define s_rsfi s_rsfi_f2c
#define s_rsle s_rsle_f2c
#define s_rsli s_rsli_f2c
#define s_rsne s_rsne_f2c
#define s_rsni s_rsni_f2c
#define s_rsue s_rsue_f2c
#define s_stop s_stop_f2c
#define s_wdfe s_wdfe_f2c
#define s_wdue s_wdue_f2c
#define s_wsfe s_wsfe_f2c
#define s_wsfi s_wsfi_f2c
#define s_wsle s_wsle_f2c
#define s_wsli s_wsli_f2c
#define s_wsne s_wsne_f2c
#define s_wsni s_wsni_f2c
#define s_wsue s_wsue_f2c
#define sig_die sig_die_f2c
#define signal_ signal__f2c
#define system_ system__f2c
#define t_getc t_getc_f2c
#define t_runc t_runc_f2c
#define w_ed w_ed_f2c
#define w_ned w_ned_f2c
#define wrt_E wrt_E_f2c
#define wrt_F wrt_F_f2c
#define wrt_L wrt_L_f2c
#define x_endp x_endp_f2c
#define x_getc x_getc_f2c
#define x_putc x_putc_f2c
#define x_rev x_rev_f2c
#define x_rsne x_rsne_f2c
#define x_wSL x_wSL_f2c
#define x_wsne x_wsne_f2c
#define xrd_SL xrd_SL_f2c
#define y_getc y_getc_f2c
#define y_rsk y_rsk_f2c
#define z_abs z_abs_f2c
#define z_cos z_cos_f2c
#define z_div z_div_f2c
#define z_exp z_exp_f2c
#define z_getc z_getc_f2c
#define z_log z_log_f2c
#define z_putc z_putc_f2c
#define z_rnew z_rnew_f2c
#define z_sin z_sin_f2c
#define z_sqrt z_sqrt_f2c
#define z_wnew z_wnew_f2c
#define F2C_MANGLING_DONE
#endif
#endif
-368
View File
@@ -1,368 +0,0 @@
/* ls.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* Table of constant values */
static integer c__10 = 10;
/* $Procedure LS ( Return L_s, planetocentric longitude of the sun ) */
doublereal ls_(integer *body, doublereal *et, char *corr, ftnlen corr_len)
{
/* System generated locals */
integer i__1, i__2;
doublereal ret_val;
/* Builtin functions */
integer s_rnge(char *, integer, char *, integer);
/* Local variables */
doublereal tipm[9] /* was [3][3] */;
extern /* Subroutine */ int vequ_(doublereal *, doublereal *);
integer i__;
doublereal x[3], y[3], z__[3];
extern /* Subroutine */ int chkin_(char *, ftnlen);
doublereal uavel[3], npole[3], state[6], trans[9] /* was [3][3] */;
extern /* Subroutine */ int spkez_(integer *, doublereal *, char *, char *
, integer *, doublereal *, doublereal *, ftnlen, ftnlen), ucrss_(
doublereal *, doublereal *, doublereal *);
doublereal lt;
extern /* Subroutine */ int reclat_(doublereal *, doublereal *,
doublereal *, doublereal *), tipbod_(char *, integer *,
doublereal *, doublereal *, ftnlen);
doublereal radius;
extern /* Subroutine */ int chkout_(char *, ftnlen);
extern logical return_(void);
doublereal lat, pos[3];
extern /* Subroutine */ int mxv_(doublereal *, doublereal *, doublereal *)
;
/* $ Abstract */
/* Compute L_s, the planetocentric longitude of the sun, as seen */
/* from a specified body. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Required_Reading */
/* None. */
/* $ Keywords */
/* GEOMETRY */
/* $ Declarations */
/* $ Brief_I/O */
/* Variable I/O Description */
/* -------- --- -------------------------------------------------- */
/* BODY I NAIF integer code of central body. */
/* ET I Epoch in ephemeris seconds past J2000. */
/* CORR I Aberration correction. */
/* The function returns the value of L_s for the specified body */
/* at the specified time. */
/* $ Detailed_Input */
/* BODY is the NAIF integer code of the central body, */
/* typically a planet. */
/* ET is the epoch in ephemeris seconds past J2000 at which */
/* the longitude of the sun (L_s) is to be computed. */
/* CORR indicates the aberration corrections to be applied */
/* when computing the longitude of the sun. CORR */
/* may be any of the following. */
/* 'NONE' Apply no correction. */
/* 'LT' Correct the position of the sun, */
/* relative to the central body, for */
/* planetary (light time) aberration. */
/* 'LT+S' Correct the position of the sun, */
/* relative to the central body, for */
/* planetary and stellar aberrations. */
/* $ Detailed_Output */
/* The function returns the value of L_s for the specified body */
/* at the specified time. This is the longitude of the Sun, */
/* relative to the central body, in a right-handed frame whose */
/* basis vectors are defined as follows: */
/* - The positive Z direction is given by the instantaneous */
/* angular velocity vector of the orbit of the body about */
/* the sun. */
/* - The positive X direction is that of the cross product of the */
/* instantaneous north spin axis of the body with the positive */
/* Z direction. */
/* - The positive Y direction is Z x X. */
/* Units are radians; the range is -pi to pi. Longitudes are */
/* positive east. */
/* $ Parameters */
/* None. */
/* $ Exceptions */
/* 1) If no SPK (ephemeris) file has been loaded prior to calling */
/* this routine, or if the SPK data has insufficient coverage, an */
/* error will be diagnosed and signaled by a routine in the call */
/* tree of this routine. */
/* 2) If a PCK file containing rotational elements for the central */
/* body has not been loaded prior to calling this routine, an */
/* error will be diagnosed and signaled by a routine called by a */
/* routine in the call tree of this routine. */
/* 3) If the instantaneous angular velocity and spin axis of BODY */
/* are parallel, the return value is unspecified. */
/* $ Files */
/* 1) An SPK file (or file) containing ephemeris data sufficient to */
/* compute the geometric state of the central body relative to */
/* the sun at ET must be loaded before this routine is called. If */
/* light time correction is used, data must be available that */
/* enable computation of the state the sun relative to the solar */
/* system barycenter at the light-time corrected epoch. If */
/* stellar aberration correction is used, data must be available */
/* that enable computation of the state the central body relative */
/* to the solar system barycenter at ET. */
/* 2) A PCK file containing rotational elements for the central body */
/* must be loaded before this routine is called. */
/* $ Particulars */
/* The direction of the vernal equinox for the central body is */
/* determined from the instantaneous equatorial and orbital planes */
/* of the central body. This equinox definition is specified in */
/* reference [1]. The "instantaneous orbital plane" is interpreted */
/* in this routine as the plane normal to the cross product of the */
/* position and velocity of the central body relative to the sun. */
/* A geometric state is used for this normal vector computation. */
/* The "instantaneous equatorial plane" is that normal to the */
/* central body's north pole at the requested epoch. The pole */
/* direction is determined from rotational elements loaded via */
/* a PCK file. */
/* The result returned by this routine will depend on the */
/* ephemeris data and rotational elements used. The result may */
/* differ from that given in any particular version of the */
/* Astronomical Almanac, due to differences in these input data, */
/* and due to differences in precision of the computations. */
/* $ Examples */
/* 1) A simple program that computes L_s for Mars. The geometric */
/* state of the sun is used. */
/* PROGRAM MARS_LS */
/* IMPLICIT NONE */
/* DOUBLE PRECISION DPR */
/* INTEGER FILSIZ */
/* PARAMETER ( FILSIZ = 255 ) */
/* CHARACTER*(FILSIZ) PCK */
/* CHARACTER*(FILSIZ) SPK */
/* CHARACTER*(FILSIZ) LEAP */
/* CHARACTER*(30) UTC */
/* CHARACTER*(15) CORR */
/* DOUBLE PRECISION ET */
/* DOUBLE PRECISION LONG */
/* DOUBLE PRECISION LS */
/* INTEGER BODY */
/* INTEGER HANDLE */
/* DATA BODY / 499 / */
/* DATA CORR / 'NONE' / */
/* CALL PROMPT ( 'Enter name of leapseconds kernel > ', LEAP ) */
/* CALL PROMPT ( 'Enter name of PCK file > ', PCK ) */
/* CALL PROMPT ( 'Enter name of SPK file > ', SPK ) */
/* CALL FURNSH ( LEAP ) */
/* CALL FURNSH ( PCK ) */
/* CALL FURNSH ( SPK ) */
/* WRITE (*,*) ' ' */
/* WRITE (*,*) 'Kernels have been loaded.' */
/* WRITE (*,*) ' ' */
/* DO WHILE ( .TRUE. ) */
/* CALL PROMPT ( 'Enter UTC time > ', UTC ) */
/* CALL UTC2ET ( UTC, ET ) */
/* C */
/* C Convert longitude to degrees and move it into the range */
/* C [0, 360). */
/* C */
/* LONG = DPR() * LS ( BODY, ET, CORR ) */
/* IF ( LONG .LT. 0.D0 ) THEN */
/* LONG = LONG + 360.D0 */
/* END IF */
/* WRITE (*,*) ' ' */
/* WRITE (*,*) 'Mars L_s (deg.) = ', LONG */
/* WRITE (*,*) ' ' */
/* END DO */
/* END */
/* $ Restrictions */
/* None. */
/* $ Literature_References */
/* [1] "The Astronomical Almanac for the Year 2005." U.S. Government */
/* Printing Office, Washington, D.C., 1984, page L9. */
/* $ Author_and_Institution */
/* N.J. Bachman (JPL) */
/* $ Version */
/* - Chronos Version 1.1.2, 02-OCT-2006 (BVS) */
/* Replaced LDPOOL and SPKELF with FURNSH in the Examples */
/* section. */
/* - Chronos Version 1.1.1, 07-JAN-2005 (NJB) */
/* Description of reference frame in Detailed_Output header */
/* section was corrected. Miscellaneous other header updates */
/* were made. */
/* - Beta Version 1.1.0, 14-DEC-1996 (NJB) */
/* -& */
/* SPICELIB functions */
/* Local parameters */
/* Local variables */
/* Standard SPICE error handling. */
if (return_()) {
ret_val = 0.;
return ret_val;
} else {
chkin_("LS", (ftnlen)2);
}
/* Look up the direction of the North pole of the central body. */
tipbod_("J2000", body, et, tipm, (ftnlen)5);
for (i__ = 1; i__ <= 3; ++i__) {
npole[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : s_rnge("npole", i__1,
"ls_", (ftnlen)302)] = tipm[(i__2 = i__ * 3 - 1) < 9 && 0 <=
i__2 ? i__2 : s_rnge("tipm", i__2, "ls_", (ftnlen)302)];
}
/* Get the geometric state of the body relative to the sun. */
spkez_(body, et, "J2000", "NONE", &c__10, state, &lt, (ftnlen)5, (ftnlen)
4);
/* Get the unit direction vector parallel to the angular velocity */
/* vector of the orbit. This is just the unitized cross product of */
/* position and velocity. */
ucrss_(state, &state[3], uavel);
/* We want to form a transformation matrix that maps vectors from */
/* basis REF to the following frame: */
/* Z = UAVEL */
/* X = NPOLE x UAVEL */
/* Y = Z x X */
/* We'll find the position of the Sun relative to this frame. In */
/* our computations, we want our basis vectors to have unit length. */
vequ_(uavel, z__);
ucrss_(npole, z__, x);
ucrss_(z__, x, y);
for (i__ = 1; i__ <= 3; ++i__) {
trans[(i__1 = i__ * 3 - 3) < 9 && 0 <= i__1 ? i__1 : s_rnge("trans",
i__1, "ls_", (ftnlen)335)] = x[(i__2 = i__ - 1) < 3 && 0 <=
i__2 ? i__2 : s_rnge("x", i__2, "ls_", (ftnlen)335)];
trans[(i__1 = i__ * 3 - 2) < 9 && 0 <= i__1 ? i__1 : s_rnge("trans",
i__1, "ls_", (ftnlen)336)] = y[(i__2 = i__ - 1) < 3 && 0 <=
i__2 ? i__2 : s_rnge("y", i__2, "ls_", (ftnlen)336)];
trans[(i__1 = i__ * 3 - 1) < 9 && 0 <= i__1 ? i__1 : s_rnge("trans",
i__1, "ls_", (ftnlen)337)] = z__[(i__2 = i__ - 1) < 3 && 0 <=
i__2 ? i__2 : s_rnge("z", i__2, "ls_", (ftnlen)337)];
}
/* Get the state of the sun in frame REF. Since we may be using */
/* aberration corrections, this is not necessarily the negative of */
/* the state we've just found. */
spkez_(&c__10, et, "J2000", corr, body, state, &lt, (ftnlen)5, corr_len);
/* Now transform the position of the Sun into the "equator and */
/* equinox" frame. */
mxv_(trans, state, pos);
/* Let RECLAT find the longitude LS for us. */
reclat_(pos, &radius, &ret_val, &lat);
chkout_("LS", (ftnlen)2);
return ret_val;
} /* ls_ */
-340
View File
@@ -1,340 +0,0 @@
/* lstmid.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* Table of constant values */
static integer c__100 = 100;
/* $Procedure LSTMID ( Find ET corresponding to LST ) */
/* Subroutine */ int lstmid_(doublereal *inpet, integer *bodyid, doublereal *
lon, doublereal *scrate, char *mntype, integer *secoff, doublereal *
mnet, ftnlen mntype_len)
{
/* Builtin functions */
integer s_cmp(char *, char *, ftnlen, ftnlen);
/* Local variables */
char ampm[6], time[24];
integer i__;
extern /* Subroutine */ int chkin_(char *, ftnlen), errch_(char *, char *,
ftnlen, ftnlen);
integer lsecs;
extern /* Subroutine */ int et2lst_(doublereal *, integer *, doublereal *,
char *, integer *, integer *, integer *, char *, char *, ftnlen,
ftnlen, ftnlen);
integer sc;
doublereal et;
integer hr, mn, daysec;
extern /* Subroutine */ int sigerr_(char *, ftnlen), chkout_(char *,
ftnlen);
integer intspd;
extern /* Subroutine */ int setmsg_(char *, ftnlen), errint_(char *,
integer *, ftnlen);
extern logical return_(void);
extern doublereal spd_(void);
/* $ Abstract */
/* This routine finds ET corresponding the local solar time, */
/* specified as an integer number of seconds past midnight of */
/* current local solar day, that is nearest, previous, or next to a */
/* given ET. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Required_Reading */
/* None. */
/* $ Keywords */
/* None. */
/* $ Declarations */
/* $ Brief_I/O */
/* VARIABLE I/O DESCRIPTION */
/* -------- --- -------------------------------------------------- */
/* INPET I Input ET. */
/* BODYID I NAIF ID of the body. */
/* LON I Planetocentric longitude on the body. */
/* SCRATE I Number of ET seconds in one local second. */
/* MNTYPE I Time to look for: nearest, previous or next. */
/* SECOFF I Offset from previous midnight in local seconds. */
/* MNET O Output ET corresponding to the local time. */
/* $ Detailed_Input */
/* ET Input ephemeris time. */
/* BODYID NAIF ID of the body of interest. */
/* LON Planetocentric longitude on the body of interest. */
/* SCRATE Local time rate, i.e. number of ET seconds */
/* in one local second. */
/* MNTYPE Time to look for -- 'NEAREST', */
/* 'PREVIOUS' or 'NEXT'. */
/* SECOFF Offset from previous midnight in local seconds. */
/* Must be between 0 and SPD(). */
/* $ Detailed_Output */
/* MNET Ephemeris time of the nearest, previous or next */
/* given local time to a given input ET time. */
/* $ Parameters */
/* MAXITR Maximum number of iteration allowed in the loop. */
/* Currently set to 100. Usually there is no more */
/* than 3-5 iterations are need to get to the */
/* midnight time. */
/* $ Files */
/* None. */
/* $ Exceptions */
/* 1) If number of iteration exceeds MAXITR, routine reports */
/* SPICE(TOOMANYITERATIONS) error. */
/* 2) If value of MNTYPE is not one of the 'NEAREST', 'PREVIOUS' */
/* or 'NEXT', routine reports SPICE(BADMIDNIGHTTYPE) error. */
/* 3) If value of SECOFF is not between 0 and 86000, */
/* routine reports SPICE(BADTIMEOFFSET) error. */
/* $ Particulars */
/* This routine is required to implement local solar days (SOLs) */
/* counting for the local solar time (LST). It's essential that */
/* caller provides correct SCRATE for a body. Also the routine */
/* assumes that there is enough SPICE kernel data loaded into */
/* the program to compute LST within +/- two local solar days */
/* of an input ET. */
/* $ Examples */
/* Let our inputs be: */
/* ETSTR = '1997 AUG 12 12:00:12 TDB' */
/* BODYID = 499 */
/* LON = - 33.1D0 */
/* SCRATE = 1.0277116753731D0 */
/* CALL STR2ET( ETSTR, ET ) */
/* LON = LON * RPD() */
/* then to compute nearest local midnight LSTMID must be called */
/* follows: */
/* CALL LSTMID( ET, BODYID, LON, SCRATE, 'NEAREST', 0, MNET ) */
/* to compute previous local noon: */
/* CALL LSTMID( ET, BODYID, LON, SCRATE, 'PREVIOUS', */
/* . INT( SPD()) / 2, MNET ) */
/* to compute next local 6:00 a.m.: */
/* CALL LSTMID( ET, BODYID, LON, SCRATE, 'NEXT', */
/* . INT( SPD()) / 4, MNET ) */
/* $ Restrictions */
/* Sufficient SPICE kernel data loaded into the calling program to */
/* compute LST within +/- two local solar days of an input ET. */
/* $ Author_and_Institution */
/* B.V.Semenov (JPL) */
/* $ Literature_References */
/* None. */
/* $ Version */
/* - CHRONOS Version 1.2.0, May 10, 2006 (BVS) */
/* Bug fix: changed logic computing iteration loop convergence */
/* parameter to ensure that the loop terminates successfully for */
/* input local times at the end of the local day (23:59:xx). */
/* Fixed/improved header sections and in-line comments in a few */
/* places. */
/* - CHRONOS Version 1.1.0, October 16, 2002 (BVS) */
/* Bug fix: the search loop now forces termination is the */
/* the delta value at MAXITR is 1 or -1. This has to be done */
/* because of the integer output from ET2LST. */
/* - CHRONOS Version 1.0.0, May 14, 1998 (BVS) */
/* -& */
/* Local parameters. */
/* Local variables. */
/* SPICELIB functions. */
/* Standard SPICE error handling. */
if (return_()) {
return 0;
} else {
chkin_("LSTMID", (ftnlen)6);
}
et = *inpet;
intspd = (integer) spd_();
/* Check if input offset within the right bounds. */
if (*secoff < 0 || *secoff > intspd) {
setmsg_("Input offset expressed as count of local seconds must be be"
"tween 0 and 86400.", (ftnlen)77);
sigerr_("SPICE(BADTIMEOFFSET)", (ftnlen)20);
}
/* Set initial ET for our iterations depending on whether we need */
/* compute ET for nearest, previous, or next given LST. */
if (s_cmp(mntype, "NEAREST", mntype_len, (ftnlen)7) == 0) {
/* Leave initial ET unchanged and assign non-zero LSECS just to */
/* start iterations loop. */
lsecs = 1;
} else if (s_cmp(mntype, "PREVIOUS", mntype_len, (ftnlen)8) == 0) {
/* Adjust current ET by the number of ET second between current */
/* local time and previous desired local time. */
et2lst_(&et, bodyid, lon, "PLANETOCENTRIC", &hr, &mn, &sc, time, ampm,
(ftnlen)14, (ftnlen)24, (ftnlen)6);
lsecs = hr * 3600 + mn * 60 + sc - *secoff;
if (lsecs < 0) {
lsecs = intspd + lsecs;
}
et -= *scrate * lsecs;
} else if (s_cmp(mntype, "NEXT", mntype_len, (ftnlen)4) == 0) {
/* Adjust current ET by the number of ET second between current */
/* local time and following desired local time. */
et2lst_(&et, bodyid, lon, "PLANETOCENTRIC", &hr, &mn, &sc, time, ampm,
(ftnlen)14, (ftnlen)24, (ftnlen)6);
lsecs = intspd - (hr * 3600 + mn * 60 + sc - *secoff);
if (lsecs >= intspd) {
lsecs -= intspd;
}
et += *scrate * lsecs;
} else {
/* Unrecognizable MNTYPE. Complain and exit. */
setmsg_("Cannot recognize specification of the kind of local midnigh"
"t to compute '#'. Recognizable values are 'NEAREST', 'PREVIO"
"US' and 'NEXT'.", (ftnlen)134);
errch_("#", mntype, (ftnlen)1, mntype_len);
sigerr_("SPICE(BADMIDNIGHTTYPE)", (ftnlen)22);
}
/* We stop iterations when LSECS is exactly 0. We can do it because */
/* ET2LST returns integer number of local hours, minutes and seconds */
/* :). Before iterating we set counter to 0. */
i__ = 0;
while(lsecs != 0) {
/* Get local time at current ET. */
et2lst_(&et, bodyid, lon, "PLANETOCENTRIC", &hr, &mn, &sc, time, ampm,
(ftnlen)14, (ftnlen)24, (ftnlen)6);
/* Compute the number of local seconds since last midnight. */
daysec = hr * 3600 + mn * 60 + sc;
/* Calculate the difference (in local seconds) between local */
/* seconds since midnight given on the input and computed during */
/* this iteration. Adjust it by the number of seconds in the day */
/* if it happens to be greater than a half a day to make sure */
/* that the loop does not "run away" into previous or next day. */
if (daysec - *secoff > intspd / 2) {
lsecs = daysec - intspd - *secoff;
} else if (*secoff - daysec > intspd / 2) {
lsecs = daysec + intspd - *secoff;
} else {
lsecs = hr * 3600 + mn * 60 + sc - *secoff;
}
/* Adjust current ET for the next iteration. */
et -= lsecs * *scrate;
/* Increase iterations counter and bail out if it's over the */
/* limit. */
++i__;
if (i__ > 100) {
/* Check if the last difference value is 1 or -1 local second. */
/* If so, force the loop termination because it has probably */
/* been this way for many iteration already. Otherwise */
/* complain and exit. */
if (lsecs == 1 || lsecs == -1) {
lsecs = 0;
} else {
setmsg_("More than # iterations in the loop determining loca"
"l solar time midnight ET.", (ftnlen)76);
errint_("#", &c__100, (ftnlen)1);
sigerr_("SPICE(TOOMANYITERATIONS)", (ftnlen)24);
}
}
}
/* Assign output value and return. */
*mnet = et;
chkout_("LSTMID", (ftnlen)6);
return 0;
} /* lstmid_ */
File diff suppressed because it is too large Load Diff
-232
View File
@@ -1,232 +0,0 @@
/*
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
*/
/* STARTUP PROCEDURE FOR UNIX FORTRAN PROGRAMS */
/*
This is the main.c file from the f2c libF77 set of source files,
modified for use within CSPICE. The changes made were:
- The file SpiceUsr.h is included.
- A call to putcml_c is made to store the command line arguments
and make them accessible via getcml_ or getcml_c.
This file is intended to be used as the main function for all
programs in the CSPICE Toolkit.
-Version
-CSPICE Version 2.0.0, 19-DEC-2001 (NJB)
Updated to support linking CSPICE into executables that
also link in objects compiled from Fortran, in particular
ones that perform Fortran I/O. To enable this odd mix,
one defines the preprocessor flag
MIX_C_AND_FORTRAN
This macro is undefined by default, since the action it invokes
is usually not desirable. See the header
f2cMang.h
for further information.
-CSPICE Version 1.1.0 29-FEB-2000 (NJB)
Updated to use the main.c source code from a newer version of
f2c, dated 1998-09-13.
-CSPICE Version 1.0.0 28-OCT-1998 (NJB)
*/
/*
Optionally include name-mangling macros for f2c external symbols.
*/
#ifdef MIX_C_AND_FORTRAN
#include "f2cMang.h"
#endif
/*
This header file is included for use within CSPICE.
*/
#include "SpiceUsr.h"
#include "stdio.h"
#include "signal1.h"
#ifndef SIGIOT
#ifdef SIGABRT
#define SIGIOT SIGABRT
#endif
#endif
#ifndef KR_headers
#undef VOID
#include "stdlib.h"
#endif
#ifndef VOID
#define VOID void
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifdef NO__STDC
#define ONEXIT onexit
extern VOID f_exit();
#else
#ifndef KR_headers
extern void f_exit(void);
#ifndef NO_ONEXIT
#define ONEXIT atexit
extern int atexit(void (*)(void));
#endif
#else
#ifndef NO_ONEXIT
#define ONEXIT onexit
extern VOID f_exit();
#endif
#endif
#endif
#ifdef KR_headers
extern VOID f_init(), sig_die();
extern int MAIN__();
#define Int /* int */
#else
extern void f_init(void), sig_die(char*, int);
extern int MAIN__(void);
#define Int int
#endif
static VOID sigfdie(Sigarg)
{
Use_Sigarg;
sig_die("Floating Exception", 1);
}
static VOID sigidie(Sigarg)
{
Use_Sigarg;
sig_die("IOT Trap", 1);
}
#ifdef SIGQUIT
static VOID sigqdie(Sigarg)
{
Use_Sigarg;
sig_die("Quit signal", 1);
}
#endif
static VOID sigindie(Sigarg)
{
Use_Sigarg;
sig_die("Interrupt", 0);
}
static VOID sigtdie(Sigarg)
{
Use_Sigarg;
sig_die("Killed", 0);
}
#ifdef SIGTRAP
static VOID sigtrdie(Sigarg)
{
Use_Sigarg;
sig_die("Trace trap", 1);
}
#endif
int xargc;
char **xargv;
#ifdef __cplusplus
}
#endif
#ifdef KR_headers
main(argc, argv) int argc; char **argv;
#else
main(int argc, char **argv)
#endif
{
/*
This call was added for use within CSPICE. It did not appear in the
original main.c function.
*/
putcml_c ( argc, argv );
xargc = argc;
xargv = argv;
signal1(SIGFPE, sigfdie); /* ignore underflow, enable overflow */
#ifdef SIGIOT
signal1(SIGIOT, sigidie);
#endif
#ifdef SIGTRAP
signal1(SIGTRAP, sigtrdie);
#endif
#ifdef SIGQUIT
if(signal1(SIGQUIT,sigqdie) == SIG_IGN)
signal1(SIGQUIT, SIG_IGN);
#endif
if(signal1(SIGINT, sigindie) == SIG_IGN)
signal1(SIGINT, SIG_IGN);
signal1(SIGTERM,sigtdie);
#ifdef pdp11
ldfps(01200); /* detect overflow as an exception */
#endif
f_init();
#ifndef NO_ONEXIT
ONEXIT(f_exit);
#endif
MAIN__();
#ifdef NO_ONEXIT
f_exit();
#endif
exit(0); /* exit(0) rather than return(0) to bypass Cray bug */
return 0; /* For compilers that complain of missing return values; */
/* others will complain that this is unreachable code. */
}
-40
View File
@@ -1,40 +0,0 @@
rem
rem mkchrnos.bat
rem
rem Creates chronos.exe for MS Visual C++ and moves it to the
rem appropriate Toolkit directory.
rem
rem
rem Version 1.1.0 19-OCT-2003 (BVS)
rem
rem added -DNON_ANSI_STDIO compile option.
rem
rem Version 1.0.0 06-SEP-1999 (NJB)
rem
rem Adapted from mkinspkt.bat.
rem
rem
set cl= /c /O2 -D_COMPLEX_DEFINED -DMSDOS -DNON_ANSI_STDIO
copy chronos.pgm main.c
for %%f in (*.c) do cl %%f
dir /b *.obj > temp.lst
link -lib /out:chronos.lib @temp.lst
copy main.x chronos.c
cl chronos.c
link /STACK:16000000 chronos.obj chronos.lib ..\..\lib\csupport.lib ..\..\lib\cspice.lib
move chronos.exe ..\..\exe
del *.obj
del chronos.lib
del temp.lst
-118
View File
@@ -1,118 +0,0 @@
/*
-Header_File signal1.h (CSPICE version of the f2c signal1.h header file)
-Abstract
Define macros associated with signal handling, customized for the
host environment.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Particulars
This header defines the macro signal1 referenced in main.c,
which is a generic main routine used in CSPICE executables that
link to code generated by f2c.
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
-Restrictions
1) This header file must be updated whenever the f2c processor
or the f2c libraries libI77 and libF77 are updated.
2) This header may need to be updated to support new platforms.
The supported platforms at the time of the 03-FEB-2000 release
are:
ALPHA-DIGITAL-UNIX_C
HP_C
NEXT_C
PC-LINUX_C
PC-MS_C
SGI-IRIX-N32_C
SGI-IRIX-NO2_C
SUN-SOLARIS-GCC_C
SUN-SOLARIS-NATIVE_C
-Version
-CSPICE Version 1.0.0, 03-FEB-2000 (NJB)
*/
/* You may need to adjust the definition of signal1 to supply a */
/* cast to the correct argument type. This detail is system- and */
/* compiler-dependent. The #define below assumes signal.h declares */
/* type SIG_PF for the signal function's second argument. */
#include <signal.h>
#ifndef Sigret_t
#define Sigret_t void
#endif
#ifndef Sigarg_t
#ifdef KR_headers
#define Sigarg_t
#else
#ifdef __cplusplus
#define Sigarg_t ...
#else
#define Sigarg_t int
#endif
#endif
#endif /*Sigarg_t*/
#ifdef USE_SIG_PF /* compile with -DUSE_SIG_PF under IRIX */
#define sig_pf SIG_PF
#else
typedef Sigret_t (*sig_pf)(Sigarg_t);
#endif
#define signal1(a,b) signal(a,(sig_pf)b)
#ifdef __cplusplus
#define Sigarg ...
#define Use_Sigarg
#else
#define Sigarg Int n
#define Use_Sigarg n = n /* shut up compiler warning */
#endif
-282
View File
@@ -1,282 +0,0 @@
/* speakr.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* $Procedure SPEAKR ( Displays CHRONOS trace information ) */
/* Subroutine */ int speakr_0_(int n__, char *line, ftnlen line_len)
{
/* Initialized data */
static logical enabld = FALSE_;
/* Builtin functions */
/* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
/* Local variables */
extern /* Subroutine */ int chkin_(char *, ftnlen), chkout_(char *,
ftnlen), tostdo_(char *, ftnlen);
extern logical return_(void);
/* $ Abstract */
/* This is an umbrella with three entry points. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Required_Reading */
/* None. */
/* $ Keywords */
/* None. */
/* $ Declarations */
/* $ Brief_I/O */
/* VARIABLE I/O DESCRIPTION */
/* -------- --- -------------------------------------------------- */
/* LINE I Line to write to output. (Entry SPEAK) */
/* LINE O Line indicating speaker state (Entry SPEKST) */
/* $ Detailed_Input */
/* LINE Line to display. */
/* $ Detailed_Output */
/* LINE Line indicating SPEAKER state: 'ON' or 'OFF'. */
/* $ Particulars */
/* Entry points: */
/* SPEKON Turn the speaker ON. */
/* SPEKON Return speaker state ('ON' or 'OFF'). */
/* SPEAK Write input line to STDOUT. */
/* $ Author_and_Institution */
/* B.V.Semenov (JPL) */
/* $ Literature_References */
/* None. */
/* $ Version */
/* - CHRONOS Version 2.0.0, 13-DEC-2001 (BVS) */
/* Added SPEKST entry. */
/* - CHRONOS Version 1.0.0, 13-MAY-1998 (BVS) */
/* -& */
/* SPICELIB functions. */
switch(n__) {
case 1: goto L_spekon;
case 2: goto L_spekst;
case 3: goto L_speak;
}
return 0;
/* $Procedure SPEKON (Turn the speaker ON) */
L_spekon:
/* $ Abstract */
/* Turn the speaker ON. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Author_and_Institution */
/* B.V. Semenov (JPL) */
/* $ Version */
/* - CHRONOS Version 1.0.0, May 14, 1998 (BVS) */
/* -& */
enabld = TRUE_;
return 0;
/* $Procedure SPEKST ( Return speaker state ) */
L_spekst:
/* $ Abstract */
/* Return the speaker state ('ON' or 'OFF'). */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Author_and_Institution */
/* B.V. Semenov (JPL) */
/* $ Version */
/* - CHRONOS Version 1.0.0, 13-DEC-2001 (BVS) */
/* -& */
if (enabld) {
s_copy(line, "ON", line_len, (ftnlen)2);
} else {
s_copy(line, "OFF", line_len, (ftnlen)3);
}
return 0;
/* $Procedure SPEAK (Speaks :) */
L_speak:
/* $ Abstract */
/* Write line to STDOUT if speaker is ON. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Author_and_Institution */
/* B.V. Semenov (JPL) */
/* $ Version */
/* - CHRONOS Version 1.0.0, May 14, 1998 (BVS) */
/* -& */
/* Standard SPICE error handling. */
if (return_()) {
return 0;
} else {
chkin_("SPEAK", (ftnlen)5);
}
/* Write the line if enabled. */
if (enabld) {
tostdo_(line, line_len);
}
chkout_("SPEAK", (ftnlen)5);
return 0;
} /* speakr_ */
/* Subroutine */ int speakr_(char *line, ftnlen line_len)
{
return speakr_0_(0, line, line_len);
}
/* Subroutine */ int spekon_(void)
{
return speakr_0_(1, (char *)0, (ftnint)0);
}
/* Subroutine */ int spekst_(char *line, ftnlen line_len)
{
return speakr_0_(2, line, line_len);
}
/* Subroutine */ int speak_(char *line, ftnlen line_len)
{
return speakr_0_(3, line, line_len);
}
-125
View File
@@ -1,125 +0,0 @@
/*
-Abstract
The memory allocation prototypes and macros for use in CSPICE.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Particulars
The routines maintain a count of the number of mallocs vs. free,
signalling an error if any unreleased memory exists at the end
of an Icy interface call.
The macro ALLOC_CHECK performs malloc/free test. If used, the macro
should exists at the end of any routine using these memory management
routines.
Prototypes in this file:
alloc_count
zzalloc_count
alloc_SpiceMemory
alloc_SpiceString_C_array
alloc_SpiceString_C_Copy_array
alloc_SpiceDouble_C_array
alloc_SpiceInt_C_array
alloc_SpiceString
alloc_SpiceString_Pointer_array
free_SpiceString_C_array
free_SpiceMemory
-Version
CSPICE 1.0.3 02-MAY-2008 (EDW)
Added alloc_count prototype.
CSPICE 1.0.2 10-MAY-2007 (EDW)
Minor edits to clarify 'size' in alloc_SpiceMemory as
size_t.
CSPICE 1.0.1 23-JUN-2005 (EDW)
Add prototype for alloc_SpiceString_Pointer_array, allocate
an array of pointers to SpiceChar.
Icy 1.0.0 December 19, 2003 (EDW)
Initial release.
*/
#ifndef ZZALLOC_H
#define ZZALLOC_H
/*
Allocation call prototypes:
*/
int alloc_count ();
SpiceChar ** alloc_SpiceString_C_array ( int string_length,
int string_count );
SpiceChar ** alloc_SpiceString_C_Copy_array ( int array_len ,
int string_len,
SpiceChar ** array );
SpiceDouble * alloc_SpiceDouble_C_array ( int rows,
int cols );
SpiceInt * alloc_SpiceInt_C_array ( int rows,
int cols );
SpiceChar * alloc_SpiceString ( int length );
SpiceChar ** alloc_SpiceString_Pointer_array( int array_len );
void free_SpiceString_C_array ( int dim,
SpiceChar ** array );
void * alloc_SpiceMemory ( size_t size );
void free_SpiceMemory ( void * ptr );
/*
Simple macro to ensure a zero value alloc count at end of routine.
Note, the need to use this macro exists only in those routines
allocating/deallocating memory.
*/
#define ALLOC_CHECK if ( alloc_count() != 0 ) \
{ \
setmsg_c ( "Malloc/Free count not zero at end of routine." \
" Malloc count = #."); \
errint_c ( "#", alloc_count() ); \
sigerr_c ( "SPICE(MALLOCCOUNT)" ); \
}
#endif
-86
View File
@@ -1,86 +0,0 @@
/*
-Abstract
The error control routine prototypes for use in CSPICE.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Particulars
Routines prototyped in this file:
zzerrorinit
zzerror
-Examples
See the examples section in zzerror() and zzerrorinit().
-Restrictions
None.
-Exceptions
None.
-Files
None.
-Author_and_Institution
E. D. Wright (JPL)
-Literature_References
None.
-Version
-CSPICE 1.1.0 14-JAN-2013 (EDW)
Added parameter:
SCALAR_OP
-CSPICE 1.0.0 17-OCT-2005 (EDW)
Initial release.
*/
#ifndef ZZERROR_H
#define ZZERROR_H
const char * zzerror( long cnt );
void zzerrorinit();
#define SCALAR_OP -1
#endif
-155
View File
@@ -1,155 +0,0 @@
/*
-Header_File SpiceCK.h ( CSPICE CK definitions )
-Abstract
Perform CSPICE definitions to support CK wrapper interfaces.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Particulars
This header defines types that may be referenced in
application code that calls CSPICE CK functions.
Typedef
=======
Name Description
---- ----------
SpiceCK05Subtype Typedef for enum indicating the
mathematical representation used
in an CK type 05 segment. Possible
values and meanings are:
C05TP0:
Hermite interpolation, 8-
element packets containing
q0, q1, q2, q3,
dq0/dt, dq1/dt, dq2/dt dq3/dt
where q0, q1, q2, q3 represent
quaternion components and dq0/dt,
dq1/dt, dq2/dt, dq3/dt represent
quaternion time derivative components.
Quaternions are unitless. Quaternion
time derivatives have units of
1/second.
C05TP1:
Lagrange interpolation, 4-
element packets containing
q0, q1, q2, q3,
where q0, q1, q2, q3 represent
quaternion components. Quaternion
derivatives are obtained by
differentiating interpolating
polynomials.
C05TP2:
Hermite interpolation, 14-
element packets containing
q0, q1, q2, q3,
dq0/dt, dq1/dt, dq2/dt dq3/dt,
av0, av1, av2,
dav0/dt, dav1/dt, dav2/dt
where q0, q1, q2, q3 represent
quaternion components and dq0/dt,
dq1/dt, dq2/dt, dq3/dt represent
quaternion time derivative components,
av0, av1, av2 represent angular
velocity components, and
dav0/dt, dav1/dt, dav2/dt represent
angular acceleration components.
C05TP3:
Lagrange interpolation, 7-
element packets containing
q0, q1, q2, q3,
av0, av1, av2
where q0, q1, q2, q3 represent
quaternion components and
av0, av1, av2 represent angular
velocity components.
Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
-Restrictions
None.
-Version
-CSPICE Version 1.0.0, 20-AUG-2002 (NJB)
*/
#ifndef HAVE_SPICE_CK_H
#define HAVE_SPICE_CK_H
/*
CK type 05 subtype codes:
*/
enum _SpiceCK05Subtype { C05TP0, C05TP1, C05TP2, C05TP3 };
typedef enum _SpiceCK05Subtype SpiceCK05Subtype;
#endif
-441
View File
@@ -1,441 +0,0 @@
/*
-Header_File SpiceCel.h ( CSPICE Cell definitions )
-Abstract
Perform CSPICE definitions for the SpiceCell data type.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
CELLS
-Particulars
This header defines structures, macros, and enumerated types that
may be referenced in application code that calls CSPICE cell
functions.
CSPICE cells are data structures that implement functionality
parallel to that of the cell abstract data type in SPICELIB. In
CSPICE, a cell is a C structure containing bookkeeping information,
including a pointer to an associated data array.
For numeric data types, the data array is simply a SPICELIB-style
cell, including a valid control area. For character cells, the data
array has the same number of elements as the corresponding
SPICELIB-style cell, but the contents of the control area are not
maintained, and the data elements are null-terminated C-style
strings.
CSPICE cells should be declared using the declaration macros
provided in this header file. See the table of macros below.
Structures
==========
Name Description
---- ----------
SpiceCell Structure containing CSPICE cell metadata.
The members are:
dtype: Data type of cell: character,
integer, or double precision.
dtype has type
SpiceCellDataType.
length: For character cells, the
declared length of the
cell's string array.
size: The maximum number of data
items that can be stored in
the cell's data array.
card: The cell's "cardinality": the
number of data items currently
present in the cell.
isSet: Boolean flag indicating whether
the cell is a CSPICE set.
Sets have no duplicate data
items, and their data items are
stored in increasing order.
adjust: Boolean flag indicating whether
the cell's data area has
adjustable size. Adjustable
size cell data areas are not
currently implemented.
init: Boolean flag indicating whether
the cell has been initialized.
base: is a void pointer to the
associated data array. base
points to the start of the
control area of this array.
data: is a void pointer to the
first data slot in the
associated data array. This
slot is the element following
the control area.
ConstSpiceCell A const SpiceCell.
Declaration Macros
==================
Name Description
---- ----------
SPICECHAR_CELL ( name, size, length ) Declare a
character CSPICE
cell having cell
name name,
maximum cell
cardinality size,
and string length
length. The
macro declares
both the cell and
the associated
data array. The
name of the data
array begins with
"SPICE_".
SPICEDOUBLE_CELL ( name, size ) Like SPICECHAR_CELL,
but declares a
double precision
cell.
SPICEINT_CELL ( name, size ) Like
SPICECHAR_CELL,
but declares an
integer cell.
Assignment Macros
=================
Name Description
---- ----------
SPICE_CELL_SET_C( item, i, cell ) Assign the ith
element of a
character cell.
Arguments cell
and item are
pointers.
SPICE_CELL_SET_D( item, i, cell ) Assign the ith
element of a
double precision
cell. Argument
cell is a
pointer.
SPICE_CELL_SET_I( item, i, cell ) Assign the ith
element of an
integer cell.
Argument cell is
a pointer.
Fetch Macros
==============
Name Description
---- ----------
SPICE_CELL_GET_C( cell, i, lenout, item ) Fetch the ith
element from a
character cell.
Arguments cell
and item are
pointers.
Argument lenout
is the available
space in item.
SPICE_CELL_GET_D( cell, i, item ) Fetch the ith
element from a
double precision
cell. Arguments
cell and item are
pointers.
SPICE_CELL_GET_I( cell, i, item ) Fetch the ith
element from an
integer cell.
Arguments cell
and item are
pointers.
Element Pointer Macros
======================
Name Description
---- ----------
SPICE_CELL_ELEM_C( cell, i ) Macro evaluates
to a SpiceChar
pointer to the
ith data element
of a character
cell. Argument
cell is a
pointer.
SPICE_CELL_ELEM_D( cell, i ) Macro evaluates
to a SpiceDouble
pointer to the
ith data element
of a double
precision cell.
Argument cell is
a pointer.
SPICE_CELL_ELEM_I( cell, i ) Macro evaluates
to a SpiceInt
pointer to the
ith data element
of an integer
cell. Argument
cell is a
pointer.
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
-Restrictions
None.
-Version
-CSPICE Version 1.0.0, 22-AUG-2002 (NJB)
*/
#ifndef HAVE_SPICE_CELLS_H
#define HAVE_SPICE_CELLS_H
/*
Data type codes:
*/
typedef enum _SpiceDataType SpiceCellDataType;
/*
Cell structure:
*/
struct _SpiceCell
{ SpiceCellDataType dtype;
SpiceInt length;
SpiceInt size;
SpiceInt card;
SpiceBoolean isSet;
SpiceBoolean adjust;
SpiceBoolean init;
void * base;
void * data; };
typedef struct _SpiceCell SpiceCell;
typedef const SpiceCell ConstSpiceCell;
/*
SpiceCell control area size:
*/
#define SPICE_CELL_CTRLSZ 6
/*
Declaration macros:
*/
#define SPICECHAR_CELL( name, size, length ) \
\
static SpiceChar SPICE_CELL_##name[SPICE_CELL_CTRLSZ + size][length]; \
\
static SpiceCell name = \
\
{ SPICE_CHR, \
length, \
size, \
0, \
SPICETRUE, \
SPICEFALSE, \
SPICEFALSE, \
(void *) &(SPICE_CELL_##name), \
(void *) &(SPICE_CELL_##name[SPICE_CELL_CTRLSZ]) }
#define SPICEDOUBLE_CELL( name, size ) \
\
static SpiceDouble SPICE_CELL_##name [SPICE_CELL_CTRLSZ + size]; \
\
static SpiceCell name = \
\
{ SPICE_DP, \
0, \
size, \
0, \
SPICETRUE, \
SPICEFALSE, \
SPICEFALSE, \
(void *) &(SPICE_CELL_##name), \
(void *) &(SPICE_CELL_##name[SPICE_CELL_CTRLSZ]) }
#define SPICEINT_CELL( name, size ) \
\
static SpiceInt SPICE_CELL_##name [SPICE_CELL_CTRLSZ + size]; \
\
static SpiceCell name = \
\
{ SPICE_INT, \
0, \
size, \
0, \
SPICETRUE, \
SPICEFALSE, \
SPICEFALSE, \
(void *) &(SPICE_CELL_##name), \
(void *) &(SPICE_CELL_##name[SPICE_CELL_CTRLSZ]) }
/*
Access macros for individual elements:
*/
/*
Data element pointer macros:
*/
#define SPICE_CELL_ELEM_C( cell, i ) \
\
( ( (SpiceChar *) (cell)->data ) + (i)*( (cell)->length ) )
#define SPICE_CELL_ELEM_D( cell, i ) \
\
( ( (SpiceDouble *) (cell)->data )[(i)] )
#define SPICE_CELL_ELEM_I( cell, i ) \
\
( ( (SpiceInt *) (cell)->data )[(i)] )
/*
"Fetch" macros:
*/
#define SPICE_CELL_GET_C( cell, i, lenout, item ) \
\
{ \
SpiceInt nBytes; \
\
nBytes = brckti_c ( (cell)->length, 0, (lenout-1) ) \
* sizeof ( SpiceChar ); \
\
memmove ( (item), SPICE_CELL_ELEM_C((cell), (i)), nBytes ); \
\
item[nBytes] = NULLCHAR; \
}
#define SPICE_CELL_GET_D( cell, i, item ) \
\
( (*item) = ( (SpiceDouble *) (cell)->data)[i] )
#define SPICE_CELL_GET_I( cell, i, item ) \
\
( (*item) = ( (SpiceInt *) (cell)->data)[i] )
/*
Assignment macros:
*/
#define SPICE_CELL_SET_C( item, i, cell ) \
\
{ \
SpiceChar * sPtr; \
SpiceInt nBytes; \
\
nBytes = brckti_c ( strlen(item), 0, (cell)->length - 1 ) \
* sizeof ( SpiceChar ); \
\
sPtr = SPICE_CELL_ELEM_C((cell), (i)); \
\
memmove ( sPtr, (item), nBytes ); \
\
sPtr[nBytes] = NULLCHAR; \
}
#define SPICE_CELL_SET_D( item, i, cell ) \
\
( ( (SpiceDouble *) (cell)->data)[i] = (item) )
#define SPICE_CELL_SET_I( item, i, cell ) \
\
( ( (SpiceInt *) (cell)->data)[i] = (item) )
/*
The enum SpiceTransDir is used to indicate language translation
direction: C to Fortran or vice versa.
*/
enum _SpiceTransDir { C2F = 0, F2C = 1 };
typedef enum _SpiceTransDir SpiceTransDir;
#endif
-448
View File
@@ -1,448 +0,0 @@
/*
-Header_File SpiceEK.h ( CSPICE EK-specific definitions )
-Abstract
Perform CSPICE EK-specific definitions, including macros and user-
defined types.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Particulars
This header defines macros, enumerated types, structures, and
typedefs that may be referenced in application code that calls CSPICE
EK functions.
Macros
======
General limits
--------------
Name Description
---- ----------
SPICE_EK_MXCLSG Maximum number of columns per segment.
SPICE_EK_TYPLEN Maximum length of a short string
indicating a data type (one of
{"CHR", "DP", "INT", "TIME"}). Such
strings are returned by some of the
Fortran SPICELIB EK routines, hence also
by their f2c'd counterparts.
Sizes of EK objects
-------------------
Name Description
---- ----------
SPICE_EK_CNAMSZ Maximum length of column name.
SPICE_EK_CSTRLN Length of string required to hold column
name.
SPICE_EK_TNAMSZ Maximum length of table name.
SPICE_EK_TSTRLN Length of string required to hold table
name.
Query-related limits
--------------------
Name Description
---- ----------
SPICE_EK_MAXQRY Maximum length of an input query. This
value is currently equivalent to
twenty-five 80-character lines.
SPICE_EK_MAXQSEL Maximum number of columns that may be
listed in the `SELECT clause' of a query.
SPICE_EK_MAXQTAB Maximum number of tables that may be
listed in the `FROM clause' of a query.
SPICE_EK_MAXQCON Maximum number of relational expressions
that may be listed in the `constraint
clause' of a query.
This limit applies to a query when it is
represented in `normalized form': that
is, the constraints have been expressed
as a disjunction of conjunctions of
relational expressions. The number of
relational expressions in a query that
has been expanded in this fashion may be
greater than the number of relations in
the query as orginally written. For
example, the expression
( ( A LT 1 ) OR ( B GT 2 ) )
AND
( ( C NE 3 ) OR ( D EQ 4 ) )
which contains 4 relational expressions,
expands to the equivalent normalized
constraint
( ( A LT 1 ) AND ( C NE 3 ) )
OR
( ( A LT 1 ) AND ( D EQ 4 ) )
OR
( ( B GT 2 ) AND ( C NE 3 ) )
OR
( ( B GT 2 ) AND ( D EQ 4 ) )
which contains eight relational
expressions.
SPICE_EK_MAXQJOIN Maximum number of tables that can be
joined.
SPICE_EK_MAXQJCON Maximum number of join constraints
allowed.
SPICE_EK_MAXQORD Maximum number of columns that may be
used in the `order-by clause' of a query.
SPICE_EK_MAXQTOK Maximum number of tokens in a query.
Tokens
are reserved words, column names,
parentheses, and values. Literal strings
and time values count as single tokens.
SPICE_EK_MAXQNUM Maximum number of numeric tokens in a
query.
SPICE_EK_MAXQCLN Maximum total length of character tokens
in a query.
SPICE_EK_MAXQSTR Maximum length of literal string values
allowed in queries.
Codes
-----
Name Description
---- ----------
SPICE_EK_VARSIZ Code used to indicate variable-size
objects. Usually this is used in a
context where a non-negative integer
indicates the size of a fixed-size object
and the presence of this code indicates a
variable-size object.
The value of this constant must match the
parameter IFALSE used in the Fortran
library SPICELIB.
Enumerated Types
================
Enumerated code values
----------------------
Name Description
---- ----------
SpiceEKDataType Codes for data types used in the EK
interface: character, double precision,
integer, and "time."
The values are:
{ SPICE_CHR = 0,
SPICE_DP = 1,
SPICE_INT = 2,
SPICE_TIME = 3 }
SpiceEKExprClass Codes for types of expressions that may
appear in the SELECT clause of EK
queries. Values and meanings are:
SPICE_EK_EXP_COL Selected item was a
column. The column
may qualified by a
table name.
SPICE_EK_EXP_FUNC Selected item was
a simple function
invocation of the
form
F ( <column> )
or else was
COUNT(*)
SPICE_EK_EXP_EXPR Selected item was a
more general
expression than
those shown above.
Numeric values are:
{ SPICE_EK_EXP_COL = 0,
SPICE_EK_EXP_FUNC = 1,
SPICE_EK_EXP_EXPR = 2 }
Structures
==========
EK API structures
-----------------
Name Description
---- ----------
SpiceEKAttDsc EK column attribute descriptor. Note
that this object is distinct from the EK
column descriptors used internally in
the EK routines; those descriptors
contain pointers as well as attribute
information.
The members are:
cclass: Column class code.
dtype: Data type code: has type
SpiceEKDataType.
strlen: String length. Applies to
SPICE_CHR type. Value is
SPICE_EK_VARSIZ for
variable-length strings.
size: Column entry size; this is
the number of array
elements in a column
entry. The value is
SPICE_EK_VARSIZ for
variable-size columns.
indexd: Index flag; value is
SPICETRUE if the column is
indexed, SPICEFALSE
otherwise.
nullok: Null flag; value is
SPICETRUE if the column
may contain null values,
SPICEFALSE otherwise.
SpiceEKSegSum EK segment summary. This structure
contains user interface level descriptive
information. The structure contains the
following members:
tabnam The name of the table to
which the segment belongs.
nrows The number of rows in the
segment.
ncols The number of columns in
the segment.
cnames An array of names of
columns in the segment.
Column names may contain
as many as SPICE_EK_CNAMSZ
characters. The array
contains room for
SPICE_EK_MXCLSG column
names.
cdescrs An array of column
attribute descriptors of
type SpiceEKAttDsc.
The array contains room
for SPICE_EK_MXCLSG
descriptors. The Ith
descriptor corresponds to
the column whose name is
the Ith element of the
array cnames.
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
-Restrictions
None.
-Version
-CSPICE Version 2.0.0 27-JUL-2002 (NJB)
Defined SpiceEKDataType using SpiceDataType. Removed declaration
of enum _SpiceEKDataType.
-CSPICE Version 1.0.0, 05-JUL-1999 (NJB)
Renamed _SpiceEKAttDsc member "class" to "cclass." The
former name is a reserved word in C++.
-CSPICE Version 1.0.0, 24-FEB-1999 (NJB)
*/
#ifndef HAVE_SPICE_EK_H
#define HAVE_SPICE_EK_H
/*
Constants
*/
/*
Sizes of EK objects:
*/
#define SPICE_EK_CNAMSZ 32
#define SPICE_EK_CSTRLN ( SPICE_EK_CNAMSZ + 1 )
#define SPICE_EK_TNAMSZ 64
#define SPICE_EK_TSTRLN ( SPICE_EK_TNAMSZ + 1 )
/*
Maximum number of columns per segment:
*/
#define SPICE_EK_MXCLSG 100
/*
Maximum length of string indicating data type:
*/
#define SPICE_EK_TYPLEN 4
/*
Query-related limits (see header for details):
*/
#define SPICE_EK_MAXQRY 2000
#define SPICE_EK_MAXQSEL 50
#define SPICE_EK_MAXQTAB 10
#define SPICE_EK_MAXQCON 1000
#define SPICE_EK_MAXQJOIN 10
#define SPICE_EK_MAXQJCON 100
#define SPICE_EK_MAXQORD 10
#define SPICE_EK_MAXQTOK 500
#define SPICE_EK_MAXQNUM 100
#define SPICE_EK_MAXQCLN SPICE_EK_MAXQRY
#define SPICE_EK_MAXQSTR 1024
/*
Code indicating "variable size":
*/
#define SPICE_EK_VARSIZ (-1)
/*
Data type codes:
*/
typedef SpiceDataType SpiceEKDataType;
/*
SELECT clause expression type codes:
*/
enum _SpiceEKExprClass{ SPICE_EK_EXP_COL = 0,
SPICE_EK_EXP_FUNC = 1,
SPICE_EK_EXP_EXPR = 2 };
typedef enum _SpiceEKExprClass SpiceEKExprClass;
/*
EK column attribute descriptor:
*/
struct _SpiceEKAttDsc
{ SpiceInt cclass;
SpiceEKDataType dtype;
SpiceInt strlen;
SpiceInt size;
SpiceBoolean indexd;
SpiceBoolean nullok; };
typedef struct _SpiceEKAttDsc SpiceEKAttDsc;
/*
EK segment summary:
*/
struct _SpiceEKSegSum
{ SpiceChar tabnam [SPICE_EK_TSTRLN];
SpiceInt nrows;
SpiceInt ncols;
SpiceChar cnames [SPICE_EK_MXCLSG][SPICE_EK_CSTRLN];
SpiceEKAttDsc cdescrs[SPICE_EK_MXCLSG]; };
typedef struct _SpiceEKSegSum SpiceEKSegSum;
#endif
-115
View File
@@ -1,115 +0,0 @@
/*
-Header_File SpiceEll.h ( CSPICE Ellipse definitions )
-Abstract
Perform CSPICE definitions for the SpiceEllipse data type.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Particulars
This header defines structures and typedefs that may be referenced in
application code that calls CSPICE Ellipse functions.
Structures
==========
Name Description
---- ----------
SpiceEllipse Structure representing an ellipse in 3-
dimensional space.
The members are:
center: Vector defining ellipse's
center.
semiMajor: Vector defining ellipse's
semi-major axis.
semiMinor: Vector defining ellipse's
semi-minor axis.
The ellipse is the set of points
{X: X = center
+ cos(theta) * semiMajor
+ sin(theta) * semiMinor,
theta in [0, 2*Pi) }
ConstSpiceEllipse A const SpiceEllipse.
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
-Restrictions
None.
-Version
-CSPICE Version 1.0.0, 04-MAR-1999 (NJB)
*/
#ifndef HAVE_SPICE_ELLIPSES
#define HAVE_SPICE_ELLIPSES
/*
Ellipse structure:
*/
struct _SpiceEllipse
{ SpiceDouble center [3];
SpiceDouble semiMajor [3];
SpiceDouble semiMinor [3]; };
typedef struct _SpiceEllipse SpiceEllipse;
typedef const SpiceEllipse ConstSpiceEllipse;
#endif
-141
View File
@@ -1,141 +0,0 @@
/*
-Header_File SpiceErr.h ( CSPICE error handling definitions )
-Abstract
Perform CSPICE definitions for error handling APIs.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Particulars
This header defines constants that may be referenced in
application code that calls CSPICE error handling functions.
CONSTANTS
==========
Name Description
---- ----------
SPICE_ERROR_LMSGLN Maximum length of a long error message,
including the null terminator.
SPICE_ERROR_SMSGLN Maximum length of a short error message,
including the null terminator.
SPICE_ERROR_XMSGLN Maximum length of a short error
explanation message, including the null
terminator.
SPICE_ERROR_MODLEN Maximum length of a module name
appearing in the traceback message,
including the null terminator.
SPICE_ERROR_MAXMOD Maximum count of module names
appearing in the traceback message.
SPICE_ERROR_TRCLEN Maximum length of a traceback message,
including the null terminator.
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
-Restrictions
None.
-Version
-CSPICE Version 1.0.0, 05-NOV-2013 (NJB)
*/
#ifndef HAVE_SPICE_ERROR_HANDLING
#define HAVE_SPICE_ERROR_HANDLING
/*
Local constants
*/
#define ARROWLEN 5
/*
Public constants
*/
/*
Long error message length, which is equal to
( 23 * 80 ) + 1
*/
#define SPICE_ERROR_LMSGLN 1841
/*
Short error message length:
*/
#define SPICE_ERROR_SMSGLN 26
/*
Short error message explanation length:
*/
#define SPICE_ERROR_XMSGLN 81
/*
Module name length for traceback entries:
*/
#define SPICE_ERROR_MODLEN 33
/*
Maximum module count for traceback string:
*/
#define SPICE_ERROR_MAXMOD 100
/*
Maximum length of traceback string returned
by qcktrc_c.
*/
#define SPICE_ERROR_TRCLEN ( ( SPICE_ERROR_MAXMOD \
* ( SPICE_ERROR_MODLEN-1 ) ) \
+ ( ARROWLEN \
* ( SPICE_ERROR_MAXMOD-1 ) ) \
+ 1 )
#endif
-193
View File
@@ -1,193 +0,0 @@
/*
-Header_File SpiceFrm.h ( CSPICE frame subsystem definitions )
-Abstract
Perform CSPICE definitions for frame subsystem APIs.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
CK
FRAMES
PCK
-Particulars
This header defines constants that may be referenced in
application code that calls CSPICE frame subsystem APIs.
CONSTANTS
==========
Frame counts
------------
The following parameter are counts of built-in frames. These
parameters correspond to those defined in the SPICELIB Fortran
INCLUDE files
ninert.inc
nninrt.inc
Name Description
---- ----------
SPICE_NFRAME_NINERT Number of built-in inertial frames.
SPICE_NFRAME_NNINRT Number of built-in non-inertial frames.
Frame classes
-------------
The following parameters identify SPICE frame classes. These
parameters correspond to those defined in the SPICELIB Fortran
INCLUDE file frmtyp.inc. See the Frames Required Reading for a
detailed discussion of frame classes.
Name Description
---- ----------
SPICE_FRMTYP_INERTL an inertial frame that is listed in the
f2c'd routine chgirf_ and that requires
no external file to compute the
transformation from or to any other
inertial frame.
SPICE_FRMTYP_PCK is a frame that is specified relative
to some built-in, inertial frame (of
class SPICE_FRMTYP_INERTL) and that has
an IAU model that may be retrieved from
the PCK system via a call to the
routine tisbod_c.
SPICE_FRMTYP_CK is a frame defined by a C-kernel.
SPICE_FRMTYP_TK is a "text kernel" frame. These frames
are offset from their associated
"relative" frames by a constant
rotation.
SPICE_FRMTYP_DYN is a "dynamic" frame. These currently
are limited to parameterized frames
where the full frame definition depends
on parameters supplied via a frame
kernel.
SPICE_FRMTYP_ALL indicates any of the above classes.
This parameter is used in APIs that
fetch information about frames of a
specified class.
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
-Restrictions
None.
-Version
-CSPICE Version 1.0.0, 23-MAY-2012 (NJB)
*/
#ifndef HAVE_SPICE_FRAME_DEFS
#define HAVE_SPICE_FRAME_DEFS
/*
Frame counts:
*/
/*
Number of built-in inertial frames. This number must be kept in
sync with that defined in the SPICELIB include file ninert.inc.
*/
#define SPICE_NFRAME_NINERT 21
/*
Number of built-in non-inertial frames. This number must be kept in
sync with that defined in the SPICELIB include file nninrt.inc.
*/
#define SPICE_NFRAME_NNINRT 105
/*
The frame class codes defined here are identical
to those used in SPICELIB.
*/
/*
Inertial, built-in frames:
*/
#define SPICE_FRMTYP_INERTL 1
/*
PCK frames:
*/
#define SPICE_FRMTYP_PCK 2
/*
CK frames:
*/
#define SPICE_FRMTYP_CK 3
/*
TK frames:
*/
#define SPICE_FRMTYP_TK 4
/*
Dynamic frames:
*/
#define SPICE_FRMTYP_DYN 5
/*
All frame classes:
*/
#define SPICE_FRMTYP_ALL ( -1 )
#endif
-341
View File
@@ -1,341 +0,0 @@
/*
-Header_File SpiceGF.h ( CSPICE GF-specific definitions )
-Abstract
Perform CSPICE GF-specific definitions.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
GF
-Keywords
GEOMETRY
SEARCH
-Exceptions
None
-Files
None
-Particulars
This header defines macros that may be referenced in application
code that calls CSPICE GF functions.
Macros
======
Workspace parameters
--------------------
CSPICE applications normally don't declare workspace arguments
and therefore don't directly reference workspace size parameters.
However, CSPICE GF APIs dealing with numeric constraints
dynamically allocate workspace memory; the amount allocated
depends on the number of intervals the workspace windows can
hold. This amount is an input argument to the GF numeric quantity
APIs.
The parameters below are used to calculate the amount of memory
required. Each workspace window contains 6 double precision
numbers in its control area and 2 double precision numbers for
each interval it can hold.
Name Description
---- ----------
SPICE_GF_NWMAX Maximum number of windows required for
a user-defined workspace array.
SPICE_GF_NWDIST Number of workspace windows used by
gfdist_c and the underlying SPICELIB
routine GFDIST.
SPICE_GF_NWILUM Number of workspace windows used by
gfilum_c and the underlying SPICELIB
routine GFILUM.
SPICE_GF_NWSEP Number of workspace windows used by
gfsep_c and the underlying SPICELIB
routine GFSEP.
SPICE_GF_NWRR Number of workspace windows used by
gfrr_c and the underlying SPICELIB
routine GFRR.
SPICE_GF_NWPA Number of workspace windows used by
gfpa_c and the underlying SPICELIB
routine GFPA.
Field of view (FOV) parameters
------------------------------
Name Description
---- ----------
SPICE_GF_MAXVRT Maximum allowed number of boundary
vectors for a polygonal FOV.
SPICE_GF_CIRFOV Parameter identifying a circular FOV.
SPICE_GF_ELLFOV Parameter identifying a elliptical FOV.
SPICE_GF_POLFOV Parameter identifying a polygonal FOV.
SPICE_GF_RECFOV Parameter identifying a rectangular FOV.
SPICE_GF_SHPLEN Parameter specifying maximum length of
a FOV shape name.
SPICE_GF_MARGIN is a small positive number used to
constrain the orientation of the
boundary vectors of polygonal FOVs. Such
FOVs must satisfy the following
constraints:
1) The boundary vectors must be
contained within a right circular
cone of angular radius less than
than (pi/2) - MARGIN radians; in
other words, there must be a vector
A such that all boundary vectors
have angular separation from A of
less than (pi/2)-MARGIN radians.
2) There must be a pair of boundary
vectors U, V such that all other
boundary vectors lie in the same
half space bounded by the plane
containing U and V. Furthermore, all
other boundary vectors must have
orthogonal projections onto a plane
normal to this plane such that the
projections have angular separation
of at least 2*MARGIN radians from
the plane spanned by U and V.
MARGIN is currently set to 1.D-12.
Occultation parameters
----------------------
SPICE_GF_ANNULR Parameter identifying an "annular
occultation." This geometric condition
is more commonly known as a "transit."
The limb of the background object must
not be blocked by the foreground object
in order for an occultation to be
"annular."
SPICE_GF_ANY Parameter identifying any type of
occultation or transit.
SPICE_GF_FULL Parameter identifying a full
occultation: the foreground body
entirely blocks the background body.
SPICE_GF_PARTL Parameter identifying an "partial
occultation." This is an occultation in
which the foreground body blocks part,
but not all, of the limb of the
background body.
Target shape parameters
-----------------------
SPICE_GF_EDSHAP Parameter indicating a target object's
shape is modeled as an ellipsoid.
SPICE_GF_PTSHAP Parameter indicating a target object's
shape is modeled as a point.
SPICE_GF_RYSHAP Parameter indicating a target object's
"shape" is modeled as a ray emanating
from an observer's location. This model
may be used in visibility computations
for targets whose direction, but not
position, relative to an observer is
known.
SPICE_GF_SPSHAP Parameter indicating a target object's
shape is modeled as a point.
Search parameters
-----------------
These parameters affect the manner in which GF searches are
performed.
SPICE_GF_ADDWIN is a parameter used in numeric quantity
searches that use an equality
constraint. This parameter is used to
expand the confinement window (the
window over which the search is
performed) by a small amount at both
ends. This expansion accommodates the
case where a geometric quantity is equal
to a reference value at a boundary point
of the original confinement window.
SPICE_GF_CNVTOL is the default convergence tolerance
used by GF routines that don't support a
user-supplied tolerance value. GF
searches for roots will terminate when a
root is bracketed by times separated by
no more than this tolerance. Units are
seconds.
Configuration parameter
-----------------------
SPICE_GFEVNT_MAXPAR Parameter indicating the maximum number of
elements needed for the 'qnames' and 'q*pars'
arrays used in gfevnt_c.
SpiceChar qcpars[SPICE_GFEVNT_MAXPAR][LNSIZE];
SpiceDouble qdpars[SPICE_GFEVNT_MAXPAR];
SpiceInt qipars[SPICE_GFEVNT_MAXPAR];
SpiceBoolean qlpars[SPICE_GFEVNT_MAXPAR];
-Examples
None
-Restrictions
None.
-Literature_References
None.
-Author_and_Institution
N.J. Bachman (JPL)
L.S. Elson (JPL)
-Version
-CSPICE Version 2.1.0, 23-FEB-2012 (NJB)
Added parameters:
SPICE_GF_NWILUM
SPICE_GF_NWRR
SPICE_GF_NWPA
-CSPICE Version 2.0.0, 23-JUN-2009 (NJB)
Added parameter for maximum length of FOV shape string.
-CSPICE Version 1.0.0, 11-MAR-2009 (NJB)
*/
#ifndef HAVE_SPICE_GF_H
#define HAVE_SPICE_GF_H
/*
See the Particulars section above for parameter descriptions.
*/
/*
Workspace parameters
*/
#define SPICE_GF_NWMAX 15
#define SPICE_GF_NWDIST 5
#define SPICE_GF_NWILUM 5
#define SPICE_GF_NWSEP 5
#define SPICE_GF_NWRR 5
#define SPICE_GF_NWPA 5
/*
Field of view (FOV) parameters
*/
#define SPICE_GF_MAXVRT 10000
#define SPICE_GF_CIRFOV "CIRCLE"
#define SPICE_GF_ELLFOV "ELLIPSE"
#define SPICE_GF_POLFOV "POLYGON"
#define SPICE_GF_RECFOV "RECTANGLE"
#define SPICE_GF_SHPLEN 10
#define SPICE_GF_MARGIN ( 1.e-12 )
/*
Occultation parameters
*/
#define SPICE_GF_ANNULR "ANNULAR"
#define SPICE_GF_ANY "ANY"
#define SPICE_GF_FULL "FULL"
#define SPICE_GF_PARTL "PARTIAL"
/*
Target shape parameters
*/
#define SPICE_GF_EDSHAP "ELLIPSOID"
#define SPICE_GF_PTSHAP "POINT"
#define SPICE_GF_RYSHAP "RAY"
#define SPICE_GF_SPSHAP "SPHERE"
/*
Search parameters
*/
#define SPICE_GF_ADDWIN 1.0
#define SPICE_GF_CNVTOL 1.e-6
/*
Configuration parameters.
*/
#define SPICE_GFEVNT_MAXPAR 10
#endif
/*
End of header file SpiceGF.h
*/
-147
View File
@@ -1,147 +0,0 @@
/*
-Header_File SpiceOccult.h ( CSPICE Occultation specific definitions )
-Abstract
Perform CSPICE occultation specific definitions.
-Disclaimer
THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
-Required_Reading
None.
-Keywords
OCCULTATION
GEOMETRY
ELLIPSOID
-Exceptions
None
-Files
None
-Particulars
The following integer codes indicate the geometric relationship
of the three bodies.
The meaning of the sign of each code is given below.
Code sign Meaning
--------- ------------------------------
> 0 The second ellipsoid is
partially or fully occulted
by the first.
< 0 The first ellipsoid is
partially of fully
occulted by the second.
= 0 No occultation.
The meanings of the codes are given below. The variable names
indicate the type of occultation and which target is in the back.
For example, SPICE_OCCULT_TOTAL1 represents a total occultation in which
the first target is in the back (or occulted by) the second target.
Name Code Meaning
------ ----- ------------------------------
SPICE_OCCULT_TOTAL1 -3 Total occultation of first
target by second.
SPICE_OCCULT_ANNLR1 -2 Annular occultation of first
target by second. The second
target does not block the limb
of the first.
SPICE_OCCULT_PARTL1 -1 Partial occultation of first
target by second target.
SPICE_OCCULT_NOOCC 0 No occultation or transit: both
objects are completely visible
to the observer.
SPICE_OCCULT_PARTL2 1 Partial occultation of second
target by first target.
SPICE_OCCULT_ANNLR2 2 Annular occultation of second
target by first.
SPICE_OCCULT_TOTAL2 3 Total occultation of second
target by first.
-Examples
None
-Restrictions
None.
-Literature_References
None.
-Author_and_Institution
S.C. Krening (JPL)
N.J. Bachman (JPL)
-Version
-CSPICE Version 1.0.0, 23-FEB-2012 (SCK)
*/
#ifndef HAVE_SPICE_OCCULT_H
#define HAVE_SPICE_OCCULT_H
/*
See the Particulars section above for parameter descriptions.
*/
/*
Occultation parameters
*/
#define SPICE_OCCULT_TOTAL1 -3
#define SPICE_OCCULT_ANNLR1 -2
#define SPICE_OCCULT_PARTL1 -1
#define SPICE_OCCULT_NOOCC 0
#define SPICE_OCCULT_PARTL2 1
#define SPICE_OCCULT_ANNLR2 2
#define SPICE_OCCULT_TOTAL2 3
#endif

Some files were not shown because too many files have changed in this diff Show More