Jump to content

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


linuxgurugamer

Recommended Posts

2 hours ago, virtualpolecat said:

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!

Perhaps the list is affected by the filters on map view. It happens in other mods.

Edited by Tacombel
Link to comment
Share on other sites

  • 1 month later...

This is on KSP 1.11.1 and in a heavily modded game so I realize I'm in unsupported territory, but the Signal Strength / Distance window displays incorrectly with JNSQ and possibly other modded solar systems. In the screenshot Eelo and Nara  are displaying the correct values for Minmus and the Mun respectively. Testing with other antennas revealed similar swaps (e.g., Duna is displaying the values for Jool and vice versa). This is only a display error in this window -- ranges display correctly in the tracking station and antennas connect where they should.

If helpful I can do a test with just stock parts and JNSQ installed.

https://imgur.com/a/IZxKDSB

Link to comment
Share on other sites

On 3/10/2021 at 8:47 PM, somnambulist said:

@linuxgurugamer -- had some free time to run a few tests. The bug is reproducible in a vanilla install with only Antenna Helper 1.0.7.3 beta and its dependencies installed. Logs and a persistence file if it's helpful https://drive.google.com/file/d/19IUt5CXOc_Z-KV6hGtCsNoMXRnWlPArZ/

Using OPM in 1.11.1 and seeing the same list-reversal type issue in the VAB. It was not present in 1.0.7.2.

I moved to the beta because I noticed that Antenna Helper was using the comms of my probe core for it's "Total Power" in-flight, instead of the power of the external antenna. This behavior persists in both 1.0.7.2 and 1.0.7.3-beta

Logs:

https://drive.google.com/file/d/1owefb-UYPJsqvo02zkFfDOgu9qXWDQu5/view?usp=sharing

screenshot:

notice the incorrect "Total Power" in the Antenna Helper window, it is 5000 and should be 500,000. Also notice the discrepancy between the Antenna Helper signal strength and the stock signal strength.

edit: the issue also applies to the map view with the colored circles. Also, a craft with a relay antenna correctly uses the relay antenna power instead of the probe core's direct antenna.

5GfYTn4.png

Edited by drhay53
Link to comment
Share on other sites

  • 4 weeks later...

So I seem to be having a problem with Near Future Exploration phased array antennas and dishes. In the VAB when I load the craft it shows very low values for the strength and range. In this case a power of about 9M. If I just pick up and reattach  one of the antennas the value jumps to a much better 10573M. The bigger problem is that in flight its also doesn't recognize the correct relay value when looking at it as a relay. Though if I fly the relay craft directly it does show the correct values.

I  saved as target a craft that I had moved the antenna on and when i have another craft use it as a a relay I get the correct values but when i point it at the live version of the identical craft i get the small number(I'm guessing the probe  antenna.)   

3x2 RA-X1 antennas pointing at 2 RFL-50 reflectors. 

Am I missing something or doing something wrong?

 

tom

Link to comment
Share on other sites

  • 4 months later...

New release, 1.0.7.4

1.0.7.3  (never released)
    Optimization of a number of loops
    Optimized of calculations, reducing number of multiplication functions
    Fixed calculation error of range and power, mod was doing an extra multiplication of the rangeModifier, only noticeable  when range modifier != 1
    Added Alt Skin flag to the stock settings page, default is true to maintain current behaviour
    Fixed the wrapping of text causing lines to be misaligned in the editor

1.0.7.4
    Added AssemblyFileVersion
    Updated version file for 1.12
 

Link to comment
Share on other sites

30 minutes ago, linuxgurugamer said:

Besides the pics, can you be specific?  Which bug?  I see a problem with the left window, which looks like a sorting error

Sorry, yes, I was referring to the sorting error. In 1.0.7.4 the signal strength list appears to be sorted backwards; in 1.0.7.2 it's correct.

Link to comment
Share on other sites

  • 3 months later...

Darn, the icon is gone mid-flight, there is one NRE in the log:

[EXC 16:18:03.555] NullReferenceException: Object reference not set to an instance of an object
    AntennaHelper.AHShipList.ComputeRealSignal (Vessel v) (at <410b4d9350104f37b1e9f94804bc30cc>:0)
    AntennaHelper.AHShipListListenerTR+<ParseVesselsConnection>c__Iterator1.MoveNext () (at <410b4d9350104f37b1e9f94804bc30cc>:0)
    UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <12e76cd50cc64cf19e759e981cb725af>:0)
    UnityEngine.DebugLogHandler:LogException(Exception, Object)
    ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
    UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)

