linuxgurugamer Posted March 1, 2020 Author Share Posted March 1, 2020 1 hour ago, luizsilveira said: Just a minor heads up, but this one is showing as incompatible to my 1.9.1 on CKAN. It seems to be something about how CKAN checks for compatibility, as it does say "any" for max version. Ninja edit: (it shows as compatible with 1.9 but not 1.9.1) I know, this is happening for most of my mods :-( Quote Link to comment Share on other sites More sharing options...
jamesf Posted April 1, 2020 Share Posted April 1, 2020 (edited) Quick question: If I'm showing DSN range in Map view (possibly only from Tracking Station? I don't remember) and dip below the plane of the ecliptic then the colored range circles move off of Kerbin and instead center on a point in space roughly two or three planetary radii away. Is this expected behavior? Anybody else have this happening? Thanks! And, for others, when I moved to KSP 1.9.1 and upgraded the mod the aforementioned problem disappeared. Thanks! Edited April 12, 2020 by jamesf Quote Link to comment Share on other sites More sharing options...
MalevolentNinja Posted June 18, 2020 Share Posted June 18, 2020 Howdy @linuxgurugamer There seems to be a bug in this mod. Tested on KSP 1.9.1, AntennaHelper 1.0.7.2, no other mods installed (aside from required dependencies). Steps to reproduce - create a ship with RA-2 relay antenna (antenna power rating of 2 Gm). Target is the same ship. Antenna Helper Mod shows the correct range. Then use the game settings to increase the range modifier to 2.0 Antenna Helper shows antenna power increased by factor of 4. If you change the range modifier setting to 3, Antenna Helper increases range by a factor of 9. It seems the mod is taking the range modifier setting, raising it to a power of 2 and using that as a multiplier. I looked at the source code, but I'm not good enough with C#, I couldn't find the problem. It seems to be in AHUtil.cs? Sorry. Thanks for all you do! Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted June 19, 2020 Author Share Posted June 19, 2020 (edited) That sounds mostly correct. In order to double the range, the power needs to be increased by 4. When you double the range, the area that the antenna must cover increases by 4. Too late for me to do any searches, but google it, you will be surprised by the results. edit: its the inverse square law, read about it here: https://en.wikipedia.org/wiki/Inverse-square_law pinging @MalevolentNinja Edited June 19, 2020 by linuxgurugamer Quote Link to comment Share on other sites More sharing options...
Poodmund Posted June 19, 2020 Share Posted June 19, 2020 (edited) No, something funky is going on here. The 'Range Modifier' doesn't actually modify the range, per se, of connections, it is just a multiplier coefficient that is applied against antenna parts' power rating. So for an RA-2 antenna with power of 2E+09 and a 'Range Modifier' of 2.0, the power of that antenna should become 4E+09 not 8E+09 as shown in the screenshot above. EDIT: Tested the issue myself and I am seeing the same thing. With a Range Modifier of 2.00 it is resulting with a vessel power of 8E+09 which is doubled. Interestingly, if you chose an antenna part for a target instead of a vessel, you can see that the part list option is correctly showing the RA-2's power as 4E+09 in the list so I expect the issue is occurring when the total vessel power is being calculated. My guess is that it is calculating the 'true power' of all antenna parts (as it should be doing) by multipling each antenna by the range modifier (as specified in AHUtil.cs) but then its also taking the total vessel power and multiplying it AGAIN by the range modifier which is why it appears to be raising it to the square of the range modifier. I just started to look through the Source Code and GitHub has just gone down. Also, as an aside, the text is becoming mis-aligned when the 'Status' text is wrapping to a new line. Edited June 19, 2020 by Poodmund Quote Link to comment Share on other sites More sharing options...
MalevolentNinja Posted June 19, 2020 Share Posted June 19, 2020 (edited) @linuxgurugamer I agree with @Poodmund - I've done some testing in game also. I started with a stock install of KSP and changed the game setting for range modifier to 2. I cheated a couple sats into orbit, each with one RA-2 relay antenna (antenna power of 2 Gm). I get a very faint link at 4 Gm, but lose connection any farther out. So it seems to me, the range modifier setting is a straight multiplication of the antenna power. The text that appears when you hover over the setting would indicate this also. Since the formula is range = sqrt ( Vessel1AntennaPower * Vessel2AntennaPower), the range will be doubled just by doubling the antenna power. Edited June 19, 2020 by MalevolentNinja Just a little math Quote Link to comment Share on other sites More sharing options...
Poodmund Posted June 19, 2020 Share Posted June 19, 2020 Just now, MalevolentNinja said: So it seems to me, the range modifier setting is a straight multiplication of the antenna power. The text that appears when you hover over the setting would indicate this also. This is most definitely the case. Individual Effective Antenna Power = Individual Default Antenna Power * Range Modifier Quote Link to comment Share on other sites More sharing options...
MalevolentNinja Posted June 19, 2020 Share Posted June 19, 2020 1 minute ago, Poodmund said: This is most definitely the case. Individual Effective Antenna Power = Individual Default Antenna Power * Range Modifier Also, just be aware, KSP does not show the effect of the range modifier setting in the part tooltip in the VAB. An RA-2 still shows an antenna power of 2G with the setting changed to 2. But it does work in flight. Quote Link to comment Share on other sites More sharing options...
Poodmund Posted June 19, 2020 Share Posted June 19, 2020 6 minutes ago, MalevolentNinja said: Also, just be aware, KSP does not show the effect of the range modifier setting in the part tooltip in the VAB. An RA-2 still shows an antenna power of 2G with the setting changed to 2. But it does work in flight. Yeah, if you want a fix for that to confirm the issue, try out this mod which resolves all of the broken UI displays with regards to CommNet: Theres been an issue raised about it for 2 years with no recognition... https://bugs.kerbalspaceprogram.com/issues/19996 Quote Link to comment Share on other sites More sharing options...
MalevolentNinja Posted June 19, 2020 Share Posted June 19, 2020 Nice, I'll check that out! Quote Link to comment Share on other sites More sharing options...
MalevolentNinja Posted June 19, 2020 Share Posted June 19, 2020 (edited) The CommNet Antennas Info mod acts similar to Antenna Helper. It shows an RA-2 (default antenna power of 2g) with a range modifier of 2 to have an antenna power of 8g. Which I bring up just to point out that the two mods agree, which made me question my sanity So I retested in stock KSP 1.9.1. Here we have two probes, each with an RA-2. And the range modifier is set to 2.25. I propose this math is correct: VesselAntennaPower = RA-2 * RangeModifier = 2,000,000,000 * 2.25 = 4.5G MaxRange = SQRT ( 4.5 * 4.5 ) = 4.5Gm Here's the in game test: I lose the link between the two probes at exactly 4.5Gm. Edit: The other mod 'CommNet Antennas Info' works correctly, my bad. Edited June 19, 2020 by MalevolentNinja Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted June 19, 2020 Author Share Posted June 19, 2020 I took a couple of minutes to look at the code. The only place that the rangemodifier is used is here: public static double TruePower (double power) { // return the "true power" of the antenna, stock power * range modifier return power * HighLogic.CurrentGame.Parameters.CustomParams<CommNet.CommNetParams>().rangeModifier; As you can see it's only doing a multiplication. Also, In @flart's CommNet Antennas Info, he uses it in two places: mdt.Fields["powerText"].SetValue( Formatter.ValueShort(mdt.antennaPower * commNetParams.rangeModifier) + moduleDT.Fields["powerText"].guiActiveEditor = false; double antennaPowerModified = moduleDT.antennaPower * commNetParams.rangeModifier; and double BuiltInPowerModified = GetPowerMostCommonInternalAntenna(partsDT) * commNetParams.rangeModifier; string BuiltInPowerModified_str = Formatter.ValueExtraShortSpaced(BuiltInPowerModified); double antennaPowerModified = moduleDT.antennaPower * commNetParams.rangeModifier; string[] DSNranges_str = new string[TrackingLevels]; As you can see, both mods are only using it in a simple multiplication. Now, I haven't done a lot of research, but what I think you might be missing is the fact that the OUTPUT power of the antenna is different than the sensitivity of the antenna for reception. Again, I haven't done a lot of work, this is merely the result of 5 minutes searching, and I'm not an expert in the intricacies of KSP antennas. But it seems to me that if two independent mods, both using the same calculation are both agreeing on the output, that maybe there is something else going on. I'm hoping that @flart can respond also, I'm interested in seeing what he says Quote Link to comment Share on other sites More sharing options...
Poodmund Posted June 19, 2020 Share Posted June 19, 2020 (edited) 11 minutes ago, linuxgurugamer said: Now, I haven't done a lot of research, but what I think you might be missing is the fact that the OUTPUT power of the antenna is different than the sensitivity of the antenna for reception. Again, I haven't done a lot of work, this is merely the result of 5 minutes searching, and I'm not an expert in the intricacies of KSP antennas. But it seems to me that if two independent mods, both using the same calculation are both agreeing on the output, that maybe there is something else going on. I also went through this and Flart's mod and I came to the same conclusion that it doesn't seem to be doing anything inccorrect but something may have been changed in KSP's Assembly library during the 1.8 or 1.9 update as I'm pretty sure this used to display properly. 'antennaPower' may now be factoring in the Range Modifier itself internally? Coincidentally Linux, my CommNet calculator (https://goo.gl/Wn03VL) was what Li0n used to resolve the mathematics behind this mod which agrees with what MalevolentNinja has shown above. EDIT: I'll go back through previous versions of KSP to see what differences there are. Edited June 19, 2020 by Poodmund Quote Link to comment Share on other sites More sharing options...
MalevolentNinja Posted June 19, 2020 Share Posted June 19, 2020 (edited) 28 minutes ago, linuxgurugamer said: I took a couple of minutes to look at the code. The only place that the rangemodifier is used is here: public static double TruePower (double power) { // return the "true power" of the antenna, stock power * range modifier return power * HighLogic.CurrentGame.Parameters.CustomParams<CommNet.CommNetParams>().rangeModifier; As you can see it's only doing a multiplication. I'm no programmer, but what if KSP is giving you the correct antenna power, with the range modifier already factored in, and then you are multiplying it by the modifier again? Edit: 19 minutes ago, Poodmund said: 'antennaPower' may now be factoring in the Range Modifier itself internally? Oops, @Poodmund already said that Edited June 19, 2020 by MalevolentNinja Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted June 19, 2020 Author Share Posted June 19, 2020 Quite possible, especially if it was added later. Do the antennas show up with the correct values in the editor? Correct as in already being multiplied? Quote Link to comment Share on other sites More sharing options...
MalevolentNinja Posted June 19, 2020 Share Posted June 19, 2020 Just now, linuxgurugamer said: Quite possible, especially if it was added later. Do the antennas show up with the correct values in the editor? Correct as in already being multiplied? The VAB/SPH part tooltip does not show the effect of the range modifier setting. See @Poodmund's bugtracker from 2 years ago https://bugs.kerbalspaceprogram.com/issues/19996 Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted June 19, 2020 Author Share Posted June 19, 2020 5 minutes ago, MalevolentNinja said: The VAB/SPH part tooltip does not show the effect of the range modifier setting. See @Poodmund's bugtracker from 2 years ago https://bugs.kerbalspaceprogram.com/issues/19996 Would you be willing to test a quick build with that removed? Quote Link to comment Share on other sites More sharing options...
MalevolentNinja Posted June 19, 2020 Share Posted June 19, 2020 I'd be happy to help out any way I can Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted June 19, 2020 Author Share Posted June 19, 2020 Here is a rebuild of the mod, only change was to remove the multiplication: https://www.dropbox.com/s/xr635hd1t7wc65i/AntennaHelper-1.0.7.2.zip?dl=0 Quote Link to comment Share on other sites More sharing options...
MalevolentNinja Posted June 19, 2020 Share Posted June 19, 2020 8 minutes ago, linuxgurugamer said: Here is a rebuild of the mod, only change was to remove the multiplication: https://www.dropbox.com/s/xr635hd1t7wc65i/AntennaHelper-1.0.7.2.zip?dl=0 I will test now. And I need to confess something... I made a mistake. I am very sorry for the confusion. The mod "CommNet Antenna Info" does not have the same problem. That mod shows the correct antenna power ratings with different range modifier settings. My mistake was because I had a leftover MM patch in place that doubled antenna power. Sorry! That said, Antenna Helper is definitely showing the wrong info, as I described above. Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted June 19, 2020 Author Share Posted June 19, 2020 1 minute ago, MalevolentNinja said: I will test now. And I need to confess something... I made a mistake. I am very sorry for the confusion. The mod "CommNet Antenna Info" does not have the same problem. That mod shows the correct antenna power ratings with different range modifier settings. My mistake was because I had a leftover MM patch in place that doubled antenna power. Sorry! That said, Antenna Helper is definitely showing the wrong info, as I described above. I would appreciate your doing the test in a brand new install, with ONLY AntennaHelper, CommNet Antenna Info and their required dependencies installed. Given that I looked into the code and saw the same calculation, I'm rather concerned that you don't have something else going on Quote Link to comment Share on other sites More sharing options...
MalevolentNinja Posted June 19, 2020 Share Posted June 19, 2020 (edited) Will do, I'm grabbing a fresh copy now. Edit: New install of KSP 1.9.1 with BG and MH Installed Antenna Helper with dependencies from CKAN Created new save file with range modifier of 1.90 Tested with RA-2. It should be 2G * 1.9 = 3.8G but Antenna helper shows 7.22G which is 2G * 1.9 * 1.9 So I was able to reproduce the issue. I did make a mistake about the other mod having the same issue (sorry!), but I verified again that Antenna Helper does show the wrong info. Replaced mod with build downloaded from dropbox loaded the save Antenna Helper shows range of 2G, which is the RA-2 without factoring in the range modifier So no luck @linuxgurugamer Edited June 19, 2020 by MalevolentNinja Quote Link to comment Share on other sites More sharing options...
Poodmund Posted June 19, 2020 Share Posted June 19, 2020 (edited) I can confirm the issue persists on KSP 1.7.0 through to KSP 1.9.1 with all the respective versions of Antenna Helper and dependencies built for those versions. So the issue has been around for a while. EDIT: Gone back as far as 1.4.3 and it still isn't working correctly. Edited June 19, 2020 by Poodmund Quote Link to comment Share on other sites More sharing options...
MalevolentNinja Posted June 19, 2020 Share Posted June 19, 2020 (edited) I don't know if this helps at all... With range modifier settings of < 1 it seems to work fine. I've only spot checked a couple settings, but they worked. Here's range modifier 0.64 (2G * 0.64 = 1.28G): With range modifier settings > 1 it seems to multiply antenna power by range modifier twice. Here's range modifier 2.48 (2G * 2.48 * 2.48 = 12.3G): You can see CommNet Antennas Info is showing the correct values in the tooltip. Edited June 19, 2020 by MalevolentNinja Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted June 19, 2020 Author Share Posted June 19, 2020 Just now, MalevolentNinja said: I don't know if this helps at all... With range modifier settings of < 1 it seems to work fine. I've only spot checked a couple settings, but they worked. Here's range modifier 0.64 (2G * 0.64 = 1.28G): Was this with the CKAN version of AntennaHelper? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.