Jump to content

[1.12.x] Antenna Helper Adopted: Math your Antenna Range and Signal Strength


linuxgurugamer

Recommended Posts

2 hours ago, MalevolentNinja said:

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?

Something similar was pointed out by yuravian with the DSN multiplier there and I fixed it there, though I did not test it with all cases. 

Probably it was changed in the few last minor versions of ksp 

Link to comment
Share on other sites

10 minutes ago, flart said:

Something similar was pointed out by yuravian with the DSN multiplier there and I fixed it there, though I did not test it with all cases. 

Probably it was changed in the few last minor versions of ksp 

Thanks

9 minutes ago, Poodmund said:

That is the line I changed for the test version, and then he said:

Quote
  • 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

This was the version with the following change:

		public static double TruePower (double power) {
			// Apparently stock is already doing the multiplication internally
			return power;
			// return the "true power" of the antenna, stock power * range modifier
			//return power * HighLogic.CurrentGame.Parameters.CustomParams<CommNet.CommNetParams> ().rangeModifier;
		}

 

so now I'm really puzzled because the change that @flart says fixed his, seems to not work in AH, and in fact seems to totally ignore it (???) when the change isn't there.

I'll look into this more in a few days, this has already sucked up enough of today

Edited by linuxgurugamer
Link to comment
Share on other sites

22 minutes ago, Poodmund said:

No worries, Linux... these kind of things are really frustrating I know. It may be worth pinging @Li0n also (even though I know they've moved on from the mod) as a nugget of wisdom may be all it takes.

First thing I'm going to do is to replicate the issue.  Then I'll see how it goes.

@MalevolentNinja Do you have a save file set up to display the issue?  If so, can you send it to me, please

Link to comment
Share on other sites

1 hour ago, linuxgurugamer said:

First thing I'm going to do is to replicate the issue.  Then I'll see how it goes.

@MalevolentNinja Do you have a save file set up to display the issue?  If so, can you send it to me, please

Sure, here you go.

https://www.dropbox.com/sh/d2hogssqlnya7vo/AADw9gHABwhrUjFgUxSnf4Aia?dl=0

Extract to a fresh install of KSP 1.9.1
Open 'Test CommSat' in VAB
Open Antenna Helper
Select Relay
Select Pick A Target
Select In Flight Ships
Select 'RA-2 In Orbit' - this is the same ship, just cheated into orbit

The Range Modifier in this save is set to 1.84.

Both Power and Range should be 3.68G (2G * 1.84)
Antenna Helper shows 6.77G (2G * 1.84 * 1.84)

No rush! Oh and I don't say it enough, thanks for all you do for this community :)

Edited by MalevolentNinja
Link to comment
Share on other sites

6 minutes ago, MalevolentNinja said:

Sure, here you go.

https://www.dropbox.com/sh/d2hogssqlnya7vo/AADw9gHABwhrUjFgUxSnf4Aia?dl=0

Extract to a fresh install of KSP 1.9.1
Open 'Test CommSat' in VAB
Open Antenna Helper
Select Relay
Select Pick A Target
Select In Flight Ships
Select 'RA-2 In Orbit' - this is the same ship, just cheated into orbit

The Range Modifier in this save is set to 1.84.

Power/ Range should be 3.68G (2G * 1.84)
Antenna Helper shows 6.77 (2G * 1.84 * 1.84)

With specific instructions like this, I'm more able to figure things out.  Thanks

I'm wondering about something.  I assume you are at DSN Level 1.  Did you notice that in the Antenna Helper window, while the Power is listed, the Max Range is still correct and agrees with the RA-2 info panel provided by CommNet Antennas Info?

Is it possible that the Power is something else, and not range?

Link to comment
Share on other sites

1 minute ago, linuxgurugamer said:

With specific instructions like this, I'm more able to figure things out.  Thanks

I'm wondering about something.  I assume you are at DSN Level 1.  Did you notice that in the Antenna Helper window, while the Power is listed, the Max Range is still correct and agrees with the RA-2 info panel provided by CommNet Antennas Info?

Is it possible that the Power is something else, and not range?

(This is a Sandbox save, so DSN is at level 3. You can see this in the mod, the asterisks are on DSN Level 3)

I'm not sure what you mean "Max Range is correct". Here's what I see when I follow my steps.

S7MnhXi.png

Since the vessel only has one relay antenna, the vessel's antenna power rating is the same as the antenna - 2G * 1.84

And since we are trying to determine max range between two vessels with the same antenna power rating, the max range happens to be the same as the vessel's antenna power rating.

MaxRange = SQRT ( Vessel1 * Vessel2 )

This page explains it better than I can: https://wiki.kerbalspaceprogram.com/wiki/CommNet

 

Link to comment
Share on other sites

2 minutes ago, MalevolentNinja said:

(This is a Sandbox save, so DSN is at level 3. You can see this in the mod, the asterisks are on DSN Level 3)

I'm not sure what you mean "Max Range is correct". Here's what I see when I follow my steps.

Ok, forget what I said, I misunderstood something in the Pick a Target window

 

I suspect that a variable is being passed into the true power function two times, which would get the double multiplication.

What fun, now I get to dig

Link to comment
Share on other sites

Its pertinent to appreciate that power is a unitless quantity and does not specify range, as MalevolentNinja said above, range is the sq.root of the product of the total vessel power of point A and total vessel power of point B. When both end points have the same total vessel power then, yes, the range will coindidentally be the same as the power.

Also, in the persistent.sfs save file you can change the Range and DSN Modifier values to specific float values. Search for 'Range' and it should show up. Its easy to set it to something like 2, 5 or 10 to test with.

Link to comment
Share on other sites

4 minutes ago, Poodmund said:

Also, in the persistent.sfs save file you can change the Range and DSN Modifier values to specific float values. Search for 'Range' and it should show up. Its easy to set it to something like 2, 5 or 10 to test with.

Yeah that's what got me in trouble when I said the other mod was doing the same thing, so I started testing with more obscure values :)

Link to comment
Share on other sites

It seems to have fixed the issue of the single best antenna power being displayed using the Range Modifier value but I've spotted that the range modifier value is not being used when calculating the total vessel power when multiple antennas are on a craft and is still using the non-Range-Modifier-modified power values.

I spotted this by changing the Range Modifier to 2.00 which would change the Communotron-16's power from 500,000 to 1,000,000 and this antenna has a combinability exponent of 1 so the power adds up non-lossy. I put 1 Comm-16 on the vessel and it displays the vessel power as 1E+06 which is correct with a range modifier of 2.00, then added another Comm-16 but the power doesn't change (it should have increased to 2E+06 but stays at 1E+06), then I added another Comm-16 and the power displays as 1.5E+06 (instead of 3E+06). This would suggest that its using the range modifier multiplier when considering the strongest single antenna but not when calculating the total, combined vessel power. See screenshot below:

KVzAOUi.png

EDIT: Just for clarification, this issue persists across direct antenna and relay antenna.

Edited by Poodmund
Link to comment
Share on other sites

I was able to replicate @Poodmund's issue with the 1.0.7.3 beta, but I'm not sure I agree with what's causing it.

With RangeModifier=2.25 I get this

U82OgIW.png

The ship in the editor and the ship in-flight are the same vessel.

Strangely, it shows the wrong value for the current vessel's power, but it shows the correct value for the in-flight ship.

HG-5 = 5M

5M * 2.25 RangeModifier = 11.25M

Two HG-5 total vessel power = 11.25M*2^0.75 = 18.92M

Edited by MalevolentNinja
Link to comment
Share on other sites

And the reason its showing 11,250,000 as the Vessel Power is because its only considering the antenna power for the combined vessel power as 5,000,000 each, which resolves to 5E+06*(2)^0.75 = 8,408,964 which is less that 5E+06 * 2.25 (Range Modifier) = 11,250,000 ... so it thinks that just the 1 antenna is more powerful than both of them combined.

It would take 3 HG-5s at the standard power to eclipse the power of 1 HG-5 with a range modifier of 2.25. @MalevolentNinja, try adding a 3rd one on there and see if the Vessel Power finally updates to this number: 11,397,535 (this number being the power of 3 HG-5s with no range modifier applied).

If so, then it confirms my testing and suspicions.

Edited by Poodmund
Link to comment
Share on other sites

13 minutes ago, Poodmund said:

It would take 3 HG-5s at the standard power to eclipse the power of 1 HG-5 with a range modifier of 2.25. @MalevolentNinja, try adding a 3rd one on there and see if the Vessel Power finally updates to this number: 11,397,535 (this number being the power of 3 HG-5s with no range modifier applied).

Yep, that's what happens when I add a third. I see now what you're saying. Nice find :)

