vOs4OVirtual Observatory Solar System Scaling Service for Outreach

The SolarSystemat Scale

Presentation

If the Sun was a soccer ball, how big would the Earth be? How far would Jupiter be? How big should the planets be for the solar system to fit in my backyard? My schoolroom?

VOS4O offers a simple solution to scale our solar system. From a reference (diameter, distance, or scale), VOS4O lists the diameters and distances scaled for all planets, the eccentricity of their orbit, and their respective positions around the sun at a given date (heliocentric longitude).

How to?

How To?

To compose your solar system, use the online form or directly query the service through its API. The results are returned as a table and two images.

Form

The online form presents, by default, the diameters and distances of planets scaled such that the distance Earth-Sun equals 1 metre. Their respective positions around the Sun are also calculated for the current date (mean heliocentric longitudes). To change the scale or to change the date, deploy the  set parameters tab and define your solar system by setting the following parameters:

Scale
Distance
Allows to define the scale to the given value of the distance of the chosen planet. For example, if the unit parameter is set to metre then the scale 7.22 for the distance of Neptune allows to compose a solar system in which the distance Sun – Neptune equals 7.22 meters.
Diameter
Allows to define the scale to the given value of the diameter of the chosen planet. For example, if the unit parameter is set to metre then the scale 1 for the diameter of the Earth allows to compose a solar system in which the diameter of Earth equals 1 meter.
Proportion
Allows to specify an X/Y multiplier to apply to all units of length. For example, the 1:1000000 scale (one millionth) allows to divide the distances and diameters of planets by one million.
Unit
Allows to specify the unit of length of the scaling to: astronomical unit (149,597,870 km), kilometer, metre, centimeter, millimeter.

To set the optional parameters, clic on the button ...:

Adjust units
Allows to automatically change the unit of distances and diameters when the values are too small or too large relatively to the selected scale and unit. For example, a length of 1234 meters will be written 1.23 kilometers, and a length of 0.123 meter will be written 12.30 centimeters.
Multiply diameters by
Allows to use two different scales between distances and diameters. The diameters are multiplied by the given value if the selected scale is distance or proportion.
Divide distances by
Allows to use two different scales between distances and diameters. The distances are divided by the given value if the selected scale is diameter.
Date
Allows to specify the date of calculation of the respective positions of the planets around the Sun (heliocentric longitudes). Click the Date or Time entry box to open the date or time selector, or enter a date in the ISO 8601 format rounded to the minute.
Language
Allows to define the language of results.

Click on the Apply button to scale the solar system according to the provided information. At the end of calculation, the table of values and the images are automatically displayed.

To download the results, deploy the  download results tab. To download an image, select the desired format (SVG, PNG, PDF, TIFF), then click the Download image button. To download the table, select the desired format (CSV, VOTABLE), then click the Download table button.

API

The API (Application Programming Interface) allows you to query VOS4O directly from a third-party application or software. It is therefore possible to create a personal Web page for scaling the solar system, but also to script the queries to retrieve the generated table and images in a dedicated program. Read more ...

API - Web Service

About

The API (application programming interface) allows to query directly VOS4O from your own software. You can use it to create your own Web page to scale the solar system, or script the queries and retrieve the table and images generated. Two methods are available to query the service:

  • HTTP request : simply query the service through a non-interactive Internet download software such as wget, curl or a Javascript object XMLHttpRequest..
  • Web Service : query the servive through its Web Service (WS) based on SOAP+WSDL+HTTP protocols.

Using the API is free (as in freedom) and free of charge for any non-profit usage (personal or educational). We highly recommand to contact us if you develop an application using VOS4O service to receive informations on updates.

Please use our bug tracker to report any bug or request new functionalities.

Definition of the scale

There are three ways to define the scale :

x:y
to define a multiplying coefficient X/Y to apply to every single length. For instance, the scale 1:1000000 (a millionth) will divide by one million all the planet distances and diameters.
a(planet):x
to set the scale such as the distance of the planet equals x. For instance, if the parameters unit=m (meter), then the scale a(neptune):7.22 will create a view of the solar system in which the distance Sun – Neptune is 7.22 metres.
d(planet):x
to set the scale such as the diameter of the planet equals x. For instance, if the parameter unit=m (metre), then the scale d(earth):1 will draw a solar system in which the diameter of the Earth equals 1 meter.

Description of the output table and images

