Unscented Kalman Filter with SGP4 Propagator

Hello community,

I am working on setting up a UKF which I will use for orbit determination of real satellite data (I apologize if this is the wrong nomenclature). I am using TLE obtained from celestrack with an SGP4 propagator. I was referred to the following example class:

I am able to follow, but I am a bit at a loss on how to relate to my application. For instance, the example uses ephemeris data for observations, and uses a sigma error to modify them into measurements. In my case, I would directly obtain the measurements every 8 hours or so (when a new TLE is received), meaning I would have limited data, and not in the form of ephemeris data. Similarly, the example uses a regular integrator as a propagator, while I use SGP4 which is a different object than other integrators.

I apologize if this is vague and a bit generic, but I could use a helping hand on how to apply the example to my specific case. Any help would be greatly appreciated. Thank you!

EDIT: I moved the example to my own class within my project for testing purposes and I was met with a plethora of errors. Some showing incorrect inputs to Orekit functions, some missing orekit imports that cannot be located, and non-existant Orekit methods and classes. Is this example done on the latest version? I downloaded the binary package for 11.3.3 from this website and moved the file somewhere in my project root: Orekit – Downloads

Hi @francoC,

Sorry for the delay.

Kalman filters should work with a TLE propagator.

Not sure I understand. Are the “real satellite data” you are talking about the TLEs from Spacetrack?
In that case why not simply use the new TLE instead of trying to use it in a Kalman?
I’m not sure I’m seeing the point.

However, if you really want to do that then you should probably use your new TLE as a PV measurement or as a series of PV measurements that you will use in your Kalman.

The example on master branch should be compatible with 11.3.3 yes.
However, the link you provided points to “site-orekit-latest”. It should be alright but maybe you should try downloading from there.
If you’re still experiencing problems we can probably walk you through them but we’ll need a bit more context.

Cheers,
Maxime

