Jump to content

[1.1.3] AntennaRange 1.11.4 - Enforce and Encourage Antenna Diversity


toadicus

Recommended Posts

antennarange_network.png

antennarange_owk-noui-med.png

antennarange_owk-comm16-med.pngantennaranage_owk-dts-med.pngantennarange_owk-comm88-med.png

Ever wanted to use one of those cool looking dish antennas, but the engineer in you just wouldn't let you spend the extra power and weight? Well, now you can force yourself to use them! Designed as a drop-in replacement for ModuleDataTransmitter, AntennaRange handles range-finding, power scaling, and data scaling for antennas during science transmission. Its functionality varies with three tunables: nominalRange, maxPowerFactor, and maxDataFactor, set in .cfg files. In general, the antennae are tuned as follows:

  • Communotron 16 - Suitable up to Kerbalsynchronous Orbit
  • Comms DTS-M1 - Suitable throughout the Kerbin subsystem
  • Communotron 88-88 - Suitable throughout the Kerbol system.

What It Does

AntennaRange specifies a nominal range at which the antennas work exactly as prescribed in Squad's .cfg files. Below that range, the data packet size increases up to a maximum, effectively increasing bandwidth and decreasing power cost. Above that range, packet size stays floored at Squad's value, and packet power costs increase. When power cost gets too high, the antenna no longer functions. Both values scale with the square of the distance. Finally, transmitter scoring has been adjusted so that the science subsystems will prefer the cheapest antenna in terms of charge/data.

AntennaRange also provides simple relaying support. That is, if your ship has a short range antenna, but is in range of a longer range antenna that can communicate back to Kerbin, it will do so. At this time, no attempt is being made to model electric use on the relay vessels; this mechanic is intended to feel rewarding for those interested in putting together a relay system (say, a flat dish antenna in orbit of Minmus so your probes can just use whips, or a big dish in high Jool orbit with a few flat dishes in low orbits, so once again your probes can use whips). Because of the limited number of antenna parts and because this mechanic is intended to be optional, range is not additive: if you want to use a whip from far away, you need a bigger antenna within whip range.

AntennaRange has a small handful of optional features to enhance gameplay: a line of sight requirement, a probe connection requirement, and a "fixed power cost" requirement. As its name implies, the line of sight requirement requires that antennas must have an unobstructed line of effect from their origin to their target, whether that's Kerbin or another relay. Only a planet or a moon can block line of sight at this time. The probe connection requirement will disable control of unmanned craft whenever no connection can be made from the active craft to Kerbin. Finally, the fixed power cost makes the "long range" penalty mirror the "short range" benefit -- slowing down data transmission instead of increasing power cost. This makes it simpler to design probes that will remain controllable while transmitting, at the cost of using up more of your time to do it.

antennarange_icon_expo_med.png

What It Does Not Do

AntennaRange does not pretend to be any sort of "realistic" communication system. If you're looking for that sort of thing, look in to RemoteTech or kOS or something similar.

Don't Forget

If you have craft outside of Kerbalsynchronous orbit with nothing but the whip antenna, they will be unable to transmit data until they get closer. Beware when installing this mod with an active career!

Documentation

There is a wiki at GitHub that describes the various options and offers some technical documentation for patch authors.

[wiki]

Compatibility Patches

Users are welcome and encouraged to submit patches for use with other antenna mods!  The official place to keep track of ModuleManager patches is at the wiki:

[compatibility patches]

DOWNLOADS

SpaceDock: [zip]
Not SpaceDock: [zip] [tar.gz] [tar.xz]

CHARITY:

Do you like what you see here so much that you can't imagine downloading it without first parting with your hard-earned money? If so, this specially-crafted PayPal donation button will help you to take the currency of your choice and make it my money instead of your money. More seriously though: donations are 100% optional and entirely at your own discretion. If you do choose to donate, I'll appreciate it!

btn_donate_LG.gif

INSTALL:

1. Unpack archive into /path/to/KSP_folder/.
2. ???
3. Profit!

 

USAGE:

