Jump to content

[1.1.3] AntennaRange 1.11.4 - Enforce and Encourage Antenna Diversity


toadicus

Recommended Posts

Hmm, for some reason the ranges on the antennas are not working correctly.

Either they are all red even if they should be in range or they are all green (if I remove evamanager.dll).

I've tried reinstalling but nothing seems to work.

I did install remotetech and RSS/RO mods earlier which I later uninstalled but since then antennarange hasnt worked properly.

Link to comment
Share on other sites

Olsson, I'll need a log if I'm going to be of any help to you. If installing other mods broke it and uninstalling them doesn't fix it, it's probable that they've affected your save in some way that I am not recovering (and very possibly connect recover). Can you duplicate your issue on a fresh install of KSP+AntennaRange?

Link to comment
Share on other sites

Something fishy happens with my KSP ever since the latest version:

The context menus for parts disappear(actually only the buttons). I go on EVA to check if they work through a kerbal and then the AntennaRange nullrefs start spamming the log. At this point all context menus disappear, even the data only ones, such as temperature/pressure displays etc.

Here's the log, in case it points to something:

https://bg3.biz/cloud/index.php/s/DBiZEPk1xYrZK18

Link to comment
Share on other sites

smunisto, I found a bug in AR this weekend that makes things go crazy if the active vessel has no transmitters... but there's no indication in your log that you've hit such a scenario. In fact, all the Update() method that's throwing does is set UI strings for the context menus of transmitter parts.

Here's a quick dev version that protects what I think is the only potentially-unsafe reference in that method:

[zip] [tar.gz] [tar.xz]

Let me know if it changes anything. That doesn't really explain the context lockdown before you go on EVA, though. That almost seems like it thinks you don't have proper control. Do you play with "Require Connection for Probe Control"?

Link to comment
Share on other sites

Question.....and i really wanted to look through 75 pages of the thread to find it.....so calm down keyboard commandos out there. But is there any plans to expand the variety of antennas? Call me crazy but i like having a whole bunch of dishes and types of antennas to fit all my craft needs. Also how does this work with other mods dishes IE boxsat?

Link to comment
Share on other sites

Question.....and i really wanted to look through 75 pages of the thread to find it.....so calm down keyboard commandos out there. But is there any plans to expand the variety of antennas? Call me crazy but i like having a whole bunch of dishes and types of antennas to fit all my craft needs. Also how does this work with other mods dishes IE boxsat?
AIES has a large variety of antennas. There are also patches that allows them to work with AntennaRange or Remote Tech.
Link to comment
Share on other sites

Toyotawolf, I'm pretty committed to not adding any parts to the default distribution of AntennaRange, for a lot of reasons. I'm not a modeler, so I can't produce them. I also want to keep save-breaking to a minimum; once you install a part mod, you're usually stuck with it until you want to start a new game. If you decide AntennaRange isn't for you, I want you to be able to remove it and keep playing the game. :)

That said, I do what I can to support community efforts to distribute ModuleManager patches to enable AntennaRange functionality on various part mods. I can't remember if there's been a boxsat patch before, but you can make one! The readme here should help you get started: https://github.com/toadicus/AntennaRange/blob/master/README.md

scribbleheli, you've missed the release of Pretty Lines and the subsequent release of Symmetric Links! Go have a look at the change log in the OP, or if you like reading commit messages, the git log. A lot of good stuff (if I do say so myself).

MrBonobo, best as I can tell we're good to go in 1.0.3/4 without a recompile. If I'm wrong, please let me know. :) I haven't seen the RT patches in a little while; I'm not sure if they're updated from AR 1.10. If not, the hotfix I posted a page or two back should get them close... but in general they should be rebuilt if they've not been already.

Link to comment
Share on other sites

The line of sight check is the slowest piece of logic in the loop

There is a really fast way to compute the shortest distance between a point and a line segment that doesn't require any trig functions or vectors. It should also solve vardicd's problem.

There are two cases to consider: the projection of the point may be outside the line segment or it may be between the endpoints of the line segment (note that a is the distance to the closer endpoint).

