Miriade

ephemsys

Ephemerides of asteroid satellites

HTTP Request

If you are a software/solutions developer, you might want to include the Miriade ephemsys service into your application. This can be done by using the Web service method or by using the following HTTP request:
https://ssp.imcce.fr/webservices/miriade/api/ephemsys.php?[parameters]
where [parameters] is a list of parameters separated by the ampersand character (&). The allowed parameters are:
ParameterDefinitionLimits or value
-name=<string> The designation of the asteroidal system Ex.: a:Camilla, a:41, Kalliope (1)
-ep=<string> Requested epoch, expressed in Julian period, ISO format,
or formatted as any English textual datetime (Default = now)
10 years around the current date (2,3)
-nbd=<int> Number of dates of ephemeris to compute (default: 1) 1 ≤ nbd ≤ 5000
-step=<string> Step of increment (float) followed by one of (d)ays or
(h)ours or (m)inutes or (s)econds (default: 1d)
Ex.: 2.345h or 1d
-tscale=<string> Ephemeris time scale (Default = UTC) UTC | TT
-gensol=<int> Id of the Genoide's orbital solution of the satellites (Default = 0) 0 | 1 | 2 | ... (4)
-mime=<string> Mime type of the results (Default = votable) votable
-from=<string> Word which definite the name of the caller application,
or which describes the request
any short string (no space character)
  1. The ephemerides are available for a handful of asteroidal systems. Use the dedicated interface to retrieve the list of systems.
  2. By default, the ephemerides are provided for 4 dates, spanned around the requested epoch as t0-1h, t0, t0+1h, and t0+2h.
  3. Use the gensol keyword of the dedicated interface to know exactly the time span of computation of errors of the orbital solution. Outside this period, ephemerides can be computed without estimation of position errors.
  4. The number and Ids of available solutions for a given asteroidal system can be retrieved using the dedicated interface.

The output results are described in the following section, and are available in VOTable (cf. examples). The only mandatory parameter is the name of the system. The other parameters are optionnal and their values can be omitted (just left blank the value, e.g. &-tscale=&-mime=).

HTTP Request specific interface

This interface is intended to request specific data used by Miriade ephemsys method to compute ephemerides:
  • the list of asteroidal systems for which ephemerides can be computed,
  • the list of orbital solutions available for a given asteroidal system.
This is done by using the following HTTP request:
https://ssp.imcce.fr/webservices/miriade/api/ephemsys.php?-get=<keyword>[&parameters]
where keyword must be systems to get the list of asteroidal systems, or gensol to get the list of orbital solutions of a given asteroidal system, and where parameters are:
ParameterDefinitionLimits or value
-name=<string> The designation of an asteroidal system (to be used only with keyword gensol) Examples:
a:camilla or Kalliope
-from=<string> Word which definite the name of the caller application,
or which describes the request
any short string
(no space character)

The output response is a text/csv document which contains the following information:

Example: retrieve the list of all asteroidal systems for which ephemerides of the components are available. The response contains the following information:

ColumnDesciption
IdOfficial number of the asteroidal system
NameOfficial name of the asteroidal system
NbCompoNumber of components of the system
ComponentsComma-separated list of component names
GensolList of Ids of orbital solutions for the system

To query ephemerides of the components of the system through Miriade ephemsys method, use the Id or Name of the asteroidal system, formatted as -name=[a:]<Name>, e.g. -name=a:107 or -name=a:Camilla. The name is case-insensitive, and the prefix is optionnal.

Example: retrieve the orbital solutions available for Camilla's system. The response contains the following information:

ColumnDesciption
GensolId of Genoide solution
IdAsteroidal System Id
SystemNameAsteroidal system name
CompoNameName of the component
MethodOrbital inversion method
FomcAccuracy of the orbital solution, in mas
ProbaProbability of success (0-100%) of the orbital solution
MeanRadiusMean equivalent radius of the body, in km
MeanRadiusErrorError on the mean radius, in km
SolutionDateDate of the orbital solution (ISO)
EphemAvailability of ephemeris computation (0|1)
StartEphemDateStart date of availability of ephemeris computation (ISO)
EndEphemDateEnd date of availability of ephemeris computation (ISO)
ErrorAvailability of error computation (0|1)
StartErrorDateStart date of availability of error computation (ISO)
EndErrorDateEnd date of availability of error computation (ISO)