The output table generated by VOS4O lists the diameter of the Sun and the planets and the distance between the planets and the Sun, set to the chosen scale. The orbital eccentricity of the planets, and their mean heliocentric longitudes (in degrees) at the requested epoch, are also reported.

The first image generated by VOS4O represents the solar system set to scale, according to the defined parameters. The planets are drawn along an axis in logarithmic scale at their correct relative distance. Next to each, it diameter and distance to the Sun (set to scale) are reported.

The second image represent the solar system as seen from above. Each planet is located on its orbit at its mean heliocentric longitude, computed at the requested epoch. The reference for the longitudes is the mean vernal point (or mean equinox), represented by the γ symbol.

HTTP request

With a non-interactive Internet software such as wget, curl, or with an Internet browser, call the service through its HTTP access point

https://ssp.imcce.fr/webservices/vos4o/scale.php?[parameters]

in which [parameters] is a list of parameters (defined in table 1) separated by the & symbol. If not any parameter is set, the service sets the solar system with the default values listed in table 1.

Table 1 : Parameters for HTTP requests
ParameterDefinitionFormat
-scale=<string> Set the scale of the solar system. Default: 1:1 X:Y or a|d(planet):x
-autoscale=<int> Automatically change the unit of distances and diameters whenever the values are too small or too large with respect to the selected scale and unit. Default: 1* 0 or 1
-scalefactor=<double> Multiply diameters by this value if the scale is set by X:y or a distance, or divide distances by this value is the scale is set by a diameter. Default: 1.0 > 0.0
-unit=<string> Define the length unit for the scaling: astronomical unit, kilometer, meter, centimeter, millimeter. Default: au au, km, m, cm, mm
-lang=<string> Set the output language. Default: en-us de-de, el-el, en-us, es-es, fi-fi, fr-fr, hi-hi, it-it, pl-pl, pt-pt, ro-ro, zh-hans
-mime=<string> Set the MIME type of results. Default: html html, votable, text/csv, text
-date=<string> Set the epoch (ISO 8601 format) to compute heliocentric longitudes. Default: now now, aaaa:mm:jj hh:mi:ss

* If the MIME type is VOTABLE, the autoscale parameter is set to 0 regardless to its value.

The result of a HTTP request consists in a table and two images, formated in HTML, VOTable/XML or simple text accordingly to the specified MIME type (-mime parameter).

Examples of requests :

Web service

The VOS4O service can be queried through a Web Service based on the SOAP+WSDL+HTTP protocoles allowing for a direct interaction between your own application and the service.

Web Service URI :
https://ssp.imcce.fr/webservices/vos4o/vos4o.php
Namespace :
https://ssp.imcce.fr/webservices/vos4o
WSDL:
https://ssp.imcce.fr/webservices/vos4o/vos4o.php?wsdl
SOAP header:
Name of the SOAP header : clientID
SOAP header : array('from' => 'NomProjet', 'hostip'=>'')
Method :
scale (inputArray)

Input parameters

The input parameters of the scale methods are grouped in a table and must define the variables described in table 2.

Table 2 : Description of the variables of the 'scale' method
ParameterTypeDefinitionDefaultValue
scale string Set the scale of the solar system 1:1 X:Y or a|d(<p>):x
autoscale boolean Automatically change the unit of the distances and diameters whenever their values are too small or too large with respect to the specified scale and unit. true* true | false
scalefactor double Multiply diameters by this value if the scale is set by X:y or a distance, or divide distances by this value is the scale is set by a diameter 1.0 > 0.0
unit string Unit of length for the scaling au au, km, m, cm, mm
lang string Language of the outputs en-us de-de, el-el, en-us, es-es, fi-fi, fr-fr, hi-hi, it-it, pl-pl, pt-pt, ro-ro, zh-hans
mime string MIME type of results html html, votable, text/csv, text
epoch string Epoch of computation (ISO 8601 format) for the heliocentric longitudes now now, yyyy:mm:dd hh:mm:ss

* If the MIME type is VOTABLE then the autoscale parameter is forced to false regardless its value.

Output parameters

The results of the 'scale' method is an object with the following attributes :

'status'
status of the answer, based on HTTP codes : 200 = ok, 400 = bad request, 404 = not found, 500 = internal error.
'ticket'
Timestamp of the answer.
'result'
A string containing the result table and the images of the solar system set to scale.

MIME type