* Add Squad's antennae to your ships as normal.  Just make sure you use the right one(s) for the job!

 

CHANGELOG:

Spoiler

v.1.11.4 [2016-09-12]
* Fixed an issue with adding improper fractions that caused vessels to be considered twice as attractive relative to Kerbin during range finding.
* Fixed an issue with reloading that could cause data speedups to be significantly multiplied, making the active vessel significantly more attractive than all other targets during range finding.
* Code update for 1.11.3 by linuxgurugamer.  Thanks!
v.1.11.3 [2016-05-32]
* Fixed an issue that caused EVA Kerbals to miss the definition of packet sizes and costs.
* Fixed an issue that prevented vessels having recently left physics range from being working relays.
* Fixed an issue that allowed Exceptional behaviour when other mods have gone very wrong.
v.1.11.2 [2016-05-02]
* Fixed a critical bug in transmitter setup that caused the packetSize and packetResourceCost fields to be assigned backwards.
v.1.11.1 [2016-04-30]
* Recompiled for KSP 1.1.2
* Overhauled the antenna info shown in the editor and research screen to communicate more facts about antenna functionality.
* Fixed an issue where antenna info for the editor would not update in response to tracking station ugprades or settings changes.
v.1.11 [2016-04-20]
* KSP 1.1 Compatibility
* Network resolution now picks relay targets based on cheapest total cost (in EC/MiT) to Kerbin.
* New icons by HalcyonHush!
* Communotron 16 moved to starting tech
* Relays will now recalculate their maximum range periodically to account for changes to the Additive Ranges setting.
* Added toggle to disable the use of the Toolbar mod even when it is detected.
* Removed some extraneous debugging messages.
v.1.10.3 [2015-11-10]
* Recompiled for 1.0.5 compatibility.
v.1.10.2 [2015-10-02]
* Fixed an issue that could cause Exceptional behavior when the active vessel had no transmitters.
* Fixed an issue that could result in Exceptional behavior when a target relay unexpectedly disappears.
* Fixed an issue that would result in Exceptional behavior when viewing antenna part tooltips in the R&D scene before opening the Editor scene.
* Corrected EVA Kerbals to start with 0 ElectricCharge.  They will automatically fill to maximum when leaving the vessel, if the vessel has sufficient ElectricCharge.
* Added patch support for the HighGainAntenna from the AsteroidDay mod.
* Updated for the ToadicusTools refactor.
v.1.10.1 [2015-06-17]
* Fixed a bug that prevented relays on about half of vessels from targeting relays on about half of vessels.
v.1.10 [2015-06-13]
* Now supports "additive" ranges!  Relay links will now be symmetric by default, and range limits will vary based on the connected relay or level of KSC's tracking station.
* Various optimizations throughout to reduce perfomance drop due to large relay networks.
v.1.9.1 [2015-06-02]
* Improved "circular relay" detection to avoid infinite loops.  This fixes the crash to desktop / hangs forever issue.
* No longer incorrectly checking for line of sight to Kerbin when the line of sight option is disabled.
* Pretty lines can now be toggled on and off using the toolbar/applauncher icons in map mode.  This is not a persistent change.
* Made the network resolution update delay configurable, from 8 ms to 2.5 s.
v.1.9 [2015-05-24]
* New feature: Pretty Lines in map mode!
* More information available now about why connections are not available.
* Major optimizations and corrections to the network resolution architecture.
* General optimizations and cleanup throughout.
v.1.8 [2015-04-27]
* Updated for KSP 1.0!
* Toolbar button will now set its status to "Important" when the active vessel has no connection.
* Miscellaneous behind-the-scenes changes.
v.1.7 [2015-01-03]
* Balance pass for the EVA transmitter.
* ToadicusTools: Fixed command detection for KerbalSeats.
* Changed the way distance to CelestialBodies is calculated; now reports distance to the idealized surface.
* Added patch support for FilterExtensions.
v.1.6 [2014-12-15]
* Updated for KSP 0.90.0
* Adds preliminary, in-testing support for transmission directly from EVA Kerbals.
v.1.5 [2014-10-19]
* Antennas will now try to store data that is handed to them when they cannot transmit it.
v.1.4.3 [2014-10-12]
* Fixed an issue that prevented probe control from being interrupted when connections are required but absent.
v.1.4.2 [2014-10-07]
* Updated for KSP 0.25.0.
* Fixed an issue that caused the in-flight AppLauncher button to duplicate when reverting flights.
v.1.4.1 [2014-08-16]
* Added support for Squad's ApplicationLauncher.  This will be used only as a fallback when the Toolbar mod is not present.
* Improved null detection to resolve some issues with controls locking in certain scenarios.
* Updated ToadicusTools.
v.1.4 [2014-07-17]
* Updated for KSP 0.24.
* Made the "fudge factor" used in line of sight calculations configurable.
v.1.3 [2014-05-30]
* Added otherwise-nonfunctional Toolbar button in flight that will change colors to indicate current connection status (hint: red is bad)
* New option allows power costs to be fixed even at long range, reducing data rate instead.
v.1.2 [2014-05-07]
* New and improved right-click GUI presentation for relays.
* Improved accuracy of line of sight checks.
* Added optional feature to prevent control of unmanned vessels without radio contact.
v.1.1 [2014-05-03]
* Added tweakable "throttle" for packet size, to let you trim your transmission rate to stay within your power limits.
* Config patches updated to MM 2.0 format.
* Added occulsion modeling as an optional feature.  See the toolbar button in the space center to enable!
* Major refactor of underlying library code to use ToadicusTools.
* Relicensed to Modified BSD.
* Improved behavior when transmitting directly from an experiment dialog.
v.1.0.0 [2014-04-04]
* Recompiled against KSP 0.23.5 for compatibility.
* Major Surgery on relay-searching code to improve performance and reliability.
* Added new event-listeners to improve relay behavior around vessel-changing events like undocking.
v.0.6.3 [2014-02-10]
* Fixed a bug where flags in range would cause exceptional conditions.
v.0.6.2 [2014-01-14]
* Refactored a lot of the relaying code to improve reliability and performance.
* Added range and packet data to the "right click" context tip.
* Made the AntennaRange messages match the stock antenna messages more closely.
* Skipped 0.6.1 because I got my version numbers confused with TweakableEverything.
v.0.6.0 [2014-01-03]
* Added support for simple relaying.
v.0.5.0 [2013-11-02]
* Initial Release

 

