Page 1 of 1
Read distance from/to planets from the space platform hub
Posted: Wed Nov 06, 2024 3:28 am
by eiennohito
TL;DR
Add an option to read the distance to/from the currently navigated planet to the specified signal.
What?
We can read speed of the space platform, but the option to read distance would be also very helpful. The value is already in game.
Why?
While the distance is sort of possible to compute in theory by integrating speed with the time (using a clock circuit), reading the actual value to the circuit would be much easier to use. For example to decrease speed in areas with high asteroid density.
Re: Read distance from/to planets from the space platform hub
Posted: Thu Nov 21, 2024 8:51 am
by runamucker
+1
Re: Read distance from/to planets from the space platform hub
Posted: Mon Jan 06, 2025 3:48 pm
by prophet005
+1
Add Platform distance along route (circuit value)
Posted: Mon Mar 17, 2025 7:32 pm
by Chumfactor
I'd like to use circuitry to read the distance along the current space-platform path. I'm talking about the value displayed in the UI between the two planet<etc> icons, and "read" the same way I can read Speed (S) and Damage taken (D).
THIS post asks how to do it and
THIS one is about how it was added for scripting/modding. I just want that same value, but accessible via circuit network.
My specific use case is to make adjustments to platform behaviour (specifically, thruster throttling) at various steps along the way, but I can think of several additional uses.
Thanks!
Re: Add Platform distance along route (circuit value)
Posted: Mon Mar 17, 2025 7:38 pm
by computeraddict
Can't you integrate the speed?
Re: Add Platform distance along route (circuit value)
Posted: Mon Mar 17, 2025 9:48 pm
by eugenekay
I think this is better as a “Combinator Mod Idea”; I am just thankful that it was added to the Lua API. I am a little surprised there has not been one created yet.
computeraddict wrote: Mon Mar 17, 2025 7:38 pm
Can't you integrate the speed?
The Velocity signal provided by the Platform Hub is an Integer, whereas the actual Velocity has a floating-point component - so it is inherently inaccurate, and does not “Sum” correctly over any significant period of time…. I have nonetheless used it as a primitive “Odometer” to slow down / speed
up during certain conditions.
Re: Add Platform distance along route (circuit value)
Posted: Wed Mar 19, 2025 5:19 pm
by Chumfactor
computeraddict wrote: Mon Mar 17, 2025 7:38 pm
Can't you integrate the speed?
Sadly, no. Speed is truncated, so the odometer runs slow. That is, a speed of, say, 125.47m/s is reported as "125". If that's your steady speed, your Odo slowly loses distance over time.
Worse, it's truncated BEFORE reporting! In the above example, V [125.47] * 100 is reported as 12500.

Re: Add Platform distance along route (circuit value)
Posted: Wed Mar 19, 2025 9:35 pm
by bountygiver
computeraddict wrote: Mon Mar 17, 2025 7:38 pm
Can't you integrate the speed?
I actually had this idea before to make a harvester platform routinely go into deeper space for more asteroids and cut the thrusters so it drifts back, unfortunately it is incredibly inaccurate and the system broke after ~6 trips.
Re: Add Platform distance along route (circuit value)
Posted: Thu Mar 20, 2025 12:53 am
by computeraddict
bountygiver wrote: Wed Mar 19, 2025 9:35 pm
computeraddict wrote: Mon Mar 17, 2025 7:38 pm
Can't you integrate the speed?
I actually had this idea before to make a harvester platform routinely go into deeper space for more asteroids and cut the thrusters so it drifts back, unfortunately it is incredibly inaccurate and the system broke after ~6 trips.
If it works for one you can just reset it when it reaches a known location
Re: Add Platform distance along route (circuit value)
Posted: Thu Mar 20, 2025 5:33 pm
by bountygiver
computeraddict wrote: Thu Mar 20, 2025 12:53 am
bountygiver wrote: Wed Mar 19, 2025 9:35 pm
computeraddict wrote: Mon Mar 17, 2025 7:38 pm
Can't you integrate the speed?
I actually had this idea before to make a harvester platform routinely go into deeper space for more asteroids and cut the thrusters so it drifts back, unfortunately it is incredibly inaccurate and the system broke after ~6 trips.
If it works for one you can just reset it when it reaches a known location
Except there's no signal for actually reaching a known location. The way it works is by having the platform constantly trying to leave nauvis and the return is controlled by cutting off fuel because it is meant to only harvest space science and calcite, so the platform never reaches a known location and the origin/destination signal never changes.
A platform with such purpose would be fixed if they made interrupts actually trigger mid flight too....
Re: Read distance from/to planets from the space platform hub
Posted: Fri Nov 28, 2025 10:49 pm
by Svartrockstomten
Yes, please take my money!
Re: Read distance from/to planets from the space platform hub
Posted: Fri Nov 28, 2025 10:56 pm
by eugenekay
127573: Add Platform distance along route (circuit value) was posted
after this one, but it has a more recent discussion.
Re: Read distance from/to planets from the space platform hub
Posted: Sat Nov 29, 2025 8:09 am
by Koub
eugenekay wrote: Fri Nov 28, 2025 10:56 pm
[...]
[Koub] Nice catch, thanks, merged both threads.
Remaining distance to planet/etc
Posted: Tue Dec 02, 2025 11:02 am
by dabalciunas
Please additionally provide the distance to the target planet as a signal from the Space hub.
By integrating the velocity over time, we get a considerable error, since velocity is rounded to integer.
Another solution would be to provide velocity in m/s for higher precision, but I still prefer to have remaining distance to planet in km.
One thing does not exclude the other:
- velocity in m/s
- remaining distance to target (km)
Re: Read distance from/to planets from the space platform hub
Posted: Tue Dec 02, 2025 2:17 pm
by Koub
[Koub] Merged into an older thread with the same suggestion.