Read distance from/to planets from the space platform hub

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

eiennohito
Manual Inserter
Manual Inserter
Posts: 4
Joined: Tue Nov 05, 2024 12:04 am
Contact:

Read distance from/to planets from the space platform hub

Post 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.
runamucker
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Tue Nov 07, 2017 8:35 pm
Contact:

Re: Read distance from/to planets from the space platform hub

Post by runamucker »

+1
prophet005
Burner Inserter
Burner Inserter
Posts: 14
Joined: Mon Oct 21, 2024 12:02 pm
Contact:

Re: Read distance from/to planets from the space platform hub

Post by prophet005 »

+1
Chumfactor
Long Handed Inserter
Long Handed Inserter
Posts: 88
Joined: Thu Apr 07, 2016 9:17 pm
Contact:

Add Platform distance along route (circuit value)

Post 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!
computeraddict
Filter Inserter
Filter Inserter
Posts: 412
Joined: Sat Oct 07, 2023 6:44 am
Contact:

Re: Add Platform distance along route (circuit value)

Post by computeraddict »

Can't you integrate the speed?
eugenekay
Filter Inserter
Filter Inserter
Posts: 881
Joined: Tue May 15, 2018 2:14 am
Contact:

Re: Add Platform distance along route (circuit value)

Post 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.
Chumfactor
Long Handed Inserter
Long Handed Inserter
Posts: 88
Joined: Thu Apr 07, 2016 9:17 pm
Contact:

Re: Add Platform distance along route (circuit value)

Post 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. :o
bountygiver
Burner Inserter
Burner Inserter
Posts: 12
Joined: Fri Nov 15, 2024 5:45 am
Contact:

Re: Add Platform distance along route (circuit value)

Post 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.
computeraddict
Filter Inserter
Filter Inserter
Posts: 412
Joined: Sat Oct 07, 2023 6:44 am
Contact:

Re: Add Platform distance along route (circuit value)

Post 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
bountygiver
Burner Inserter
Burner Inserter
Posts: 12
Joined: Fri Nov 15, 2024 5:45 am
Contact:

Re: Add Platform distance along route (circuit value)

Post 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....
Svartrockstomten
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sun Sep 25, 2016 3:01 pm
Contact:

Re: Read distance from/to planets from the space platform hub

Post by Svartrockstomten »

Yes, please take my money!
eugenekay
Filter Inserter
Filter Inserter
Posts: 881
Joined: Tue May 15, 2018 2:14 am
Contact:

Re: Read distance from/to planets from the space platform hub

Post by eugenekay »

127573: Add Platform distance along route (circuit value) was posted after this one, but it has a more recent discussion.
Koub
Global Moderator
Global Moderator
Posts: 8087
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Read distance from/to planets from the space platform hub

Post by Koub »

eugenekay wrote: Fri Nov 28, 2025 10:56 pm [...]
[Koub] Nice catch, thanks, merged both threads.
Koub - Please consider English is not my native language.
dabalciunas
Inserter
Inserter
Posts: 41
Joined: Sat Apr 11, 2020 10:51 am
Contact:

Remaining distance to planet/etc

Post 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)
Koub
Global Moderator
Global Moderator
Posts: 8087
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Read distance from/to planets from the space platform hub

Post by Koub »

[Koub] Merged into an older thread with the same suggestion.
Koub - Please consider English is not my native language.
Post Reply

Return to “Ideas and Suggestions”