LICENSE:

OP screenshots provided by ObsessedWithKSP; used by permission.

Spoiler

AntennaRange

Copyright © 2014-2015, toadicus

All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

1.  Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2.  Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer
    in the documentation and/or other materials provided with the distribution.
3.  Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived
    from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

This software uses the ModuleManager library, © 2013-2014 Ialdabaoth (who is awesome), sarbian, et al,
Used under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

This software uses code from the MuMechLib library, © 2013 r4m0n, used under the GNU GPL version 3.

 

 

Edited by toadicus
Updated to 1.11.4
Link to comment
Share on other sites

In that this mod is generally designed to limit range, and in that RemoteTech changes a great deal about the communications infrastructure, my guess is "no". I don't use RemoteTech and I haven't tested this with it in any way.

Link to comment
Share on other sites

rather useless for those that land (more efficent :P) but still a nice mod.

Actually there is 'no point' in bringing back science right now. I was under the impression that if you had 10 data units and could only transmit 70%, that 30% would be 'lost'. But it's not. You can just spam the antenna use and boom, it's done. I'm not 100% sure I understand the subtleties of this mod, but perhaps it addresses this in a way?

To balance the whole stock data transmission they need to either have science instruments to be single-use.(Making the % of data loss relevant as you'd have to come back to get the % lost)

Or, if you would permanently lose that data, THEN it would be a gamble. Do I go back and get 100% or sacrifice X% of my data. (This would deal with transmission spamming)

It's nice to see more mods that want to deal with balance.

Cheers,

Link to comment
Share on other sites

Actually there is 'no point' in bringing back science right now. I was under the impression that if you had 10 data units and could only transmit 70%, that 30% would be 'lost'. But it's not. You can just spam the antenna use and boom, it's done. I'm not 100% sure I understand the subtleties of this mod, but perhaps it addresses this in a way?

This mod does not address the spammability of science points from transmitters or the science values delivered in any event; it only limits the range of the antennas in order to require the use of the bigger ones, and rewards the use of smaller antennas on more-local craft.

In Wednesday's dev notes, HarvesteR laid out some changes to science transmission that should address the spamming problem. I don't know if that's slated for 0.23 or 0.22.1, but either way I'm writing off that particular problem as "Squad is already fixing it."

Link to comment
Share on other sites

Sweet.

Can you also make them not-retracting after transmitting?

I would not even bother if I had to deploy the antennas manually, if they only stopped folding back up after transmitting ...

Unfortunately no; at least not directly. Squad's transmission code handles that, and it's all in a few private methods and subclasses. I can't override them, and I can't readily duplicate their functionality with confidence because a lot of the logic is obscured in the assembly.

With a bit of futzing around, I could probably make the antenna re-extend after the transmit logic retracts it, if it was extended in the beginning. Would that be close enough for your purposes?

Link to comment
Share on other sites

Not really to be honest - it is not only the look of the craft, but if you start transmitting another report while the antenna is retracting, the report is only sent when the next (third) transmitting starts.

Yeah, that's out of my hands. All of the code about that, from queuing to transmitting to delivering science, is locked up. I'd need to entirely re-implement the data transmitter to fix that, and that has potentially dire implications about science production if I get it wrong. ;)

