Closed HaullyGames closed 5 years ago
for example: float GetSignalStrength(Guid A, Guid B)
Hi,
Are you okay with this methods of double-type return? You don't need to get from RT the current range distance between A and B as you can calculate straight from A and B positions.
public static double GetMaxRangeDistance(Guid A, Guid B)
That will be perfect. Thanks
Hi, please verify this new method at your end.
@HaullyGames A gentle reminder before I publish a new official RT release
Sorry, I didn't test the distance yet, I should test it tonight.
The module works!
But I would like to do a new requirement or help from you. When the vessel has direct connection with the GroundStation, how can I get the distance between a vessel and RT_groundStation? I can get the distance between two vessels then divide by max_distance and get the perct, but I can't find the distance between a vessel and RT groundstation.
UPDATE I found something
Could you please add the RangeModelExtensions.DistanceTo() to API? but it needs to receive GUID then find the ISatellite, like all other API modules.
Also, with this new change, could you please update the API.GetControlPath to include the groundstation guid?
// Get all satellites, not the last jump that is a station ground
for (int i = 0; i < bestRouter.Count - 1; i++)
To
// Get all satellites till the station ground
for (int i = 0; i < bestRouter.Count; i++)
You may test both GetMaxRangeDistance
and GetRangeDistance
between ground station and vessels. They should work fine.
Thanks, I will test it tonight, in few hours I can confirm to you.
Hi @KSP-TaxiService , not sure because I didn't test yet, but I think the "for" will break the array index.
I think you need to remove the -1 from
Guid[] guids = new Guid[bestRouter.Count - 1];
as you did for the "for", otherwise you will have an array of x-1 indexes, and will try add x indexes into it.
Yep, error about index is out of range
IndexOutOfRangeException: Array index is out of range.
RemoteTech.API.API.GetControlPath (Guid id)
Oops my bad. Please try again.
All good, please let me know when you release. Everything working fine, Kerbalism will wait for your release now.
Thanks, it will be out in one or two days. It is undergone the rigorous testing on the KSP major version
When you release, please backport to KSP 1.4.5 because many players cannot move to 1.5.x - at least because of Kopernicus which waits for a proper release of KSP 1.5.2+
Could you please Add a new API method to return a float(% of max range)? Need it to define bandwidth in Kerbalism.
Thanks