Hi all!
Unscented Kalman Filter is compatible with TLE propagator since 12.0 (See #1123). So, it will not work with 11.3.3.

Bryan

Bryan,

Could you point me to the download for that Orekit version? I can’t seem to find it

Maxime,

Thank you for the reply. I like your idea of using TLE as a simple PV measurement. I am talking with Bryan in this thread about using the TLE propagator with the UKF, hopefully it is possible.

Regarding my issues with the example, I’ve yet to take a look, but I’ll investigate and get back to you on exactly what libraries/imports I am missing. I am horrible with this aspect of JAVA.

Franco

Hi Franco,

Bryan is referring to the upcoming Orekit 12, at the moment only available in non-definitive form via cloning the develop branch. It should be released within a few weeks, but before that it won’t be available as a jar on Maven central.

Best,
Romain

Romain,

Thank you for the response. So would I have access to these updated methods prior to release? Otherwise I would need to find a way to use my matlab script in java (intelliJ IDEA), and I haven’t found a way to do it yet.

You can check out the develop branch of Orekit. Run a mvn clean install at the root of the project. And use the .jar generated (located in your .m2 folder in org/orekit/12.0-SNAPSHOT) in your Matlab script

Brian,

Thank you for your reply. Do you think you could walk me through that process? I am not familiar with JAVA enough to understnad how to do that.

Thank you,
Franco

yes, that’s somthing easy

  1. Go to git/orekit folder
  2. Run “mvn clean install”
  3. The generated .jar will be located in the .m2/ folder
  4. Move the jar where you want
  5. Orekit Tutorials – Integration in other languages

Just note that the tutorial in 5. uses an old Orekit version. But the idea is the same

Best regards,
Bryan

Bryan,

I think I might have not been clear. I am actually trying to run my matlab script within JAVA, not the other way around. However, as I have been thinking about it, this will be complicated to do as I need to somehow converte the PV coordinates back into a TLE in order to propagate using SGP4, which I don’t have implemented in my matlab script and am not sure how to do.

Instead, I’m going to focus on trying to obtain the current development version to use the UKF with TLEPropagator objects in JAVA. I have found the develop branch here but I am not sure how to use the updated library in my current project.

Thank you for your help.
Franco

Maxime,

While I try to figure out using UKF with the SGP4 propagators, I have gone back to learn about the methods and objects relevant to this. Regarding the tutorial example on my original post and what I mentioned about some imports giving me an error. The following are the imports not being found:

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.orekit.Utils;
import org.orekit.attitudes.FrameAlignedProvider;
import org.orekit.files.rinex.HatanakaCompressFilter;

The top 2 I presume are not related to orekit. However, I am confused why the remaining 3 are not being found, as I have the latest version installed. I guess this issue goes more into the JAVA programming/project managing rather than orekit. Any help on this?

Thank you,
Franco

You can do it easily with Orekit :slight_smile:
You can call TLE.stateToTle() method.
The first argument of this method is a SpacecraftState. You can build it using you PV
The second argument is a TLE template. It is used for the get the satellite identifiers (NORAD id, etc.). So you can intialize the keplerian parameters to 0.0 because they will he computed using the given SpacecraftState.

Hi @francoC,

The “tutorial” you linked in your first post is in reality a “test” class in the test suite of Orekit.

That’s why you have these:

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

This one, import org.orekit.Utils; is an internal class of the tests. So you’ll need to add the test suite “src/test/java” of Orekit to your class path if you want to use it.

These 2 are API changes made in preparation for version 12 of Orekit.
If your program does not understand them it means that the version of Orekit it uses is not the “develop” version (i.e. the future version 12).

Hope this helps,
Maxime

Maxime,

That makes sense. I downloaded the develop branch to a separate project and those errors are gone, so that makes sense based on what you said. Based on what Bryan has mentioned in this thread, I might attempt to load in orekit into matlab until version 12 is released. I am building a more automated system that takes in TLEs, uses the UKF, copmutes events, and outputs those events. I will make sure to add my thesis to the thread with published works using orekit when this is done.

Thank you for all your help, this is by far the most challenging feature I have worked on.

Franco

1 Like

Bryan,

In that case I may work on matlab until the new orekit version is released. Alternatively I could translate my matlab code into java and make my own function, I am still debating that.

Thank you,
Franco

Wow that would be great! :star_struck:

1 Like

Bryan,

I’m having some issues importing orekit. So I realized that I don’t need my specific methods to run the UKF I built in Matlab, only the Orekit functions stateToTLE and TLEPropagator, as well as their respective implementations where necessary. So I am trying to import only the orekit-11.3.3.jar file.

I added the .jar to the same directory as my .m script with "javaaddpath ‘…\orekit-11.3.3.jar’. I then run the following lines as per the instructions on the forum…

import org.orekit.data.DataProvidersManager.*
import org.orekit.data.ZipJarCrawler.*

DM=org.orekit.data.DataProvidersManager.getInstance();
crawler=org.orekit.data.ZipJarCrawler(‘orekit-data.zip’);
DM.clearProviders();
DM.addProvider(crawler);

However, I get an error on the first line saying Matlab cannot resolve “org.orekit.data.DataProvdersManager.getInstance”, am I doing something wrong?

PS: I also have the orekit-data.zip file in the same directory, however the error happens beforehand.

Thank you,
Franco

The Orekit’s Matlab tutorial is outdated. We shall update it according to Orekit last APIs.
What you can do is:

DM=org.orekit.data.DataContext.getDefault().getDataProvidersManager();
crawler = org.orekit.data.DirectoryCrawler(File(['c:\Your\Path\To\The\Unzipped\orekit-data-master\']));
DM.clearProviders()
DM.addProvider(crawler)

Thank you Bryan. It seems I also need the hipparchus jar in that path, specificaly it is asking for org.hipparchus.exception.Localizable in order to use the getDataProvidersManager() method. Would hipparchus be a library like Orekit, or is it an import from that same jar?

Thank you,
Franco