ksp_los_image.png

In both cases, the law of cosines gives:

ksp_los_latex1.png

The "outside" case is θ > 90°, which is equivalent to cos θ < 0 and d2 + a2 - b2 < 0 (since the denominator cannot be negative). In other words, this numerator tells us which case we are in.

In the "outside" case the distance is just a. In the "between" case the distance is the height of the triangle:

ksp_los_latex2.png

Note that the quantity being squared is the same numerator as before.

I wrote up a quick function that you can use as a helper in your ToadicusTools (didn't have a chance to compile and test it though). It cross-multiplies in order to avoid the division, so this is literally just some addition/subtraction/multiplication of doubles.


/// <summary>
/// Returns true if CelestialBody does not occlude the distant point from the local point, false otherwise.
/// </summary>
/// <returns><c>true</c>, if this Vessel has line of sight to the target Vessel, <c>false</c> otherwise.</returns>
/// <param name="sqrA">The square of the distance from the local point to the center of the CelestialBody</param>
/// <param name="sqrB">The square of the distance from the distant point to the center of the CelestialBody</param>
/// <param name="sqrD">The square of the distance from the local point to the distant point</param>
/// <param name="sqrRadius">The square of the radius of the CelestialBody, including any "grace" ratio.</param>
private static bool IsLineOfSightHelper( double sqrA, double sqrB, double sqrD, double sqrRadius )
{
// Make it so A is the shorter of the two distances to the CelestialBody
if ( sqrA > sqrB )
{
double temp = sqrA;
sqrA = sqrB;
sqrB = temp;
}

// Calculate numerator
double num = sqrD + sqrA - sqrB;

// Handle case where the projected center of the CelestialBody is outside the two points
if ( num <= 0 )
return sqrA >= sqrRadius;

// Handle case where the projected center of the CelestialBody is between the two points
return 4 * sqrD * sqrA - num * num >= 4 * sqrD * sqrRadius;
}

Donovan

Link to comment
Share on other sites

Question.....and i really wanted to look through 75 pages of the thread to find it.....so calm down keyboard commandos out there. But is there any plans to expand the variety of antennas? Call me crazy but i like having a whole bunch of dishes and types of antennas to fit all my craft needs. Also how does this work with other mods dishes IE boxsat?

Well, I made a module manager config for Additional-Antennas-for-both-Remote-Tech-and-Telemachus that DTPhantom has posted in that threads OP.

Edited by BigFatStupidHead
Clarity
Link to comment
Share on other sites

Thanks, Donovan! I will start testing that as soon as I can. :)

Calling all patch authors (you too BigFatStupidHead)! I have finally got around to setting up a wiki over at the AntennaRange github, complete with a "link page" for user-contributed patches. Anyone with a github account should be able to edit the page, and I strongly encourage you to add links to and brief descriptions of your patches there. Once there are a few links on the page, I'll put it in the OP here and we can use it as the "go to" place for users asking for a patch for Mod X. Hopefully this can be a useful tool for everyone. :)

Link to comment
Share on other sites

Well, now we have a new stock antenna in the Asteroid Day pack. How do we fit that into this? I'm of 2 minds about this. OT1H, I like have 4 antenna so we can have more difference in their ranges. But OTOH, right now the AsteroidDay is optional, an "official mod" instead of fully stock, so there's a chance some folks would use this mod but not have the new antenna.

Edited by Geschosskopf
Link to comment
Share on other sites

Thoughts:

Because AsteroidDay isn't packaged with stock KSP (yet?), I need to keep the current three-antenna balance.

But, because ModuleManager can detect mods just fine, I can check for AsteroidDay and do a custom four-antenna balance with the four Squad antennas. It helps that there's only one of them, so I can do this without tons and tons of effort. ;)

But but, because the HG-55 is basically the same as the 88-88 statistically, except slightly lower power and a bit less than half the size (according to my GIMP caliper measuring), physics has an answer for us: if it uses 2/3 the power and has .18 times the area, it should have sqrt(.66 * .18) = .345 times the range. This puts it basically smack-dab in between the DTS and the 88-88, which is an... awkward spot. I'm not sure I like it.