Log:
https://www.dropbox.com/s/nchx3zxybl5pojt/KSP logs 2021-12-20-01.7z?dl=1

Link to comment
Share on other sites

  • 4 weeks later...

EDIT:
Following the crash log, I've found the problem is in https://github.com/linuxgurugamer/Antenna-Helper/blob/master/AntennaHelper/AHShipList.cs#L50

I've found another post of yours @linuxgurugamer where you explain probably the same issue, some parts may be null; probably just adding an if (availablePart == null) continue; could help. Surely some mod is doing something strange here, unfortunately I don't know which one.

 

Original:

Hello! I'd like to report another error I've found:

[EXC 01:46:22.203] NullReferenceException: Object reference not set to an instance of an object
	Part.FindModulesImplementing[T] () (at <39c0323fb6b449a4aaf3465c00ed3c8d>:0)
	AntennaHelper.AHShipList.GetPartList () (at <410b4d9350104f37b1e9f94804bc30cc>:0)
	AntennaHelper.AHShipList.DoStart () (at <410b4d9350104f37b1e9f94804bc30cc>:0)
	AntennaHelper.AHShipList.UpdateLoadedGame () (at <410b4d9350104f37b1e9f94804bc30cc>:0)
	AntennaHelper.AHShipListListener.Start () (at <410b4d9350104f37b1e9f94804bc30cc>:0)
	UnityEngine.DebugLogHandler:LogException(Exception, Object)
	ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
	UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)

I think this may be the reason why no "In Flight Ships" is shown in the Editor. Screenshot:

Spoiler

0zRFA25.png

Full log here: https://1drv.ms/u/s!AqQ0YW9so_5OgQ7QnLDxo61c9FuD?e=x1DC6N

Thanks guys for this mod, it is really a must-have. 

Edited by leonardfactory
Link to comment
Share on other sites

Hi @linuxgurugamer , I tested the release and the problem was still present. With a bit of debugging, I've found the source in two parts, kerbalEVAFuture and kerbalEVAfemaleFuture. Honestly, I didn't find where the parts are defined, but I suppose it's just Breaking Ground DLC stuff and it really doesn't matter for AntennaHelper.

Catching the exceptions and just skipping the parts finally restored AHShipList functionality. I prepared a Pull Request that should fix this here:

https://github.com/linuxgurugamer/Antenna-Helper/pull/4/files

Link to comment
Share on other sites

1 hour ago, leonardfactory said:

Hi @linuxgurugamer , I tested the release and the problem was still present. With a bit of debugging, I've found the source in two parts, kerbalEVAFuture and kerbalEVAfemaleFuture. Honestly, I didn't find where the parts are defined, but I suppose it's just Breaking Ground DLC stuff and it really doesn't matter for AntennaHelper.

Catching the exceptions and just skipping the parts finally restored AHShipList functionality. I prepared a Pull Request that should fix this here:

https://github.com/linuxgurugamer/Antenna-Helper/pull/4/files

Those are what the game uses for the kerbals, thanks for the PR, will merge today

Link to comment
Share on other sites

  • 5 months later...

Hello @linuxgurugamer This looks very helpful but it doesn't work for me at all in the Tracking Station with my main install. The Icon is there but clicking it does nothing. I think it works correctly in the editor, with a quick test. I haven't tried it in flight. 

