Project Heavens traffic proof-of-concept

Artlav

Aperiodic traveller
Addon Developer
Beta Tester
Joined
Jan 7, 2008
Messages
5,790
Reaction score
780
Points
203
Location
Earth
Website
orbides.org
Preferred Pronouns
she/her
Proof of concept satellite traffic module (Update info in post #17):
[ame="http://www.orbithangar.com/searchid.php?ID=3868"]Heavens traffic 090405[/ame]
heavens_1.jpg


Will read TLE elements from <orbiter root>\traffic.tle file, and put the satellites into the simulation at run-time when focused vessel approaches closer than 10Km.
Also, any specific satellite could be added thru an MFD.
Good source of TLE's:
http://celestrak.com/NORAD/elements/

Current limitations:
*Slows down the sim, need to improve approach detection for 1000+ satellites
*Cannot remove satellites
*Cannot detect already added satellites
*All added sats use same default Carina mesh

This is only a proof-of concept version, so ideas about what to do out of it are welcome.
Bug reports too.

A question for more experienced orbital math people - how can i quickly check for distance-to-focus-is-close-enough against something like 1000-10000 satellites TLE elements?
 
Last edited:

dbeachy1

O-F Administrator
Administrator
Orbiter Contributor
Addon Developer
Donator
Beta Tester
Joined
Jan 14, 2008
Messages
9,217
Reaction score
1,564
Points
203
Location
VA
Website
alteaaerospace.com
Preferred Pronouns
he/him
This sounds cool!!! :speakcool:

Regarding performance, one thing you can do is just recalculate the distance for a fraction of the total number of vessels each frame, iterating through the vessel list over a reasonable number of frames (or length of time). In other words, just recompute any given vessel's distance ten times a second or so instead of a once each frame. The user wouldn't really notice a difference, but it would make a noticable performance difference, particularly when the user has a high framerate.

For example, let's say there are 100 vessels and the code is set to update vessel distances at the rate of 1000 vessels per second (one vessel per millisecond):

First 10 milliseconds: recompute distance to vessels 1-10.
Second 10 milliseconds: recompute distance to vessels 11-20.
Third 10 milliseconds: recompute distance to vessels 21-30.
...and so on until all vessel distances have been updated. Then it starts at vessel 1 again.

This would keep the framerate more consistent as large numbers of vessels are added, at the expense of lower distance refresh rates. So with only 100 vessels any given vessel's distance would be refreshed ten times a second (every 100 ms), but with 2000 vessels any given vessels's distance would only be updated once every two seconds (2000 ms).

[Of course, you could always tweak the refresh rate to be more aggressive to better handle a large number of vessels; e.g., increase the rate to 10000 vessels per second when more than 1000 vessels are present.]
 

Artlav

Aperiodic traveller
Addon Developer
Beta Tester
Joined
Jan 7, 2008
Messages
5,790
Reaction score
780
Points
203
Location
Earth
Website
orbides.org
Preferred Pronouns
she/her
Regarding performance, one thing you can do is just recalculate the distance for a fraction of the total number of vessels each frame
Yes, that's about the only idea i thought of, considering that i'm using blind code.
Calculating 154 satellites ii a frame drops FPS by a third, so 25 satellites per frame should do.
Then, for a database of 10000 satellites an approached one will appear on average after 5 seconds, assuming 60 FPS.

Actually, that's what Orbiter does, so when there are many (100+) vessels they appear one-by-one.
It only does one visibility test per frame though.
 

Jake

Deorbinaut
Joined
Jun 22, 2008
Messages
73
Reaction score
0
Points
0
Location
Location: Location: Location:
This, coupled with that mysterious collision detection module I saw some time ago, would make for some pretty interesting orbiting :D

Cannot remove satellites
So once a satellite comes into range and is drawn into visible mode, when it goes out of range it doesn't dissapear from the targeting menu? That is kinda bummer, you'll get hundreds of ships there very quickly, not to mention the performance hit they must pose.

Cannot detect already added satellites
I'm sorry but I didn't quite understand that. I added some satellites from the MFD and it seemed to keep tracking them. What do you mean by "detection"?

What would be really cool and would elevate this module to godly levels of awesomeness is if every foreign object from the TLE list that comes into a specific range woud be automatically targeted by a square complete with RVel vectors, like on the docking HUD, accompanied by some sort of mild warning beep. Dunno if Orbiter allows more than one object at once to be targeted or if you can toss that box/RVel thingy on the other HUDs. If only one object can be targeted, then the target should be on the object closest to the focused ship. This would make things really interesting and the module would be extremely useful.
 

Artlav

Aperiodic traveller
Addon Developer
Beta Tester
Joined
Jan 7, 2008
Messages
5,790
Reaction score
780
Points
203
Location
Earth
Website
orbides.org
Preferred Pronouns
she/her
This, coupled with that mysterious collision detection module I saw some time ago, would make for some pretty interesting orbiting :D
My MeshLand/Visosad won't handle orbital speed collision, no idea if Computerex vCollision would, likely not too.

So once a satellite comes into range and is drawn into visible mode, when it goes out of range it doesn't dissapear from the targeting menu?
Yes, to be fixed.

I'm sorry but I didn't quite understand that. I added some satellites from the MFD and it seemed to keep tracking them. What do you mean by "detection"?
Save state, reload. Satellites that were generated will be re-made. No detection if the satellite was generated already in the previous save.

What would be really cool and would elevate this module to godly levels of awesomeness is if every foreign object from the TLE list that comes into a specific range woud be automatically targeted by a square complete with RVel vectors, like on the docking HUD
That would be a cool thing to have...
And hard to make...

Question to all:
Assuming there is a way to draw to the screen at any time in Orbiter, how to determine an X,Y location in screen space of a thing at X,Y,Z in Orbiter global space using Orbiter API?
 

TSPenguin

The Seeker
Joined
Jan 27, 2008
Messages
4,075
Reaction score
4
Points
63
What would be really cool and would elevate this module to godly levels of awesomeness is if every foreign object from the TLE list that comes into a specific range woud be automatically targeted by a square complete with RVel vectors, like on the docking HUD, accompanied by some sort of mild warning beep. Dunno if Orbiter allows more than one object at once to be targeted or if you can toss that box/RVel thingy on the other HUDs. If only one object can be targeted, then the target should be on the object closest to the focused ship. This would make things really interesting and the module would be extremely useful.

I believe there was an addon that automaticaly did this by setting a nav frequency appropiately. If only my brain would remember names... :hmm:
 

sputnik

Addon Developer
Addon Developer
Donator
Joined
Apr 3, 2008
Messages
424
Reaction score
0
Points
31
Location
Palmdale
Website
www.worldof2001.com
Question to all:
Assuming there is a way to draw to the screen at any time in Orbiter, how to determine an X,Y location in screen space of a thing at X,Y,Z in Orbiter global space using Orbiter API?

Artlav,

If you download my Starclipper 1.1, and look at the Generic_EVA code, you'll find a code snippet that does just that. It puts HUD boxes around usable grapple points in the field of view. I certainly don't take any credit for figuring it out; it was Urwumpe's work. I think it can be adapted to do what you ask.
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,617
Reaction score
2,337
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
it was Urwumpe's work.

I remember something like that, but my IP ran out years ago for it... if you wouldn't keep on reminding me, I would have problems keeping track of it. :rofl:

The principle is stupid as falling to the floor.

1. Global coordinates ->Local coordinates
2. Local coordinates -> Screen angles (Azimuth, elevation)
3. Screen angles -> HUD screen coordinates.
 

Artlav

Aperiodic traveller
Addon Developer
Beta Tester
Joined
Jan 7, 2008
Messages
5,790
Reaction score
780
Points
203
Location
Earth
Website
orbides.org
Preferred Pronouns
she/her
Update 090404: (Newer update info in post #17):
[ame="http://www.orbithangar.com/searchid.php?ID=3868"]Heavens traffic 090405[/ame]
heavens_1.jpg


Good source of TLE's:
http://celestrak.com/NORAD/elements/
Changes:
*Improved performance
*Added satellite by-distance remover
*Added satellite recognition in saved state
*Added nearest detector
*Added slowest-relative detector

Current limitations:
*All added sats use same default Carina mesh

So, current logic is:
If a satellite is approached closer than 10Km, create it.
If an approached satellite becomes further away than 10Km, delete it.
If a satellite was created out of MFD, ignore it's deletion.

On start, the scenario is checked for pre-made satellites.
Unfortunately, the most unique identifier - TLE line 0, is quite non-unique, so a better way is to be thought of.

Some questions:
1. What about navigation? Just create a satellite and fly to it?
2. What about meshes?
3. Anything else people wan to see in this (sans boxes over sats)?

I was talking about this collision thing: {url}
Are/were you involved with that?
No, it's their own development.
Can't quite remember the project name. Something with word "red" in it and NASSP-level Soyuz simulation.

If you download my Starclipper 1.1, and look at the Generic_EVA code, you'll find a code snippet that does just that.
Unfortunately, that's not what i asked for by a long shot - in my case there is no vessel, only camera and target.
 
Last edited:

Ajaja

Active member
Joined
Apr 20, 2008
Messages
226
Reaction score
93
Points
28
Artlav
Bug reports too.
Something wrong with position of sattelites. Looks like mess with equatorial frame (in TLE) and ecliptical frame (default in Orbiter).
 

sputnik

Addon Developer
Addon Developer
Donator
Joined
Apr 3, 2008
Messages
424
Reaction score
0
Points
31
Location
Palmdale
Website
www.worldof2001.com
Urwumpe,

Simple, yes. But I couldn't have done it, if only because I wouldn't have imagined a need....


Artlav,

Sorry it doesn't help. I guess I don't understand what you need, then, because you can get the focus vessel as easily with an MFD as with a vessel. You're talking about boxing a vessel in the field of view of the focus vessel, right?
 

T.Neo

SA 2010 Soccermaniac
Addon Developer
Joined
Jun 22, 2008
Messages
6,368
Reaction score
0
Points
0
Current limitations:
*All added sats use same default Carina mesh

What satillite meshes would be more appropriate?
 

Artlav

Aperiodic traveller
Addon Developer
Beta Tester
Joined
Jan 7, 2008
Messages
5,790
Reaction score
780
Points
203
Location
Earth
Website
orbides.org
Preferred Pronouns
she/her
You're talking about boxing a vessel in the field of view of the focus vessel, right?
No, in external view and internal view alike.

Something wrong with position of sattelites. Looks like mess with equatorial frame (in TLE) and ecliptical frame (default in Orbiter).
Quite possible, since i'm using blind code.
Is there something to compare it with?

What satillite meshes would be more appropriate?
That is an open question.
 

sputnik

Addon Developer
Addon Developer
Donator
Joined
Apr 3, 2008
Messages
424
Reaction score
0
Points
31
Location
Palmdale
Website
www.worldof2001.com
Ah, that IS a different kettle of fish, and having finally got a chance to play with the thing, I can see where that would be very useful.
 

Ajaja

Active member
Joined
Apr 20, 2008
Messages
226
Reaction score
93
Points
28
Quite possible, since i'm using blind code.
Is there something to compare it with?
Check geostationary satellites (inclination in equatorial frame must be near zero), or ISS (inclination ~51 degrees).
Satellite tracking software (like Orbitron) may be usefull too.

And some tools for working with TLE in Orbiter:
TLE to Orbiter ELEMENTS converter (eq_to_ecl):
http://library.avsim.net/esearch.php?CatID=orbmisc&DLID=66429
(I can send sources if you need)

Scenario Editor TLE:
http://orbithangar.com/searchid.php?ID=2617
 

Artlav

Aperiodic traveller
Addon Developer
Beta Tester
Joined
Jan 7, 2008
Messages
5,790
Reaction score
780
Points
203
Location
Earth
Website
orbides.org
Preferred Pronouns
she/her
That's what i used, and now i've checked some trajectories, it's DAMN wrong. Geostationaries in polar orbits.
Fixing...

---------- Post added at 06:31 PM ---------- Previous post was at 06:03 PM ----------

Update 090405:
[ame="http://www.orbithangar.com/searchid.php?ID=3868"]Heavens traffic 090405[/ame]
heavens_1.jpg


Changes:
*Fixed the satellite positioning code, now satellites are where they are supposed to be, not the opposite side of the Earth, going sideways.
*Added 388 geostationary satellites to the DB

Some remaining questions:
1. Any more major bugs?
2. Where to get some 10000 sats TLE file?
3. What about navigation? Just create a satellite and fly to it?
4. What about meshes?
5. Anything else people want to see in this (sans boxes over sats)?
 

fort

Active member
Joined
Mar 19, 2008
Messages
1,018
Reaction score
20
Points
38
deleted
fort
 
Last edited:

RisingFury

OBSP developer
Addon Developer
Joined
Aug 15, 2008
Messages
6,427
Reaction score
492
Points
173
Location
Among bits and Bytes...
Are there 10 000 sats at all? I though there are some 3000 active and an additional 3000 inactive ones... and a whole lot of debris.
 

flying coffin

Member
Joined
Dec 7, 2007
Messages
194
Reaction score
0
Points
16
How about user selectable meshes for certain satellites, maybe specified in the TLE file to override the default carina mesh or something. For example, when I sim a launch like WGS-84 recently, I'll take someting from the "commercial satellites" add-on, or a chapman probe, or whatever I can find that looks most similar to the real thing, stick it on top of a velcro rocket (usually) and leave the sat in my current_reality scenario, until I need to remove it for whatever reason.
 
Top