But but but, the HG-55 comes at a really awkward point in the tech tree. I mean, automation, Squad? What gives? They're clearly intending this as a "better" part than the 88-88... and I guess it does come with 2/3 less power use... but its placement in the tech tree makes it really hard for me to decide what I should do with it.

So, I have two basic ideas. One is to stick with it at 34% of the 88-88 as physics suggests and give it a really low maxPowerFactor (counterintuitively, this is a boon). This means it will always be a superior choice to the DTS. It will get you out to Eeloo, but not far beyond. The 88-88 would be a better choice if I used a nice round number like "2" for the maxPowerFactor; if I went to 1.5 then the HG-55 would always be the best choice unless you needed the range.

Here are some numbers for that concept:

[TABLE][TR][TD][TABLE][TR][TD][/TD][TD]From→[/TD][TD]Comm. 16[/TD][TD]Comms DTS[/TD][TD]HG-55[/TD][TD]Comm. 88-88[/TD][/TR][TR][TD]To↓[/TD][TD][m][/TD][TD]1.80E+04[/TD][TD]6.30E+09[/TD][TD]1.26E+10[/TD][TD]3.70E+10[/TD][/TR][TR][TD]Comm. 16[/TD][TD]1.80E+04[/TD][TD]1.80E+04[/TD][TD]1.06E+07[/TD][TD]1.50E+07[/TD][TD]2.58E+07[/TD][/TR][TR][TD]Comms DTS[/TD][TD]6.30E+09[/TD][TD]1.06E+07[/TD][TD]6.30E+09[/TD][TD]8.90E+09[/TD][TD]1.53E+10[/TD][/TR][TR][TD]HG-55[/TD][TD]0.00E+00[/TD][TD]0.00E+00[/TD][TD]0.00E+00[/TD][TD]0.00E+00[/TD][TD]0.00E+00[/TD][/TR][TR][TD]Comm. 88-88[/TD][TD]3.70E+10[/TD][TD]2.58E+07[/TD][TD]1.53E+10[/TD][TD]2.16E+10[/TD][TD]3.70E+10[/TD][/TR][TR][TD]KSC1[/TD][TD]8.00E+05[/TD][TD]1.20E+05[/TD][TD]7.10E+07[/TD][TD]1.00E+08[/TD][TD]1.72E+08[/TD][/TR][TR][TD]KSC2[/TD][TD]2.00E+11[/TD][TD]6.00E+07[/TD][TD]3.55E+10[/TD][TD]5.02E+10[/TD][TD]8.60E+10[/TD][/TR][TR][TD]KSC3[/TD][TD]2.00E+12[/TD][TD]1.90E+08[/TD][TD]1.12E+11[/TD][TD]1.59E+11[/TD][TD]2.72E+11[/TD][/TR][/TABLE][/TD][TD][TABLE][TR][TD]|[/TD][TD][/TD][TD][/TD][TD][/TD][TD][/TD][TD][/TD][/TR][TR][TD]|[/TD][TD]To↓ From→[/TD][TD]Comm. 16[/TD][TD]Comms DTS[/TD][TD]HG-55[/TD][TD]Comm. 88-88[/TD][/TR][TR][TD]|[/TD][TD]Comm. 16[/TD][TD]<Kerbin Orbit[/TD][TD]Kerbisynchronous Orbit[/TD][TD]Kerbin->Mun[/TD][TD]Kerbin->Mun[/TD][/TR][TR][TD]|[/TD][TD]Comms DTS[/TD][TD]Kerbisynchronous Orbit[/TD][TD]Jool's Moons[/TD][TD]Jool's Moons[/TD][TD]Jool's Moons[/TD][/TR][TR][TD]|[/TD][TD]HG-55[/TD][TD]<Kerbin Orbit[/TD][TD]<Kerbin Orbit[/TD][TD]<Kerbin Orbit[/TD][TD]<Kerbin Orbit[/TD][/TR][TR][TD]|[/TD][TD]Comm. 88-88[/TD][TD]Kerbin->Mun[/TD][TD]Jool's Moons[/TD][TD]Kerbin->Duna @ Transfer[/TD][TD]Kerbin->Duna[/TD][/TR][TR][TD]|[/TD][TD]KSC1[/TD][TD]Low Kerbin Orbit[/TD][TD]Kerbin->Minmus[/TD][TD]Kerbin SOI[/TD][TD]Kerbin SOI[/TD][/TR][TR][TD]|[/TD][TD]KSC2[/TD][TD]Kerbin->Minmus[/TD][TD]Kerbin->Duna[/TD][TD]Kerbin->Duna[/TD][TD]Kerbin->Jool[/TD][/TR][TR][TD]|[/TD][TD]KSC3[/TD][TD]Kerbin SOI[/TD][TD]Kerbin->Jool[/TD][TD]Kerbin->Eeloo[/TD][TD]Kerbin->Eeloo[/TD][/TR][/TABLE][/TD][/TR][/TABLE]

