Logo IMCCE-VOParis

THE IMCCE VIRTUAL OBSERVATORY
SOLAR SYSTEM PORTAL
Observatoire de Paris / CNRS

Logo IMCCE
Portal Home Page | Report issue | Legal notice | Contact us

The Virtual Observatory Sky Body Tracker

.: skybotresolver :.

.: Purpose

This method is intended to people who need to resolve the name of a solar system object (asteroid, planet, natural satellite or comet) into celestial coordinates, in the framework of SkyBoT service.
Please use instead the SsODNet/Quaero service to resolve the name of any solar system object.

.: HTTP Request

The Skybot Resolver service can be accessed using the SkyBoT query forms. If you are a software/solutions developer, you might want to include the Skybot Resolver service into your application. This can be done by using the web service method or by using the following HTTP request:
http://vo.imcce.fr/webservices/skybot/skybotresolver_query.php?[parameters]
where [parameters] is a list of parameters separated by the character &. The allowed parameters are:
ParameterDefinitionLimits
-ep=<string> Requested epoch, expressed in Julian day
or formatted as any English textual datetime
2411320.0 .. 2469880.0
1889-11-13 12h .. 2050-03-14 12h
-name=<string>
or
-obj=<string>
The designation (1) of the target
(-obj is deprecated)
Ex.: 2, Pallas, 1999_TC36, p/halley
-mime=<string> Mime type of the results votable | html | text
-output=<string>
or
-out=<string>
Output parameters
(-out is deprecated)
object | basic | obs | all
-loc=<string> Code of the observer location (2) Optional parameter
list of IAU codes
Default: 500 (geocenter)
-refsys=<string> Code to indicate the reference system of coordinates Optional parameter
EQJ2000 (default) | ECJ2000
-from=<string> Word which definite the name of the caller application, or which describes the request any short string (without space)
  1. see the HOWTO section for a full description about how to name targets.
  2. The observer location can be defined by its IAU observatory code or by a particular code (see HOWTO section).

The output parameters are described in the following table and is available in VOTable, HTML or plain text format (cf. examples). The -mime and -output parameters are optionnal and their values can be omitted (just write nothing or &-mime=&-output= without values). In this case, the output is the basic one in VOTable format. The other inputs are mandatory.

.: Web service

The SkyBoT Web service provides methods based on SOAP and HTTP POST verb which allow one to interact between its own application and the SkyBoT services. Here is the useful information to invoke the skybotResolver method:
Web Service URI:
http://vo.imcce.fr/webservices/skybot/skybot.php
Namespace:
http://vo.imcce.fr/webservices/skybot
WSDL:
http://vo.imcce.fr/webservices/skybot/skybot.php?wsdl
SOAP header:
name of the SOAP header element: 'clientID'
SOAP header's content: array('from' => 'YourName', 'hostip'=>'')
Method:
skybotresolver  (inputArray)
- The input parameters of the method is an array which must contained the following parameters:
VariableTypeUnitsLimits or valuesDefaultComment
epoch string - 2411320.0 .. 2469880.0
(1889-11-13 12h .. 2050-03-14 12h)
none Requested epoch, expressed in Julian day, ISO format
or formatted as any English textual datetime
name string - - none Name or number of the target
mime string - votable | html | text votable Mime type of the results
output string - object | basic | obs | all basic Output parameters
observer string - Code of observer location 500 IAU observatory code or particular code
refsys string - Code to indicate the reference system of coordinates EQJ2000 EQJ2000 | ECJ2000
- The output of the method is an object containing the following attributes:
'flag'
the status of the response: flag=1 means that a body has been found; flag=0 means that no body has been found; flag=-1 means that an error occured
'ticket'
the Unix timestamp of the answer which can be useful to stamp the request
'result'
a string containing the ephemeris of the requested solar system body with the following parameters:
No.DefinitionUnitsobjectbasicobsall
1 object number (blank if unnumbered) - x x x x
2 object name (official or preliminary designation) - x x x x
3,4 astrometric J2000 geocentric equatorial or ecliptic coordinates
at the given epoch
α in hms, δ in dms
lon in deg, lat in deg
x x x x
5 class - x x x x
6 visual magnitude - x x x x
7 error on the position arcsec x x x x
8,9 motion on the celestial sphere (Δα'cos(δ), Δδ) or (Δlon cos(lat), Δlat) arcsec/h   x x x
10 geocentric distance AU   x x x
11 heliocentric distance AU   x x x
12 Phase angle degree     x x
13 Solar elongation degree     x x
14..19 mean J2000 heliocentric equatorial or ecliptic vector position and
motion at epoch T0
AU and AU/d       x
20 T0, epoch of the position vector Julien Day       x
- Depending on the selected mime type, the output is formatted as:
votable
the data are written in the IVOA standard VOTable format
html
the data are transformed in a HTML document using a XSLT processing (SkyBoT XSL style sheet)
text
the data are returned in plain text where each block of data is separated by the semi-colon character ';' and each value in a block is separated by the pipe '|' character
- Examples: click on the following links to get the result for epoch=2453384.92153935181, name='Io', observer=500, refsys=EQJ2000 and:
mime=text, out=object
mime=html, out=basic
mime=votable, out=all

.: How to consume:

You have two ways to use the SkyBoT web service: by writting a client to send requests to the SkyBoT 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 SkyBoT web services, we provide some clients written in differents languages. Here are some detailed explanations to see how to write a client with PHP and SOAP which invokes the skybotresolver 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(
    'epoch' => 2453384.92,
    'name' => "ceres",
    'mime' => "html",
    'output' => "basic",
    'observer' => "500",
    'refsys' => "EQJ2000"
);

2/ Define the SOAP options, the namespace and the WSDL URI of SkyBoT web service:

// Enables or disables the WSDL caching feature
ini_set('soap.wsdl_cache_enabled', 1);
// SOAP version
$soapVersion = 'SOAP_1_2';
// SkyBoT namespace
$namespace = 'http://vo.imcce.fr/webservices/skybot';
// SkyBoT WSDL
$uriwsdl = $namespace.'/skybot.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_version'=>$soapVersion));
  // SOAP header
  $header = array('from'=>$from, 'hostip'=>'');
  $client->__setSoapHeaders(array(new SOAPHeader($namespace, 'clientID', $header)));
  // Call the resolver method
  $response = $client->__soapCall('skybotresolver',array($param));
  // Display the results
  if ($param['mime'] == 'text')
  {
    header("Content-Type: text/plain");
    echo "Flag: ".$response->flag."\n";
    echo "Ticket: ".$response->ticket."\n";
    echo "Result: ";
    $res = explode(';', $response->result);
    $nbr = count($res);
    $key = array_keys($res);
    for ($i=0; $i<$nbr; $i++) { echo $res[$key[$i]],"\n"; };
  }
  else
  {
    header("Content-Type: text/xml");
    echo $response->result."\n";
  }
}
catch (SoapFault $fault)
{
  trigger_error("SOAP Fault: {$fault->getTraceAsString()} (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})", E_USER_ERROR);
}