You should file a bug about that specific behavior; data that's been flagged for transmitting should transmit automatically when it's reached in the queue.

Link to comment
Share on other sites

Remote Tech caught me off guard when launching my first unmanned probe without an antenna ... as well as its changes to the antennas, making them use energy whenever they are deployed ... but also that the antennas have to be deployed manually to transmit science - and that they do not automatically retract when finished.

Link to comment
Share on other sites

  • 1 month later...

Great idea with wonderful implementation! Thank you for your work :)

Future version idea, maybe a relay so for example if you have a satellite around Mun with a small half dish (midrange) antenna or two, a probe or rover on the surface could use a whip antenna. Essentially sending the data to the satellite then the satellite sends it to KSC but not have the complexity of control as RemoteTech has.

Link to comment
Share on other sites

It's a shame that I never came across this mod before, looks awesome. Hope 0.23 won't break it. Would second JeffreyCor's idea of adding simple relays. Because now there's no choice. Go there, you need that antenna. If you have relays you can choose to either build a lander with a whip antenna (easier to use than the bigger ones) and an orbiter with a dish, or you can build the lander around the large communications array but at the advantage of not needing a separate orbiter.

Link to comment
Share on other sites

I've done some quick testing, and from the looks of things, AntennaRange is fully compatible with KSP 0.23.0 and ModuleManager 1.5. Enjoy!

Simple yet elegant mod which finally makes you use those antennas for reasons other than purely esthethic. Awesome :)

Glad you like it! I've always enjoyed reading your AARs. :)

Great idea with wonderful implementation! Thank you for your work :)

Future version idea, maybe a relay so for example if you have a satellite around Mun with a small half dish (midrange) antenna or two, a probe or rover on the surface could use a whip antenna. Essentially sending the data to the satellite then the satellite sends it to KSC but not have the complexity of control as RemoteTech has.

It's a shame that I never came across this mod before, looks awesome. Hope 0.23 won't break it. Would second JeffreyCor's idea of adding simple relays. Because now there's no choice. Go there, you need that antenna. If you have relays you can choose to either build a lander with a whip antenna (easier to use than the bigger ones) and an orbiter with a dish, or you can build the lander around the large communications array but at the advantage of not needing a separate orbiter.

Hmm, I do like this idea. I'll do a quick investigation this week, hopefully, and see if I can just knock it out quickly, or if it needs to take a backseat to a couple other projects I've got going on. Thanks for the feedback!

Edited by toadicus
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...