Edited by MalevolentNinja
Link to comment
Share on other sites

  • 1 month later...

Hello,

 

Reading through some previous posts it seems like this issue has been brought up but I wanted to add my experience here.

It seems like this mod double-counts the game difficulty setting for antenna multiplier. I am playing JNSQ so I decided to multiply my antenna ranges by 1.5 to ease my burden a bit. And the C2 high gain antenna is normally a 20m relay dish. So then in game it now shows it as 30m, but then if I place a single dish on a craft, it shows it as having 45m power. I have my own calculations in a spreadsheet so it's not the end of the world but I do really appreciate antenna helper. Thanks for all your work LGG, you're crazy incredible.

Thanks,

Link to comment
Share on other sites

  • 3 weeks later...

DDVSFqu.png

 

Im not playing with kopernicus or anything, the only mod I have that change antennas is near future exploration. I can get the full mod list if you need.

 

As you can see. the signal strenth/distance window seems to be... inverted somehow. I have zero signal to the mun, but 99.66% to the eeloo... (this works on all antennas, signal strength percent decreases as I get more powerful antennas on the ship.

Link to comment
Share on other sites

  • 1 month later...
On 9/1/2020 at 12:16 AM, NateDaBeast said:

I have an issue using this. The visual likes to disappear a lot unless I am zoomed X amount. As soon as I change the zoom level it disappears.

Example:

eLRnd0P.png

eidxP8G.png

I have the same problem. is there a setting for max view distance?

Link to comment
Share on other sites

  • 3 months later...

I'm playing on 1.11 and I am having an issue where when I'm designing a ship in the VAB and I open up Antenna Helper and click the "In Flight Ships" button (to target them for calculations) it doesn't show any relay satellites even though I have several in orbit around multiple bodies.

I believe the only mods that  mess with antenna that I have installed is the Near Future stuff. I also don't know if I'm doing something wrong or if this is indeed an actual bug.

Thanks!

Link to comment
Share on other sites

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