How to start ?

  • After having played with our orbit determination and visibilities demos and before diving into our reference pages, you may wish general information about the use of ORaas REST API.

    ORaaS exposes a set of web services to external applications and web sites. It is a way to access Flight Dynamics System functionalities without having to interact directly with the low level library Orekit.

    To consume a web service means to send an HTTP request to the server. ORaaS then performs and sends back a response satisfying the protocol. There are many free software packages available for managing request/response cycles, we just provide information and examples to help ORaaS users. Please, note that we do not endorse nor support any particular application.

    The easiest way to call a web service is to write its URL in your browser address bar. For example, if you want to know the UTC-TAI offset value when Neil Armstrong planted the first human foot on the Moon, you can send a GET request to ORaas by typing in your Web browser:

    https://oraas.orekit.space/date-time/duration?json={"fromDate": "1969-07-21T02:56",
                 "fromTimeScale": "UTC","toDate": "1969-07-21T02:56","toTimeScale": "TAI"}


    If you thought that the offset was an integer, please ask to Orekit...

    More seriously, we will now give you other methods to dialog with the ORaaS server.

  • The console application CURL allows you to send any HTTP request in a command line. Most of the API services expect a simple GET method with one parameter in JSON format.

    ORaaS orbit determination services require you to authenticate in a cookie named "guid". The following example retrieves the list of the runs associated to a user "auth000". Note that currently, no check is made server side concerning your identifier. It may be unique to ensure the safety of your data.

    curl --cookie "guid=auth000" https://oraas.orekit.space/od/runs
  • To consume a web service from your own web pages, you may choose javascript/AJAX. Below is an example which calls the ORaaS Translate TLE service to display the date of a TLE:

    function displayTleDate(form){	
      // retrieve the begin date from the tle
      var tle = {};
      tle['line1'] = form['tle1'].value;
      tle['line2'] = form['tle2'].value;
      var ttler = {};
      ttler['tle'] = tle;
      var url = "https://oraas.orekit.space/tle/translate?json=" + encodeURIComponent(JSON.stringify(ttler));
      var req = new XMLHttpRequest();
      req.open("GET",url,true);
      req.onreadystatechange = function () {
        if (req.readyState == 4) {
          var values = JSON.parse(req.responseText);
          window.alert(values['tleDate']);
          req = null;
        }
      };
      req.setRequestHeader("Accept", "application/json");
      req.send(null);
    }

    Please note that such an Ajax request is forbidden by the same-origin security policy. You may contact us to get any authorization header.

  • You may be at ease with Python.

    The following example links services together to get the azimut and elevation of an object from its cartesian coordinates in a pseudo-inertial frame.

    import json
    import urllib.request
    itrf = "CIO/2010-based%20ITRF%20simple%20EOP"
    point = {"lat":0.761,"lon":0.025,"alt":150,"ecefFrameName":itrf}
    date = "2019-03-12T00:00:00"
    params = {
    	"date":date,
    	"timeScale":"UTC",
    	"pvCoordinates":{
    		"px":-4556412.23,"py":760212.52,"pz":4384932.89,
    		"vx":762.5,"vy":-1474.4,"vz":55.4
    	},
    	"inputFrame":{"frameName":"EME2000"},
    	"outputFrame":{"topocentricFrame":{"origin":point}}
    }
    conn = urllib.request.urlopen("https://oraas.orekit.space/frame/convert-pv?json=" 
    	+ json.dumps(params, separators=(',', ':')))
    response = conn.read()
    result = json.loads(response)
    
    params2={
    	"date":date,
    	"timeScale":"UTC",
    	"position":{
    		"cartesian":{
    			"x":result["px"],
    			"y":result["py"],
    			"z":result["pz"],
    			"frame":{"topocentricFrame":{"origin":point}}
    		}
    	},
    	"azElOutputTopocentricFrame":{"origin":point}
    }
    conn2 = urllib.request.urlopen("https://oraas.orekit.space/position/convert?json=" 
    	+ json.dumps(params2, separators=(',', ':')))
    response2 = conn2.read()
    result = json.loads(response2)
    print (result["azEl"])
  • Maybe you prefer java which is a typed language. Click here to download a zip file in which you will get:

    • Our example which links conversions,
    • An extra example which creates an orbit determination run,
    • The classes used to parse your requests.