According to the selected MIME type, the answer is provided in the following format :

votable
data are written in a XML document following the VOTable standard of the IVOA
html
data are written in a HTML5 document
text
data are written in a plain text document.

How to?

There are two ways to use the scaling service : by writting a client to send a request to the VOS4O server and receive and exploit the answer, or through a Web browser or a data transfert software such as curl or wget. In such a case, you should excecute in a terminal :

$> curl "<URL>"

or

$> wget "<URL>"

in which <URL> is described in the HTTP request section.

To write a software requesting the VOS4O service, choose a language which implements the communication protocol SOAP. We provided here an example written in PHP:

1/ Set the input parameters of the service:

// Client's ID: provide the name of your project or organisation
                $from = 'MyName';
// Input parameters
$param = array('scale' => 'd(Terre)=1.0',
               'autoscale' => true,
               'scalefactor' => 1.0,
               'unit' => 'm',
               'axis' => 'log',
               'lang' => 'en-us',
               'mime' => 'html',
               'epoch' => 'now');

2/ Set the SOAP parameters, the namespace, and the URI of the service WSDL :

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

3/ Instantiate the SoapClient object, set the SOAP header, and call the method (while dealing with exceptions) :

try {
  // Instantiate the client
  $client = new SoapClient($uriwsdl, array('exceptions'=>1));
  // SOAP header
  $header = array('from'=>$from, 'hostip'=>'');
  $client->__setSoapHeaders(array(
     new SOAPHeader($namespace, 'clientID', $header)
  ));  
  // Call the resolver method
  $response = $client->__soapCall('scale',array($param));
  // Display the results
  if ($param['mime'] == 'text') {
    header("HTTP/1.0 ".$response->status);
    header("Content-Type: text/plain");
    $res = split(';', $response->result);
    $nbr = count($res);
    $newkey = array_keys($res);
    for ($i=0; $i<$nbr; $i++) { echo $res[$newkey[$i]].PHP_EOL; };
  } else if ($param['mime'] == 'html') {
    header("HTTP/1.0 ".$response->status);
    header("Content-Type: text/html");
    echo $response->result;
  } else {
    header("HTTP/1.0 ".$response->status);
    header("Content-Type: text/xml");
    echo $response->result.PHP_EOL;
  }
} catch (SoapFault $fault) {
  trigger_error("SOAP Fault: {$fault->getTraceAsString()} 
      (faultcode: {$fault->faultcode}, 
       faultstring: {$fault->faultstring})", E_USER_ERROR);
}

Credits

Concept : B. Carry (OCA)
Realization : J. Berthier (IMCCE)
Webdesign : Y. Gominet (IMCCE)

Translations:

Do not hesitate to contact us to propose a translation into your language.

This service of scientific outreach is free of law for any non-commercial use (see Legal Notice). The figures of the solar system at scale are made available under the Creative Commons BY-NC-SA 2.0 France license.

This service is developed and maintained by the Service des éphémérides of the IMCCE, and the TOP team of the Lagrange laboratory of the Observatoire de la Côte d'Azur, with the technical and financial supports of the Observatoire de Paris, the Centre National de la Recherche Scientifique (CNRS), and the Ministère de l'Education Nationale.

Sources of numerical data:

For more information, refer to the book Introduction aux éphémérides astronomiques, Supplément explicatif à la Connaissance des temps, EDP Sciences, 1998.

Sources of images:

  • Background image: original creation by Y. Gominet.
  • Background image for medias ≤ 1025px: qygjxz.com, retouched by ourself.
  • Textures of the planets:
    • Mercury: Messenger, NASA/Johns Hopkins University Applied Physics Laboratory/Carnegie Institution of Washington.
    • Venus: Mariner 10, Mattias Malmer / NASA.
    • Earth: Meteosat-2 Earth image, ESA.
    • Mars: HST, S. Lee (University of Colorado), J. Bell (Cornell University), M. Wolff (Space Science Institute), and NASA.
    • Jupiter: HST, NASA/ESA/A. Simon (Goddard Space Flight Center).
    • Saturn: Voyager 1, NASA/JPL.
    • Uranus: Voyager 2, NASA/JPL-Caltech.
    • Neptune: Voyager 2, NASA/JPL.

Fonts made from:

Set parameters
Download results

Choose parameters

 

Choose result formats

Choose parameters and apply...
Figure of the solar system at scale
Figure of the top view of the solar system