I did a minimal install and it does work as expected in the tracking station (although I only had 1 ship in LKO so not a real stress test).

My main install has 65 mods so not so simple. For these logs, I just went to the tracking station and I took a screenshot before and after I clicked the AH icon to tag the logs with SCREENSHOT!! 

KSP log   player log

Here's the error 

Spoiler


[PlanetariumCamera]: Focus: Kerbin 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

Uploading Crash Report
NullReferenceException: Object reference not set to an instance of an object
  at AntennaHelper.AHShipList.ComputeRealSignal (Vessel v) [0x00050] in <6e8bf51d1f1f4d6b90145dc8e99bfb7e>:0 
  at AntennaHelper.AHShipListListenerTR+<ParseVesselsConnection>c__Iterator1.MoveNext () [0x00173] in <6e8bf51d1f1f4d6b90145dc8e99bfb7e>:0 
  at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00026] in <12e76cd50cc64cf19e759e981cb725af>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
 
(Filename: <6e8bf51d1f1f4d6b90145dc8e99bfb7e> Line: 0)

SCREENSHOT!! 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

SCREENSHOT!! 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)
 

 

Link to comment
Share on other sites

7 hours ago, Krazy1 said:

Hello @linuxgurugamer This looks very helpful but it doesn't work for me at all in the Tracking Station with my main install. The Icon is there but clicking it does nothing. I think it works correctly in the editor, with a quick test. I haven't tried it in flight. 

I did a minimal install and it does work as expected in the tracking station (although I only had 1 ship in LKO so not a real stress test).

My main install has 65 mods so not so simple. For these logs, I just went to the tracking station and I took a screenshot before and after I clicked the AH icon to tag the logs with SCREENSHOT!! 

What planet pack do you have installed?

Link to comment
Share on other sites

On 7/6/2022 at 2:54 AM, Krazy1 said:

Hello @linuxgurugamer This looks very helpful but it doesn't work for me at all in the Tracking Station with my main install. The Icon is there but clicking it does nothing. I think it works correctly in the editor, with a quick test. I haven't tried it in flight. 

I did a minimal install and it does work as expected in the tracking station (although I only had 1 ship in LKO so not a real stress test).

My main install has 65 mods so not so simple. For these logs, I just went to the tracking station and I took a screenshot before and after I clicked the AH icon to tag the logs with SCREENSHOT!! 

KSP log   player log

Here's the error 

While looking at the log file, I found several of these errors:


[ScienceSubject] - Error in converting Situation InSpaceHigh_System.ArgumentException: Requested value 'InSpaceHigh_' was not found.
  at System.Enum+EnumResult.SetFailure (System.Enum+ParseFailureKind failure, System.String failureMessageID, System.Object failureMessageFormatArgument) [0x00023] in <9577ac7a62ef43179789031239ba8798>:0 
  at System.Enum.TryParseEnum (System.Type enumType, System.String value, System.Boolean ignoreCase, System.Enum+EnumResult& parseResult) [0x0017a] in <9577ac7a62ef43179789031239ba8798>:0 
  at System.Enum.Parse (System.Type enumType, System.String value, System.Boolean ignoreCase) [0x00010] in <9577ac7a62ef43179789031239ba8798>:0 
  at System.Enum.Parse (System.Type enumType, System.String value) [0x00000] in <9577ac7a62ef43179789031239ba8798>:0 
  at ScienceUtil.GenerateLocalizedTitle (System.String id, System.Boolean skipAsteroidsComets) [0x0019e] in <39c0323fb6b449a4aaf3465c00ed3c8d>:0  
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35

While not related to the AH error, if you post your ModuleManager.configcache file, I might be able to help with this also.

Regarding the Tracking Center, what vessel or planet are  you focused on?  Not sure if it's significant, but I'd like to know

 

Edit:  I'll also need your save file

 

Edited by linuxgurugamer
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...