Another concept would be to throw science to the wind and do a balance based on KSC3 ranges of Kerbin SOI like: Kerbin SOI // Kerbin->Duna // Kerbin->Jool // Kerbin->Eeloo for 16 // DTS // HG-55 // 88-88, respectively. I'd reposition the HG-55 to someplace more central in the tree like; maybe reposition the 16 and the DTS as well. Something like the 16 at Start, the DTS at Survivability (since you get landing legs and service bays there; it's a pretty natural "let's go to a moon" spot and you need the DTS to do so), the HG-55 at one of the 90s down there... probably Miniaturization because it's a potential parent for Electronics and in general feels like it could use a boost. Leave the 88-88 in electronics. Here are some numbers for that kind of concept:

[TABLE][TR][TD][TABLE][TR][TD][/TD][TD]From→[/TD][TD]Comm. 16[/TD][TD]Comms DTS[/TD][TD]HG-55[/TD][TD]Comm. 88-88[/TD][/TR][TR][TD]To↓[/TD][TD][m][/TD][TD]1.80E+04[/TD][TD]6.30E+08[/TD][TD]6.30E+09[/TD][TD]3.70E+10[/TD][/TR][TR][TD]Comm. 16[/TD][TD]1.80E+04[/TD][TD]1.80E+04[/TD][TD]3.37E+06[/TD][TD]1.06E+07[/TD][TD]2.58E+07[/TD][/TR][TR][TD]Comms DTS[/TD][TD]6.30E+08[/TD][TD]3.37E+06[/TD][TD]6.30E+08[/TD][TD]1.99E+09[/TD][TD]4.83E+09[/TD][/TR][TR][TD]HG-55[/TD][TD]6.30E+09[/TD][TD]1.06E+07[/TD][TD]1.99E+09[/TD][TD]6.30E+09[/TD][TD]1.53E+10[/TD][/TR][TR][TD]Comm. 88-88[/TD][TD]3.70E+10[/TD][TD]2.58E+07[/TD][TD]4.83E+09[/TD][TD]1.53E+10[/TD][TD]3.70E+10[/TD][/TR][TR][TD]KSC1[/TD][TD]8.00E+05[/TD][TD]1.20E+05[/TD][TD]2.24E+07[/TD][TD]7.10E+07[/TD][TD]1.72E+08[/TD][/TR][TR][TD]KSC2[/TD][TD]2.00E+11[/TD][TD]6.00E+07[/TD][TD]1.12E+10[/TD][TD]3.55E+10[/TD][TD]8.60E+10[/TD][/TR][TR][TD]KSC3[/TD][TD]2.00E+12[/TD][TD]1.90E+08[/TD][TD]3.55E+10[/TD][TD]1.12E+11[/TD][TD]2.72E+11[/TD][/TR][/TABLE][/TD][TD][TABLE][TR][TD]|[/TD][TD][/TD][TD][/TD][TD][/TD][TD][/TD][TD][/TD][/TR][TR][TD]|[/TD][TD]To↓ From→[/TD][TD]Comm. 16[/TD][TD]Comms DTS[/TD][TD]HG-55[/TD][TD]Comm. 88-88[/TD][/TR][TR][TD]|[/TD][TD]Comm. 16[/TD][TD]<Kerbin Orbit[/TD][TD]Kerbisynchronous Orbit[/TD][TD]Kerbisynchronous Orbit[/TD][TD]Kerbin->Mun[/TD][/TR][TR][TD]|[/TD][TD]Comms DTS[/TD][TD]Kerbisynchronous Orbit[/TD][TD]Jool's Moons[/TD][TD]Jool's Moons[/TD][TD]Jool's Moons[/TD][/TR][TR][TD]|[/TD][TD]HG-55[/TD][TD]Kerbisynchronous Orbit[/TD][TD]Jool's Moons[/TD][TD]Jool's Moons[/TD][TD]Jool's Moons[/TD][/TR][TR][TD]|[/TD][TD]Comm. 88-88[/TD][TD]Kerbin->Mun[/TD][TD]Jool's Moons[/TD][TD]Jool's Moons[/TD][TD]Kerbin->Duna[/TD][/TR][TR][TD]|[/TD][TD]KSC1[/TD][TD]Low Kerbin Orbit[/TD][TD]Kerbin->Mun[/TD][TD]Kerbin->Minmus[/TD][TD]Kerbin SOI[/TD][/TR][TR][TD]|[/TD][TD]KSC2[/TD][TD]Kerbin->Minmus[/TD][TD]Jool's Moons[/TD][TD]Kerbin->Duna[/TD][TD]Kerbin->Jool[/TD][/TR][TR][TD]|[/TD][TD]KSC3[/TD][TD]Kerbin SOI[/TD][TD]Kerbin->Duna[/TD][TD]Kerbin->Jool[/TD][TD]Kerbin->Eeloo[/TD][/TR][/TABLE][/TD][/TR][/TABLE]