To query the ephemerides of the components with a given orbital solution, use one of the Ids provided in the Gensol column.

Web service

The Miriade Web service provides methods based on SOAP and HTTP POST verb which allow one to interact between its own application and the Miriade service. Here is the useful information to invoke the Miriade ephemsys method:
Web Service URI:
https://ssp.imcce.fr/webservices/miriade/miriade.php
Namespace:
https://ssp.imcce.fr/webservices/miriade
WSDL:
https://ssp.imcce.fr/webservices/miriade/miriade.php?wsdl
SOAP header:
name of the SOAP header element: clientID
SOAP header's content: array('from' => 'YourName', 'hostip'=>'')
Method:
ephemsys (inputArray)
The input parameter of the method is an array which must contained the following parameters:
VariableTypeUnitsLimits or valuesDefaultCommentNote
name string designation - none Name or number of the asteroidal system (1)
epoch string epoch About 10 years around the current date now Requested epoch (julian period, ISO format, English textual datetime) (2,3)
nbd int - 1 ≤ nbd ≤ 5000 1 Number of dates of ephemeris to compute
step string d|h|m|s step ≤ 100d 1d Step of increment (float) followed by one of (d)ays or (h)ours or (m)inutes or (s)econds
tscale string - UTC | TT UTC Time scale of the ephemerides
gensol int - 0 | 1 | 2 | ... 0 Id of the Genoide orbital solution of the satellites (4)
mime string - votable votable Mime type of the results
get string - systems | gensol blank Use this parameter only to request specific data used by Miriade ephemsys method to compute ephemerides. No ephemeris is provided.
  1. The ephemerides are available for a handful of asteroidal systems. Use the dedicated interface to retrieve the list of systems.
  2. By default, the ephemerides are provided for 4 dates, spanned around the requested epoch: t0-1h, t0, t0+h, and t0+2h.
  3. Use the gensol keyword of the dedicated interface to know exactly the time span of computation of errors of the orbital solution. Outside this period, ephemerides can be computed without estimation of position errors.
  4. The number and Ids of available solutions for a given asteroidal system can be retrieved using the dedicated interface.

The output of the ephemsys method is an object containing the following attributes:

'flag'
the status of the response: flag=1 means ok; flag=0 or flag=-1 mean that an error occured
'status'
the HTTP status-code of the response (e.g. 400: bad request, 422: Unprocessable Entity, 500: internal error)
'ticket'
the Unix timestamp of the response which can be useful to stamp the request
'result'
a string, formatted in the IVOA standard VOTable format, containing the ephemerides of the requested asteroidal system (see Output results section)

Query examples

Output results

Ephemsys VOTable structure
Fig. 1: Structure of the VOTable output
Ephemsys VOTable structure
Fig. 2: Position errors of a component at a given epoch

The VOTable output consists of a collection of resources that contain tables with the ephemerides of each component of the given asteroidal system (Fig 1). Each resource corresponds to a set of orbital elements for each component of the system obtained by fitting the observations with the Genoide algorithm (Vachier et al. 2012, A&A 543). The number of resources within the VOTable is given by the parameter nbgensol, and each resource is identified by an attribute ID="gensol_i" where i is an index from 1 to nbgensol. Within a resource, the number of tables is given by the parameter nbcomposyst_i, and each table is identified by an attribute ID="<NameOfComponent>_i".

The VOTable contains a set of parameters that describe the overall data:

  • VOTABLE/PARAM/Coordinates: the type of coordinates: relative to the center of mass of the system
  • VOTABLE/PARAM/TimeScale: the time scale of the ephemerides TT or UTC
  • VOTABLE/PARAM/RequestedEpoch: the requested epoch
  • VOTABLE/PARAM/NbDates: the number of date of ephemerides (4), provided also by the nrows attribute of the tables
  • VOTABLE/PARAM/StepSize: the step size of the ephemerides (1 h)
  • VOTABLE/PARAM/NbGenSol: the number of Genoide's solutions
