public final class SpiceBody extends Object
This class is based on the bodc2n, bodc2s and zzbodtrn files of the SPICE library.
Modifier and Type | Method and Description |
---|---|
static String |
bodyCode2Name(int code)
Translate the SPICE integer code of a body into a common name for that body.
This routine is a translation of the BODC2N routine from the Spice library |
static String |
bodyCode2String(int code)
Translate a body ID code to either the corresponding name or if no name to ID code mapping exists, the string
representation of the body ID value.
|
static int |
bodyName2Code(String name,
boolean[] found)
Translate the name of a body or object to the corresponding SPICE ID code.
|
static int |
bodyString2Code(String name,
boolean[] found)
Translate a string representing a body name into its code.
|
static int |
bodyString2CodeBypass(CounterArray usrctr,
String[] savName,
int[] savCode,
boolean[] savFound,
String name,
boolean[] found)
Translate a string containing a body name or ID code to an integer code, but bypass calling
SpiceBody#bodyString2Code(String) and return saved values provided by the caller if the name is the same
as the saved name and the SpiceBody state did not change. |
public static String bodyCode2Name(int code) throws PatriusException
code
- Integer ID code to be translated into a namePatriusException
- if there is a problem in the Poolpublic static int bodyName2Code(String name, boolean[] found) throws PatriusException
Based on the BODN2C routine from the SPICE library
name
- Body name to be translated into a SPICE ID codefound
- (out) returns if the body was foundPatriusException
- if there is a Pool or initialization problempublic static String bodyCode2String(int code) throws PatriusException
This routine is a translation of the BODC2S routine from the SPICE library.
code
- Integer ID code to be translated into a namePatriusException
- if there is a problem translating the code to the namepublic static int bodyString2Code(String name, boolean[] found) throws PatriusException
name
- String representing a body namefound
- (out) return if the body was foundPatriusException
- if there is a problem translating the name into the codepublic static int bodyString2CodeBypass(CounterArray usrctr, String[] savName, int[] savCode, boolean[] savFound, String name, boolean[] found) throws PatriusException
SpiceBody#bodyString2Code(String)
and return saved values provided by the caller if the name is the same
as the saved name and the SpiceBody state did not change.
Based on the routine ZZBODS2C routine of the SPICE library.
usrctr
- (in/out) SpiceBody state counter saved by the callersavName
- (in/out) Body name saved by the callersavCode
- (in/out) Body ID code saved by the callersavFound
- (in/out) Translation success flag saved in the callername
- Body namefound
- (out) Translation success flagPatriusException
- if there is a problem checking the state or translatingCopyright © 2023 CNES. All rights reserved.