In spite of Squad's choice that the HG-55 is "better" than the 88-88, because it is the same shape of antenna and demonstrably smaller than the 88-88 I'm determined that it be shorter range in any case. Thoughts and discussion warmly welcomed!

Link to comment
Share on other sites

Thoughts:

-------------------------------------------------------------------------

In spite of Squad's choice that the HG-55 is "better" than the 88-88, because it is the same shape of antenna and demonstrably smaller than the 88-88 I'm determined that it be shorter range in any case. Thoughts and discussion warmly welcomed!

I don't know, only just got home from work and saw the new A-D expansion, and haven't really played around with it, but honestly, I'm thinking of copying the stats for the DTS onto it for my self, and using it as a smaller mid range probe antenna, I hate how ugly the DTS looks on small probes. {I'll probably move the new antenna around in the tech tree, like all the other antenna's}

Edit: Never mind, that new antenna is going to be just as awkward to put on probes. Not sure what I'm going to do with it now.

Edited by vardicd
Link to comment
Share on other sites

vardicd, that's not far off from my first concept above. In general I like that concept better, I think, particularly in that has the least opportunity for incompatibility with stock saves.

In the meantime, I realized I didn't link the patches page on the wiki above; here it is now: https://github.com/toadicus/AntennaRange/wiki/Compatibility-Patches

Link to comment
Share on other sites

In spite of Squad's choice that the HG-55 is "better" than the 88-88, because it is the same shape of antenna and demonstrably smaller than the 88-88 I'm determined that it be shorter range in any case. Thoughts and discussion warmly welcomed!

If you can make it so the mod as a whole can cater to folks using A-D or not, then I say go for it (because I have it and want to fit it into my game somehow).

I rather like your 1st option better. I agree that the HG-55 should reach somewhere between the DTS and 88 (I used to play with radios back in the day so that just looks intuitively better to me). I don't think it should have a whole lot of range because it looks basically like it was stolen from a mock-up of the Apollo LEM :).

In my experience, range is more important to players than bandwidth because range is an absolute bar while bandwidth is just something to work around. Therefore, in terms of the tech tree, IMHO antennae should be ranked by range, so I vote for some arrangement where the HG-55 falls between the DTS and the 88 on the tech tree, just as it does in range.

Link to comment
Share on other sites

