OHM TLE Scenario Generator

Just in time to set up ISS for tomorrow's Cygnus launch.

Edit:
First of all, it is not working at all for me, so I have not been able to try it. I have .NET Framework 4.5. I suspect perhaps that my virus program is blocking it.

Anyway-
I read in the manual that there is a 50-100 km error.

Are you using the SGP4/SDP4 orbital model to propagate from the TLE Epoch up (or back) to the simulation time, or are you just copying over each element from the TLE into Orbiter as is. The latter is a no-no, see the Celestrak FAQ #5:
https://celestrak.com/columns/v04n05/index.asp#FAQ05

I recommend that you check out Ajaja's Scenario Editor TLE: [ame="http://www.orbithangar.com/searchid.php?ID=2617"]Scenario Editor TLE[/ame]

Being able to automatically sync with the Celestrak databases would be useful, but if you aren't using SGP4/SDP4, then I am going to stick with Ajaja's solution.
 
Last edited:
Just in time to set up ISS for tomorrow's Cygnus launch.

Edit:
First of all, it is not working at all for me, so I have not been able to try it. I have .NET Framework 4.5. I suspect perhaps that my virus program is blocking it.

Anyway-
I read in the manual that there is a 50-100 km error.

Are you using the SGP4/SDP4 orbital model to propagate from the TLE Epoch up (or back) to the simulation time, or are you just copying over each element from the TLE into Orbiter as is. The latter is a no-no, see the Celestrak FAQ #5:
https://celestrak.com/columns/v04n05/index.asp#FAQ05

I recommend that you check out Ajaja's Scenario Editor TLE: Scenario Editor TLE

Being able to automatically sync with the Celestrak databases would be useful, but if you aren't using SGP4/SDP4, then I am going to stick with Ajaja's solution.
For now, elements are converted from the TLE into an Orbiter readable format. So, Orbiter performs the propagation and calculations, but from what I wrote, it seems that Orbiter only linearly propagates the position.

