
I like to standardize on the Lave Metre (Lm) - I wish Oolite did!
Moderators: winston, another_commander
Oolite enables the Cavezzo of La Serenissima before Napoleon laid waste to it.
No way! Metric degeneracy!! Fight it to the bitter end!!!
Code: Select all
this.$ctLastDist = this.$ctDist;
var ps = player.ship;
// present distance to station
var spos = system.mainStation.position;
this.$ctDist = ps.position.distanceTo(spos);
// distance travelled in one second
var travelledSecond = this.$ctLastDist - this.$ctDist;
Are you trying to replicate the Updating TSC oxp?Reval wrote: ↑Thu Apr 24, 2025 10:16 pmooh I just figured it out and it all seems to fall into place... I put this inside a timer:
and the distance travelled in one second on the timer matches the current ship speed as shown in the GETter HUD. Woohoo! So now, getting the time to Station at present speed is trivial.Code: Select all
this.$ctLastDist = this.$ctDist; var ps = player.ship; // present distance to station var spos = system.mainStation.position; this.$ctDist = ps.position.distanceTo(spos); // distance travelled in one second var travelledSecond = this.$ctLastDist - this.$ctDist;
![]()
The
Code: Select all
this.$ctShips = system.addShips("ct_convoy", this.$ctNumCompanion,[0,0,0]);
var ships = this.$ctShips;
// make each Companion a member of a Group
this.$ctGroup = new ShipGroup("COBRA Convoy",player.ship);
for(var x=0; x<ships.length; x++) {
this.$ctGroup.addShip(ships[x]);
}