The resource contains a set of parameters that describe the Genoide solution:
  • VOTABLE/RESOURCE/PARAM/GenoideSystem: the name of the asteroidal system
  • VOTABLE/RESOURCE/PARAM/GenoideSolutionDate: the date of computation of the solution
  • VOTABLE/RESOURCE/PARAM/GenoideSolutionId : the Id of the Genoide's solution
  • VOTABLE/RESOURCE/PARAM/NbCompoSyst: the number of components of the system
  • VOTABLE/RESOURCE/PARAM/GenoideFomc: the quadratic mean of the O-C
  • VOTABLE/RESOURCE/PARAM/GenoideProba: the probability of success of the solution
The table contains a set of parameters that describe the component:
  • VOTABLE/RESOURCE/TABLE/PARAM/Radius: the mean equatorial radius of the component
  • VOTABLE/RESOURCE/TABLE/PARAM/Radius_err: the error on the mean equatorial radius of the component

For each component of a system, the ephemeris table contains the fields described in the following table. The uncertainties on the cartesian coordinates of the components (columns 4 to 15) are defined as the minimum and maximum errors at 1-sigma, 2-sigma, and 3-sigma levels (Fig. 2).

Col. Definition Units Format
1 Julian period day decimal
2 X coordinate of the differential position of the component w.r.t. the center of mass mas decimal
3 Y coordinate of the differential position of the component w.r.t. the center of mass mas decimal
4 Estimation of the apparent magnitude of the component mag decimal
The next columns displays the minimum and maximum standard errors on X and Y coordinates for i = 1 to 3
5 * i i-sigma minimum error on X coordinate mas decimal
5 * i+1 i-sigma minimum error on Y coordinate mas decimal
5 * i+2 i-sigma maximum error on X coordinate mas decimal
5 * i+3 i-sigma maximum error on Y coordinate mas decimal

How to consume

You have two ways to use the Miriade Web service: by writting a client to send requests to the Miriade server and to receive and analyze the response, or by using a command line interface and a data transfert program such as curl or wget. For that, just execute one of the following commands in a console:
$> curl "<URL>"
or
$> wget "<URL>"
where <URL> is described in section HTTP request.

In order to help you to invoke the Miriade Web service, we provide some clients written in differents languages. Here are some detailed explanations to write a client with PHP and SOAP which invokes the ephemsys method:

1/ Provide the input parameters which are mandatory for the service:

// Client's ID: provide the name of your project or organisation or yourself
$from = 'MyName';
// Input parameters
$param = array('name' => 'a:camilla',
               'epoch' => '2018-03-19T0:42:46.0',
               'tscale' => 'TT',
               'gensol' => 0,
               'mime' => 'votable'
);

2/ Define the SOAP options, the namespace and the WSDL URI of Miriade Web service:

// Enables or disables the WSDL caching feature
ini_set('soap.wsdl_cache_enabled', 1);
// Miriade namespace
$namespace = 'https://ssp.imcce.fr/webservices/miriade';
// Miriade WSDL
$uriwsdl = $namespace.'/miriade.wsdl';

3/ Create a SoapClient object in WSDL mode, set the SOAP header, then call the method and catch exceptions:

try {
  // Constructs the client
  $client = new SoapClient($uriwsdl, array('exceptions'=>1));
  // SOAP header
  $header = array('from'=>$from, 'hostip'=>'', 'lang'=>'en');
  $client->__setSoapHeaders(array(new SOAPHeader($namespace, 'clientID', $header)));  
  // Call the resolver method
  $response = $client->__soapCall('ephemsys',array($param));
  // Display the results
  if (! empty($param['get'])) {

    // Display get results
    header("HTTP/1.0 ".$response->status);
    if ($response->status < 300) {
      header("Content-Type: text/csv");
    } else {
      header("Content-Type: text/xml;content=x-votable");
    }
    echo $response->result.PHP_EOL;

  } else {

    // Display ephemerides
    header("HTTP/1.0 ".$response->status);
    header("Content-Type: text/xml;content=x-votable");
    echo $response->result;

   }
} 
catch (SoapFault $fault) 
{
   trigger_error("SOAP Fault: {$fault->getTraceAsString()} (faultcode: {$fault->faultcode}, 
                               faultstring: {$fault->faultstring})", E_USER_ERROR);
}