% orekitNumPropTest.m
%
% Last modified: 3 Mar 2022
%--------------------------------------------------------------------

close all
clear;

%Add paths to .jar files
javaaddpath(fullfile('hipparchus-core-2_0.jar'));
javaaddpath(fullfile('hipparchus-filtering-2_0.jar'));
javaaddpath(fullfile('hipparchus-fitting-2_0.jar'));
javaaddpath(fullfile('hipparchus-geometry-2_0.jar'));
javaaddpath(fullfile('hipparchus-ode-2_0.jar'));
javaaddpath(fullfile('hipparchus-optim-2_0.jar'));
javaaddpath(fullfile('hipparchus-stat-2_0.jar'));
javaaddpath(fullfile('orekit-11_1.jar'));

% From java
import java.lang.Math;
import java.lang.System;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.TimeZone;
import java.io.File;

% From the Hipparchus Math Project
import org.hipparchus.geometry.euclidean.threed.*;
import org.hipparchus.util.*;
import org.hipparchus.ode.nonstiff.*;

% From the ORbit Extrapolation KIT
import org.orekit.attitudes.*;
import org.orekit.bodies.*
import org.orekit.data.*;
import org.orekit.data.DataProvidersManager.*;
import org.orekit.data.ZipJarCrawler.*;
import org.orekit.errors.*;
import org.orekit.forces.*;
import org.orekit.forces.drag.*;
import org.orekit.forces.gravity.*;
import org.orekit.forces.gravity.potential.*;
import org.orekit.forces.maneuver.*;
import org.orekit.forces.maneuver.ImpulseManeuver.*;
import org.orekit.forces.radiation.*;
import org.orekit.frames.*;
import org.orekit.orbits.*;
import org.orekit.orbits.Orbit.*;
import org.orekit.orbits.OrbitType.*;
import org.orekit.orbits.PositionAngle.*;
import org.orekit.propagation.*;
import org.orekit.propagation.analytical.*;
import org.orekit.propagation.events.*;
import org.orekit.propagation.events.NodeDetector.*;
import org.orekit.propagation.numerical.*;
import org.orekit.time.*;
import org.orekit.tle.*;
import org.orekit.utils.*;

%Here is where things change in the setup
DM=org.orekit.data.DataContext.getDefault().getDataProvidersManager(); %Works for v11.1
%DM      = org.orekit.data.DataProvidersManager(); %throws error foe v11.1
crawler = org.orekit.data.DirectoryCrawler(File(['c:\Your\Path\To\The\Unzipped\orekit-data-master\']));
%crawler = org.orekit.data.DirectoryCrawler(File([cd ,'\OrekitData\']));

DM.clearProviders()
DM.addProvider(crawler)
