[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orekit Users] Propagation Tutorial



Hello,

I think you just need to add the path to the "orekit-data.zip" file which contains the delta between TAI and UTC.
At the beginning of your main, add something like:

System.setProperty("orekit.data.path", "XXX/orekit-data.zip");

where XXX is the path to your orekit-data.zip file

Christophe


2018-05-30 14:52 GMT+02:00 Montemayor Mancias, Javier <Javier.Montemayor.Mancias@emi.fraunhofer.de>:

Dear Orekit Team,

 

my name is Javier Montemayor, I am an intern at Fraunhofer Institute for High-Speed Dynamics. I am currently interested in using the Orekit library for a project that we’re working on. However, the tutorials seem to skip some essential code and I am finding myself with some difficulties trying to get it working. I am doing the propagation tutorial, but I get an exception on the line where it calls TimeScalesFactory.getUTC();

 

I would really appreciate some help as in what is required to get the library running without (unexpected) issues.

 

I’ve copied the code I used at the end of this email (I have some console indicators to detect where the error happened).

 

Sincerely,

Javier Montemayor

 

import org.orekit.frames.*;

import org.orekit.time.*;

import org.orekit.orbits.*;

 

public class Test {

  public static void main(String args[]) {

    try {

      System.out.println("Setting up inertial frame...");

      Frame inertialFrame = FramesFactory.getEME2000();

     

      System.out.println("Setting up initial state...");

      TimeScale utc = TimeScalesFactory.getUTC(); // Throws exception

      System.out.println("UTC done.");

      AbsoluteDate initialDate = new AbsoluteDate(2004, 01, 01, 23, 30, 00.000, utc);

      System.out.println("Initial date done.");

     

      double mu =  3.986004415e+14;

     

      double a = 24396159;                 // semi major axis in meters

      double e = 0.72831215;               // eccentricity

      double i = Math.toRadians(7);        // inclination

      double omega = Math.toRadians(180);  // perigee argument

      double raan = Math.toRadians(261);   // right ascension of ascending node

      double lM = 0;                       // mean anomaly

     

      System.out.println("Setting up orbit...");

      Orbit initialOrbit = new KeplerianOrbit(a, e, i, omega, raan, lM, PositionAngle.MEAN,

                                              inertialFrame, initialDate, mu);

     

      System.out.println("Done.");

    } catch (Exception e) {

      System.out.println("Error.");

    }

  }

}