Page 1 of 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....