By the way, has anyone else run into this little glitch, where the info for all the antenna's is borked?

http://i.imgur.com/yys10YH.jpg

http://i.imgur.com/dI5Hmkc.jpg

http://i.imgur.com/3AAWKOb.jpg

http://i.imgur.com/lFju8fh.jpg

I did when I tried to make a config for SETIctt.

Since SETIctt usually adds low range antennas to all probes and command pods, I thought it just did not like antennas on command modules.

Seems as if it is not dependent on this.

I would love for it to be fixed, at the moment I remove those antennas from command parts since I can not have their descriptions getting glitched out.

Edited by Yemo
Link to comment
Share on other sites

In my experience, range is more important to players than bandwidth because range is an absolute bar while bandwidth is just something to work around.

Bandwidth could be a true limit, if toadicus desired.

Have each vessel (loaded or unloaded) require X bandwidth back to KSC based on probe cores and crew (C&C/telemetry/comms traffic) and compare the combine incoming bandwidth of a relay with what it is capable of sending on to the next point of the network (combine bandwidth of multiple in-range antenna). If the needed bandwidth exceeds the hop's limit at any point on the path back to KSC, the active unmanned vessel cannot be controlled. Also limit science transmission to the slowest hop in the chain (determined by leftover bandwidth).

A bit complicated to implement, but it would add meaning to bandwidth stats beyond "how long do I have to sit here for?"

Link to comment
Share on other sites

By the way, has anyone else run into this little glitch, where the info for all the antenna's is borked?
I did when I tried to make a config for SETIctt.

I've found this bug and squashed it. I'll release it soon.

If you can make it so the mod as a whole can cater to folks using A-D or not, then I say go for it (because I have it and want to fit it into my game somehow).

I rather like your 1st option better. I agree that the HG-55 should reach somewhere between the DTS and 88 (I used to play with radios back in the day so that just looks intuitively better to me). I don't think it should have a whole lot of range because it looks basically like it was stolen from a mock-up of the Apollo LEM :).

In my experience, range is more important to players than bandwidth because range is an absolute bar while bandwidth is just something to work around. Therefore, in terms of the tech tree, IMHO antennae should be ranked by range, so I vote for some arrangement where the HG-55 falls between the DTS and the 88 on the tech tree, just as it does in range.

So, I don't really disagree with that logic, but there aren't a lot of good places to put it. "Advanced Electrics" just doesn't seem thematically right, and neither does "Precision Engineering". "Unmanned Tech" might work; it's in the same tier as as the 88-88, so it basically lets you pick "lower power" versus "longer range" once you get to that tier.

Bandwidth could be a true limit, if toadicus desired.

Have each vessel (loaded or unloaded) require X bandwidth back to KSC based on probe cores and crew (C&C/telemetry/comms traffic) and compare the combine incoming bandwidth of a relay with what it is capable of sending on to the next point of the network (combine bandwidth of multiple in-range antenna). If the needed bandwidth exceeds the hop's limit at any point on the path back to KSC, the active unmanned vessel cannot be controlled. Also limit science transmission to the slowest hop in the chain (determined by leftover bandwidth).

A bit complicated to implement, but it would add meaning to bandwidth stats beyond "how long do I have to sit here for?"

That's not something I'm very interested in at this point. Limiting player control is already a mechanic I don't like; making it even harder seems a little misguided to me. I'll think about it; feel free to keep lobbying. :)

Link to comment
Share on other sites

BigFatStupidHead, I don't have a second github account to see what things look like for non-authorized users on the repo, but the docs tell me that "anyone with a github account" should be able to edit it. You shouldn't need any actual knowledge of git to do so, and can write in the markup language of your choice.

Link to comment
Share on other sites

That's not something I'm very interested in at this point. Limiting player control is already a mechanic I don't like; making it even harder seems a little misguided to me. I'll think about it; feel free to keep lobbying. :)

Not really a feature request, just a statement of possibility in response to Greschosskopf.

I'm well aware such a system would be more complex and processor consuming than the current setup. And it would thematically fit remotetech more anyway.

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...