OHM Space Network Plugin

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,666
Reaction score
100
Points
78
Ok, so I'm starting to give more shape to the idea and before starting i want to have a good plan.

My idea is to have a class, created through the plugin that simply stores and process signals from the vessels. The plugin will do the math for signal strength, lag and everything, and will "send" this signal that will be processed by the processing class. That's "easy".

What I am thinking about relevant to the user interface is to have the plugin which will manage the ground network (so you'll see in the plugin if the message has arrived, where etc), while inside the vehicle there could be a dedicated MFD for actually sending the messages. I don't know if that's nice or not for the end users, it seems quite nice to me.
In case I choose this path anyway i'm still thinking on how to implement an MFD that can put messages into another class. I'm thinking of it, in case anybody has ideas they are more than welcome!
 

Longjap

Active member
Joined
Jun 8, 2011
Messages
191
Reaction score
41
Points
28
I'm all for it Fred! :)

I'm not sure if this is a useful idea or is in line with your idea; I've checked the NotesMFD add-on by vchamp and it reads a .txt from a folder inside your Orbiter root (notes). If somehow you can write a .txt file to this folder from your spacecraft you can use the same logic to read it from the receiving vessel MFD. So it will be transmitted outside orbiter though and not communicated directly between classes.
Maybe add the time of the latency of the signal before a "data-file" is written to the folder, thus also can be "received" by the ground network.

Could also be an idea making different folders for ground stations, and depending on the available connection, it will write a file in the corresponding folder of the connected ground station which can only be accessed with the corresponding stations vessel MFD?

I've no idea how much work this is, as I'm currently following Hlynkacg's tutorials and struggling to make an animation work. :lol:
 

boogabooga

Bug Crusher
Joined
Apr 16, 2011
Messages
2,999
Reaction score
1
Points
0
What actual messages are you wanting to send? I was happy to just see the signal strength and signal delay. Or, just to know where to point the spacecraft.

What if all user inputs were actually delayed by the signal delay?
 

turtle91

Active member
Joined
Nov 1, 2010
Messages
319
Reaction score
7
Points
33
What actual messages are you wanting to send?
Maybe some basic generic stuff like i.e. "distance from Sun...from earth...from next major body"...something like this.

Would be cool if you are far away from earth, where a data-transmit would take i.e. 1-2 hours....you would need to point the vessel roughly to earth all the time, while the data-transmission is in progress. If i.e. data is incomplete, there could be just some garbage random ASCII chars received....just an idea...

...while inside the vehicle there could be a dedicated MFD for actually sending the messages
This would be great. So one could check the data-transmit-progress/signal-strenght while being busy with correct attitude-hold. (attitude-hold could be a demanding job, if i.e using something like Wishbones [ame="http://orbithangar.com/searchid.php?ID=5215"]NTR core propulsion stage[/ame])
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,666
Reaction score
100
Points
78
I'm not sure if this is a useful idea or is in line with your idea; I've checked the NotesMFD add-on by vchamp and it reads a .txt from a folder inside your Orbiter root (notes). If somehow you can write a .txt file to this folder from your spacecraft you can use the same logic to read it from the receiving vessel MFD. So it will be transmitted outside orbiter though and not communicated directly between classes.
Maybe add the time of the latency of the signal before a "data-file" is written to the folder, thus also can be "received" by the ground network.

Could also be an idea making different folders for ground stations, and depending on the available connection, it will write a file in the corresponding folder of the connected ground station which can only be accessed with the corresponding stations vessel MFD?

I've no idea how much work this is, as I'm currently following Hlynkacg's tutorials and struggling to make an animation work. :lol:

It's in the path of what I have in mind, for txt files on one side but also for messages viewed during sim.

What actual messages are you wanting to send?
Basically text and numbers and some general "beeps". I don't want to make it a mess, just increase its functionality so a probe can send a beep saying "hey I'm alive" when released, or send telemetry or receive commands and give confirmation when done, like TGO did last week

What if all user inputs were actually delayed by the signal delay?
That was an idea, but it's impossible to intercept all the keys and avoid their normal behaviour. The idea I had in mind was more the possibility to send from earth a programmed cycle of commands, receive confirmation of correct reception by the vessel and then let it do it by itself (that is what happens in reality). I don't know anyway if this is too much, since many burns are done by users with the MFDs which compute necessity in realtime. Otherwise users would have to plan inputs and everything is needed like real guys at NASA do... I'm scared that it would become too difficult...
The first idea is to be able to receive data from the vessel (which will arrive to the ground station with the proper delay and with the proper quality of course.

Maybe some basic generic stuff like i.e. "distance from Sun...from earth...from next major body"...something like this.
yep for example

Would be cool if you are far away from earth, where a data-transmit would take i.e. 1-2 hours....you would need to point the vessel roughly to earth all the time, while the data-transmission is in progress. If i.e. data is incomplete, there could be just some garbage random ASCII chars received....just an idea...
agree with the quality point. Anyway I think that the vehicle should be turned at earth for all the transmission time and not necessairly to wait for the data to arrive to Earth, so bandwith is another point to implement

This would be great. So one could check the data-transmit-progress/signal-strenght while being busy with correct attitude-hold. (attitude-hold could be a demanding job, if i.e using something like Wishbones NTR core propulsion stage)

I think that the best way is to implement the plugin for the ground network and MFD for the vessels so the system will be immediatly available for any vessel. Still I have no idea on how to make a small SDK for automatic radio signal, but maybe with the MFD it won't be needed. I'll start to get more into details with planning now.
 

Longjap

Active member
Joined
Jun 8, 2011
Messages
191
Reaction score
41
Points
28
The idea I had in mind was more the possibility to send from earth a programmed cycle of commands, receive confirmation of correct reception by the vessel and then let it do it by itself (that is what happens in reality). I don't know anyway if this is too much, since many burns are done by users with the MFDs which compute necessity in realtime. Otherwise users would have to plan inputs and everything is needed like real guys at NASA do... I'm scared that it would become too difficult....

"(that is what happens in reality)" Isn't this the holy grail of every simmer? :hailprobe:
People who play orbiter like a steep learning curve I guess.
But to some extend, sure it's better for playability to have it in real-time and with help of MFD's. If the amount of work weighs up against the implementation, why not make it an option to do it this way so you can step up in difficulty?
 
Last edited:

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,666
Reaction score
100
Points
78
"(that is what happens in reality)" Isn't this the holy grail of every simmer? :hailprobe:
People who play orbiter like a steep learning curve I guess.
But to some extend, sure it's better for playability to have it in real-time. If the amount of work weighs up against the implementation, why not make it an option to do it this way so you can step up in difficulty?

It's not much the difficulty of implementing this but the actual usability: one thing is to do a MCC while getting to mars using Interplanetary MFD or TransX and use the network to send home data that everything's ok and have fun with other things (like magnetic fields or anything anyone could invent to broadcast).
Another thing is to send to the spacecraft commands on: where to orient, how long to burn, when exactly etc. without the possibility of the IMFD or TransX tool, it would mean to do the math on the ground by yourself etc and maybe it could be too much even for a qualified niche such as the orbiter users.
Anyway: once the platform is out and an SDK is out, people will be able to even programme their own addons to behave as mentioned above... I'm working on it now, and I'm getting the first positive results of my planning, let's see :thumbup:
 

indy91

Addon Developer
Addon Developer
Joined
Oct 26, 2011
Messages
1,224
Reaction score
582
Points
128
NASSP has a basic telemetry client, which already implements quite a few uplink and downlink functions that Mission Control actually had during the Apollo days. One day I hope this can become a full-fledged Mission Control feature. There is also a separate MCC-like feature to automatically calculate maneuvers etc. so that the NASSP user only has to perform the duties of the actual crewmember and not play around with MFDs.

Maybe the upcoming 7.0 release of NASSP (any day now) will spark some interest to continue development on this standalone groundstation client. It's very Apollo specific of course and it might not be suitable for a generic space network tool, but I'd be interested to see what can be done there. NASSP certainly is a good addon for a space network plugin, because the CSM generates telemetry, there is a rudimentary implementation of the antennas etc.
 

Longjap

Active member
Joined
Jun 8, 2011
Messages
191
Reaction score
41
Points
28
I confess and understand. I haven't calculated any MCC myself. :lol:

Let's say you can calculate the values using IMFD or TransX, and insert the parameters on the ground MFD. This sends it to the probe, but with all the delay of signal or maybe errors because of misalignment etc.

Anyway: once the platform is out and an SDK is out, people can even programme their own addons to behave as mentioned above... I'm working on it now, and I'm getting the first positive results of my planning, let's see

Awesome!
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,666
Reaction score
100
Points
78
Signals are starting to move around ;)

one poll: is it better for the users to manage the frequency of transmission and acquisition or to specify the object I'm sending the signal to?

I see pros and cons on both, I may prefer to specify the receiver but I'm curious to hear opinions.

To give the idea:

Option receiver: I'm on the vessel and I want to send a beep to Earth: earth will be default receiver for all the vessels. Wait let's send it to the DG on the Moon, so I'll choose that as receiver.

Option frequencies: I'm on the vessel and I'm broadcasting on that frequency, if on Earth I want to hear I need to tune the receiver to the proper frequency. This seems more realistic, but could be more boring maybe? and I'd need to study transmission frequencies of spacecrafts :hmm:

---------- Post added at 20:50 ---------- Previous post was at 20:47 ----------

Another point I just realized is this: if I'm sending to a specific receiver calculating the lag between the submit and the reception is quite easy.

If otherwise I'll use the frequencies this could become quite puzzling on solution :huh:
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,390
Reaction score
577
Points
153
Location
Vienna
If otherwise I'll use the frequencies this could become quite puzzling on solution :huh:

Put every message into a global list with send position, MJD and a unique id. For every receiver, on every poll, check all messages not already received (checked with unique id) for traveled distance since send MJD. If receiver position is within that distance radius around send position, consume message and put it into the received list.

From time to time, check if messages traveled a certain "fading-away" distance already (e.g. solar system diameter), and if so, remove them from the global list, as well as the unique id from the receiver lists.

Should work even with receivers that join after the signal was sent.
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,666
Reaction score
100
Points
78
Put every message into a global list with send position, MJD and a unique id. For every receiver, on every poll, check all messages not already received (checked with unique id) for traveled distance since send MJD. If receiver position is within that distance radius around send position, consume message and put it into the received list.

From time to time, check if messages traveled a certain "fading-away" distance already (e.g. solar system diameter), and if so, remove them from the global list, as well as the unique id from the receiver lists.

Should work even with receivers that join after the signal was sent.

I was implementing something really similar to this for the sender receiver combination, but I like really much this.

I can simply make an option for the users who are willing to use a "unique frequency" or the "variable frequency". First case all the messages will be on the same predetermined frequency, second of course not.

And as an option for the signal there could be the fade-away distance!

thanks for the input!!! it was really useful!!! :tiphat:
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,666
Reaction score
100
Points
78
ok, so to share some words on the progress here:

- signals travels around the sim and gets received quite fine through the plugin and the MFD.
- the class sharing passed by clbkgeneric allows to create a proper network also with satellites and bases, it will be pretty much fun to do it, thanks face for the suggestion!
- the above point will open also the way to a proper SDK (finally i understood what is an interface and how does it work!)
- I managed to have check for Loss of signal for both planet and moon, so if for example I'm sitting on Europa and I have to receive a signal from earth but jupiter gets in the middle the signal won't be received
- now there's another point I have to implement which is quite demanding: since the shadow concept is now more on the receiver than on the sender, it must be checked on both sides: let's say that I'm on europa and I want to send a signal to earth but jupiter is in the middle: I need to invent a way that ensures that the signal won't make it to earth either, while it can propagates in the other directions. Let's see if something comes to my mind on how to do this.
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,390
Reaction score
577
Points
153
Location
Vienna
- now there's another point I have to implement which is quite demanding: since the shadow concept is now more on the receiver than on the sender, it must be checked on both sides: let's say that I'm on europa and I want to send a signal to earth but jupiter is in the middle: I need to invent a way that ensures that the signal won't make it to earth either, while it can propagates in the other directions. Let's see if something comes to my mind on how to do this.

Idea: let planets also be receivers. If they receive a message (the way I've proposed before), they use the send position and their own position to get the direction, so they can calculate a shadow cone. Store this shadow cone(s) in the message database. Every time a receiver now receives this message, it should check the database for shadow cones for this message, then check if it is inside one cone at the time of receiving. If so, don't show the message, but still mark it as received for that receiver, so it isn't checked again.

---------- Post added at 18:46 ---------- Previous post was at 18:44 ----------

BTW: you can use this method also to implement directional antennas. Just give the shadow cone entry an "inverted" flag, so only things within the cone receive it.
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,666
Reaction score
100
Points
78
Idea: let planets also be receivers. If they receive a message (the way I've proposed before), they use the send position and their own position to get the direction, so they can calculate a shadow cone. Store this shadow cone(s) in the message database. Every time a receiver now receives this message, it should check the database for shadow cones for this message, then check if it is inside one cone at the time of receiving. If so, don't show the message, but still mark it as received for that receiver, so it isn't checked again.

I was thinking about this, but in the meantime I realized that I have the code ready for checking if the receiver is in the shadow of its own planet at the time it receives from a remote point.

Now, what I'm doing is: let the signal store also planet position and radius at the time the signal was sent, and when a signal gets to the receiver the check will be the same as above but the other way around, swapping receiver point and sender point. I don't know if it's clear, I can explain it better.
Let's see if it can be done "easily".

The other point you raised is as usual very useful, I was thinking on how to stop checking for a signal if the receiver is not able to receive it... well you just said it and the solution was in front of me... a simple flag in the signal, like a boolean "readable" true or false..

Thanks Face, as usual!
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,666
Reaction score
100
Points
78
Deep Space Antenna will track relevant ojects:

[ame="http://youtu.be/OChG-jZ3oi8"]https://youtu.be/OChG-jZ3oi8[/ame]

Mesh is from 3d nasa web page.
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,666
Reaction score
100
Points
78
Small update:

work is in progress. Signal processing class is done, vessels (DSN, TDRS and tracking stations) are (almost) done, starting to get to the dialog control class. Network creation and clearing works fine (all is much more efficient than it was in the old version because I learned how to solve many issues in the meantime).
One of the first practical improvements already in place: all the network information can be now contained in just one file (instead of the old system with one for tdrs, one for tracking stations and one for dsn).

Will keep on working, the target is to prepare a test version for users soon...
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,666
Reaction score
100
Points
78
I got crazy in the last hours because I had the horizon calculation that were right to me but for some reason they didn't exactly match with the sim... the I found out what's going on finally:
the new orbiter implements altitude and all my calculations were for ground level (the oapiGetSize returns the planet mean radius)... so DSN station of madrid for example is some 800 meters high and didn't match exactly the theoretical calculations.

Since it's not a big deal in terms that it changes only for very very small instants I was thinking of leaving it like that. On the other way I could increase a bit the "shadow cone" of a planet adding a small percentage to its radius... adding for example 0.1% to earth would increase its shadow radius of about 6.000 meters which is in the range of its highest mountains... I'll think about it, have to say that it's definitely not a big deal anyway...
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,666
Reaction score
100
Points
78
A first screenshot of the ground network tab. The MFD already works but graphics and all the rest are not there yet.

SN2016_1.jpg
 
Top