I thought about it since I wrote on it, and started writing an implementation of SGP4/SDP4 (which I'm gonna stop since I just found a C# implementation all ready, I just have to include that), and it's coming on a future version, but for now, Orbiter handles the propagation.

As for you not being able to even open it... That's rather bizzare. But I have an idea as of why that might be.

---------- Post added at 15:36 ---------- Previous post was at 15:31 ----------

Being able to automatically sync with the Celestrak databases would be useful, but if you aren't using SGP4/SDP4, then I am going to stick with Ajaja's solution.

That could be a good idea, like something that updates scenarios right as you launch Orbiter. But this is beyond the scope of this project here.
 
On the application not opening issue: Please try to download this version in which I added verbose logging.
 

Attachments

Code:
***************************
 *  TLE Scenario Generator *
 *   Log file: 12/6/2015  *
 ***************************

[6:33:06 AM] Starting application
[6:33:06 AM] Settings.Load()
[6:33:06 AM] [ERROR] Instance is read-only.
[6:33:06 AM] [ERROR]    at System.Globalization.CultureInfo.set_NumberFormat(NumberFormatInfo value)
[6:33:06 AM] [ERROR]    at TLEOrbiter.Program.Main()
[6:33:06 AM] [ERROR] Fatal error, terminating...
 
Now that is interesting. Never is being said that CurrentCulture is read-only.
That makes is that much difficult to control the locale and the parsing of numbers (them being localized too, because why the hell not)
 
So this having generated some interest again, I remembered it was still a WIP... :uhh:

For the next release I'm obviously gonna use SGP4/SDP4 to propagate orbital data (which will cause it to bump the version by a major release since it's technically a breaking change (it makes it impossible to use the system date anymore since we'll have to enter a date to propagate the data to), even though there's no API...).

But I've also thought of a way about the generation of the scenario itself - and instead of having a general 'catch-all' solution I was rather thinking about a small plugins system that would handle the ship data part of the scenario generation.

It would go this way:
- A UserControl that would be displayed on the window where anything could be displayed to input data
- Return a OrbVessel in return that will contain all the relevant data about the ship for the scenario. It's essentially a set of KeyValuePair<string, string> on top of the basic data like fuel levels, docking info, etc.

This way theoretically any vessel could be linked to a TLE data and be functional straight up.

I'm wondering about the potential risks of exposing a whole Control through and API, but it seems a good middle ground.
 
SDP4/SGP4 integration is there, barely working, but there. I've decided that instead of including it in the program, I'd include it in my scenario generation library AOSP.

For the plugin system, I've changed my mind a bit, and instead the plugin will interface with the app with two functions:
- "SetUserInput" will ask for a Dictionary with key names and values defined from an enum - those are the custom parameters that will be displayed.
- "ProcessUserData" will transmit the user input through another Dictionary with the same key names, and is up to the plugin to process and add into the scenario through AOSP.OrbVessel and OrbVessel.Extra for the extra lines.

The plugin system works this way (this is a generic plugin that will be included as a "catch-all" situation) :
PHP:
public class OrbVesselGeneric: IOrbVesselPlugin
{
    public PluginMetadata Metadata => new PluginMetadata()
    {
        Author = "SolarLiner",
        Name = "Generic OrbVessel input plugin"
    };

    public bool PreventUserFromEnteringName => false;

    public Guid UID => Guid.Parse("{95B05482-6887-498A-B6CA-EC6D57002E1A}"); // Guid.NewGuid() could also work, but I prefer a static property.

    public string VesselAuthor => string.Empty;
    public string VesselClassName => string.Empty;
    public string VesselName => "Generic";

    public OrbVessel SendOrbVesselData(IOrbVesselContext context)
    {
        var v = context.Vessel;
        v.Fuel = (float)(double)context.InputData["Fuel level"];
        v.VesselClass = (string)context.InputData["Class Name"];

        var extra = new Dictionary<string, string>();
        double xpdr = (double)context.InputData["Transponder (kHz)"];
        xpdr = (xpdr - 108.0) * 20.0;
        extra.Add("XPDR", Math.Round(xpdr<0? 0 : xpdr).ToString());

        return v;
    }

    public Dictionary<string, OrbVesselScenarioDataType> SetOrbVesselInput()
    {
        Dictionary<string, OrbVesselScenarioDataType> dic = new Dictionary<string, OrbVesselScenarioDataType>();
        dic.Add("Class Name", OrbVesselScenarioDataType.STRING);
        dic.Add("Transponder (kHz)", OrbVesselScenarioDataType.DOUBLE);
        dic.Add("Fuel level", OrbVesselScenarioDataType.PERCENTAGE);

        return dic;
    }
}


---------- Post added at 17:48 ---------- Previous post was at 16:30 ----------

Success!
s2pcNPF.jpg


After trying to convert the Pos/Vel data straight into the scenario and ending with ships inside the Earth, I saw that the data was in kilometers, and Orbiter treats vectors in meters.

Needless to say, the ISS appears to be at the right place... just not in the right position. Inclination seems slightly wrong, and its going in the wrong direction... :uhh:
AdPZBLM.jpg
 
Code:
***************************
 *  TLE Scenario Generator *
 *   Log file: 12/6/2015  *
 ***************************

[6:33:06 AM] Starting application
[6:33:06 AM] Settings.Load()
[6:33:06 AM] [ERROR] Instance is read-only.
[6:33:06 AM] [ERROR]    at System.Globalization.CultureInfo.set_NumberFormat(NumberFormatInfo value)
[6:33:06 AM] [ERROR]    at TLEOrbiter.Program.Main()
[6:33:06 AM] [ERROR] Fatal error, terminating...

I have tried both your patches but got the same Error as above.
Any idea on how to fix this?

Thanks
 
The original O-H .exe crashes, but it works with the version above. It's too bad it can't load a local file.
 
Back
Top