Nivekk / KOS

Fully programmable autopilot mod for KSP.
Other
80 stars 30 forks source link

Redesign of radio contact with archive #209

Open palaslet opened 10 years ago

palaslet commented 10 years ago

I'm looking into a possible redesign of kOS's use of antennas and would really like some comments on my thoughts.

The existing functionality is a custom implementation of antenna technology. kOS implement custom ranges to the different antennas. KSP seem to differ the antennas mostly by bandwidth.

A possible way to do this could be to use the same logic as KSP. Taking into account:

  1. Radio waves travel with speed of light. So two way communication over wast distances might actually require warp speed to complete in a reasonable amount of time.
  2. Antennas use electricity.
  3. Antenna bandwidth.

So from Kerbin orbit (when distance is negligible), using "Communotron 16", copying 500 byte script from archive: Throughput: 5 bytes pr sec. (Yes, the KSP UI shows incorrect throughput. Known bug) Electric charge pr packet (2 bytes): 10 ElectricCharge

Totals: Number of packages: 250 Time for upload: 100 sec ElectricCharge needed: 2500

Same example, but now the vessel is located near Eeloo (approx. 100,000,000 km away): Number of packages: 250 ElectricCharge needed: 2500 Time for upload: 733 sec (333 sec for upload command to reach earth + 100 sec to send all data from earth + 333 sec for it to reach Eeloo)

a1270 commented 10 years ago

Cliph from RemoteTech(https://github.com/Cilph/RemoteTech2) is planning to integrate kOS in the lite branch. How extensive it will be is to be seen but that should handle all of the delay and transferring. Saying that, your idea seems like RT lite lite, everything but the need to set up a relay network. I personally have been holding off this type of project until Cliph shows his cards. Though that's not to say you shouldn't start down the road.

a1270 commented 10 years ago

I am going to hijack your thread for a second. @Nivekk, you may want to get in contact with Cliph: http://forum.kerbalspaceprogram.com/threads/56399-0-22-Remote-Tech-2-Build-those-satellite-networks%21?p=756045&viewfull=1#post756045 Seemed to fit to topic somewhat. Hopefully it wasn't too rude of me.

palaslet commented 10 years ago

If we are going for realism in this game and in this mod, I think this is a must. One can argue that transmit range should also be considered, as omni antennas don't perform as good as dish ones. I wanted to propose such restriction but could not find a "antennaType" or "transmitPower" property on the stock parts. And since the antennas in KSP implements "IScienceDataTransmitter" it seems closely linked to the science part of KSP.

So... I aggree that it would be best to wait for Cliph.

Btw, there is already a tutorial on the KSP wiki on how to use RemoteTech. Maybe it's possible for us to make use of it already?

palaslet commented 10 years ago

I totally agree that RemoteTech is the way to go. The stock antennas in KSP is closely linked to the Science program, and does not have the required properties to accurately simulate communication.

@Nivekk, if you want me to go on with this, I'll gladly start cooperating with Cilph to integrate this. We should of course have a fallback to your original implementation when RemoteTech is not loaded (possibly a switch in the part file as well), so people can choose how much realism they want.

Dunbaratu commented 10 years ago

The other advantage to using Remotetech for this is that not every user of KOS will want to also be a user of RemoteTech. So if the user doesn't care about realistic antenna limitations, they don't have them because they didn't install RemoteTech and instead KOS falls back on its own simpler system.

The way integration with RT should work is this:

When operating on a remote disk: range = getRange() delay = getDelay(). if in range then wait for ''delay' seconds then perform the operation.

Where getDelay() does this: if RT installed, ask RT what the delay should be, else return zero seconds. and getRange() does something like this: if RT installed, ask RT what the range should be, otherwise do it KOS's way.