[RELEASE] ILS Instrument Landing System v1.13

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

[RELEASE] ILS Instrument Landing System v1.13

Post by dybal »

Version 1.13 is available on the Expansion Manager or here.

Changes:
  • Calculate Dock world-coordinates orientation by concatenating its orientation in station model-coordinates with the Station orientation in world-coordinates.
  • Get direction of Dock widest dimension (depth excluded) based on Docks dimensions and world-coordinates orientation (general case, should work for all kinds of dock's placement on station models).
  • Use Dock's heading instead of Station's heading to get the position to aim on approach (should allow docking bays in the aft of the dockable).
  • Change rotation sync logic: if the ship's rotation is lagging, rotates in the same direction as the station; if it's advanced, rotate against the station; this avoids rotating too much inside the dock if a longer interval between FCB calls gets the ship sufficiently out-of-sync to start correcting again (the "let's rotate once more now we are inside the dock" bug...).
  • If the ship is approaching fast, start rotation sync farther away and rotate as much as possible in each FCB, otherwise do it more leisurely (for the visual beauty...might be still too fast for that and need some tuning).
I'm pretty sure I nailed that last rotation after entering the docking bay, but I'm not sure about the NPCs splashing themselves on the station's face... the bug fixes in v1.12 did deal with some cases (the off-centre docking bays and some station models where the widest dimension of the dock obtained by ILS to align the ships was incorrect), and I didn't find anything else in the code for NPC steering that could cause the splashing... if anybody sees it happening with v1.13, please let me know (the model of station they are splashing themselves on would be very useful to know, and a savefile docked at that station even more so - I don't know how to edit a savefile to change the system/station where the ship is).
User avatar
Cholmondely
Archivist
Archivist
Posts: 5364
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: [RELEASE] ILS Instrument Landing System v1.13

Post by Cholmondely »

dybal wrote: Wed Aug 12, 2020 2:36 pm
Version 1.13 is available on the Expansion Manager or here.

Changes:
  • Calculate Dock world-coordinates orientation by concatenating its orientation in station model-coordinates with the Station orientation in world-coordinates.
  • Get direction of Dock widest dimension (depth excluded) based on Docks dimensions and world-coordinates orientation (general case, should work for all kinds of dock's placement on station models).
  • Use Dock's heading instead of Station's heading to get the position to aim on approach (should allow docking bays in the aft of the dockable).
  • Change rotation sync logic: if the ship's rotation is lagging, rotates in the same direction as the station; if it's advanced, rotate against the station; this avoids rotating too much inside the dock if a longer interval between FCB calls gets the ship sufficiently out-of-sync to start correcting again (the "let's rotate once more now we are inside the dock" bug...).
  • If the ship is approaching fast, start rotation sync farther away and rotate as much as possible in each FCB, otherwise do it more leisurely (for the visual beauty...might be still too fast for that and need some tuning).
I'm pretty sure I nailed that last rotation after entering the docking bay, but I'm not sure about the NPCs splashing themselves on the station's face... the bug fixes in v1.12 did deal with some cases (the off-centre docking bays and some station models where the widest dimension of the dock obtained by ILS to align the ships was incorrect), and I didn't find anything else in the code for NPC steering that could cause the splashing... if anybody sees it happening with v1.13, please let me know (the model of station they are splashing themselves on would be very useful to know, and a savefile docked at that station even more so - I don't know how to edit a savefile to change the system/station where the ship is).
My most recent transmogrification to two-dimensionality occurred while trying to dock at a Tigershark Liner (http://wiki.alioth.net/index.php/Liners) when this wonderful .oxp decided to fly me through the side of the liner to get to the docking bay! Since I'd not tried this recently - and could only see a small portion of the liner, I did not realise what was happening!

I do understand that with only two fast action keys that there is little point having an on/off switch for the ILS (unless one is playing Ironman). But when a newer version of Oolite comes out (with more fast action keys), this .oxp is crying out for such a switch.

You have a 150,000 cr ship .... grumble, grumble ...
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

Re: [RELEASE] ILS Instrument Landing System v1.13

Post by dybal »

You can switch if off by untargetting the dockable ('u' in the default keyboard configuration). Granted, Telescope does make that rather difficult... I switch weapons on when I start docking procedures so Telescope would let me keep the target of my choosing (which might be no target!).

Right now there are two caveats to ILS:
  • It doesn't deal with moving (and by moving I don't mean rotating) dockables. That's a big problem if the dockable has a forward facing docking bay and keep moving when you try to dock. You can use it with Deep Space Dredgers because they stop moving (and trying to avoid a collision) for a while when receiving a docking clearance request, and since they don't required docking clearance you can keep asking for docking clearance to keep them static, but Liners do require docking clearance, and the only way to make them stop that I know is by using docking computers (in fact, docking with Liners and fast-docking when towing large ships are my only use for docking computers). I have no ideas of how to improve this.
  • It doesn't deal with the dockable physical limits impinging in your trajectory at all, so if you engage ILS from the wrong position (behind or close to the sides of the dockable, it might steer you right through the dockable to reach the docking lane. I have some ideas to improve this, but I want to conclude my work on several other OXPs before tackling it.
Only use ILS with Liners if the Liner is stopped, or you are way ahead of it in its heading and roughly aligned with the docking lane to start, and be ready to un-target and bail out.

EDIT: rule-of-thumb about positions to engage ILS: if you can't see the docking bay, you are in a bad position to engage ILS.
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: [RELEASE] ILS Instrument Landing System v1.13

Post by Norby »

My suggestions about the last two problems:
1. Moving dockables should be stopped when receive an ILS request, like sending a radio message about "Hey, I would like to dock, so stop moving!". When targeted by ILS then set ship.maxSpeed=0 on the dockable, then restore when docked or untargeted.
2. The trajectory should avoid a sphere around the dockable which sized to the double of ship.collisionRadius of the dockable. As you said there is a narrow (about 30 degree) cone before the dock where the ship should approach the dock. I think when the landing ship enter into the nearby sphere using ILS out of the best cone, then should turn away from the dockable and leave the sphere. You can achieve this either by targeting some waypoints placed around the dockable, or just travel out of a larger (3x) sphere before switch back to the standard ILS approach.
User avatar
Cholmondely
Archivist
Archivist
Posts: 5364
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: [RELEASE] ILS Instrument Landing System v1.13

Post by Cholmondely »

I still think a simple on/off switch is the real necessity!

Actually, it would be good to have that control for ILS and for the various automatic targetting systems too! (telescope has a complex version).
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

Re: [RELEASE] ILS Instrument Landing System v1.13

Post by dybal »

Norby wrote: Sun Dec 06, 2020 8:01 pm
My suggestions about the last two problems:
1. Moving dockables should be stopped when receive an ILS request, like sending a radio message about "Hey, I would like to dock, so stop moving!". When targeted by ILS then set ship.maxSpeed=0 on the dockable, then restore when docked or untargeted.
For some unfathomable reason, changing the dockable maxSpeed to 0 didn't occur to me :shock: :oops: :? :lol:
Norby wrote: Sun Dec 06, 2020 8:01 pm
2. The trajectory should avoid a sphere around the dockable which sized to the double of ship.collisionRadius of the dockable. As you said there is a narrow (about 30 degree) cone before the dock where the ship should approach the dock. I think when the landing ship enter into the nearby sphere using ILS out of the best cone, then should turn away from the dockable and leave the sphere. You can achieve this either by targeting some waypoints placed around the dockable, or just travel out of a larger (3x) sphere before switch back to the standard ILS approach.
That's basically what I had in mind (the waypoint variation, with the waypoint in the docking bay's "face" plane...)
Cholmondely wrote: Sun Dec 06, 2020 8:18 pm
I still think a simple on/off switch is the real necessity!
That would turn ILS into a primeable equipment... as you can see here, for some people the list of primeable equipment we have is already too large to cycle through.... in fact, some months back Milo got some OXP authors to change their OXP's quipments so they were not primeable anymore (Cargo Stopper and Xenon HUD mode come to mind)
User avatar
Cholmondely
Archivist
Archivist
Posts: 5364
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: [RELEASE] ILS Instrument Landing System v1.13

Post by Cholmondely »

dybal wrote: Mon Dec 07, 2020 6:16 pm
Norby wrote: Sun Dec 06, 2020 8:01 pm
My suggestions about the last two problems:
1. Moving dockables should be stopped when receive an ILS request, like sending a radio message about "Hey, I would like to dock, so stop moving!". When targeted by ILS then set ship.maxSpeed=0 on the dockable, then restore when docked or untargeted.
For some unfathomable reason, changing the dockable maxSpeed to 0 didn't occur to me :shock: :oops: :? :lol:
Norby wrote: Sun Dec 06, 2020 8:01 pm
2. The trajectory should avoid a sphere around the dockable which sized to the double of ship.collisionRadius of the dockable. As you said there is a narrow (about 30 degree) cone before the dock where the ship should approach the dock. I think when the landing ship enter into the nearby sphere using ILS out of the best cone, then should turn away from the dockable and leave the sphere. You can achieve this either by targeting some waypoints placed around the dockable, or just travel out of a larger (3x) sphere before switch back to the standard ILS approach.
That's basically what I had in mind (the waypoint variation, with the waypoint in the docking bay's "face" plane...)
Cholmondely wrote: Sun Dec 06, 2020 8:18 pm
I still think a simple on/off switch is the real necessity!
That would turn ILS into a primeable equipment... as you can see here, for some people the list of primeable equipment we have is already too large to cycle through.... in fact, some months back Milo got some OXP authors to change their OXP's quipments so they were not primeable anymore (Cargo Stopper and Xenon HUD mode come to mind)
Two points:
* As I hope I said above, it only makes sense for when there are more fast priming buttons than the 2 we have at the moment.
* I have been killed by pirates once in the past month (I know when to run!). But I have been killed by ILS at least 5 times!
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: [RELEASE] ILS Instrument Landing System v1.13

Post by Norby »

dybal wrote: Mon Dec 07, 2020 6:16 pm
For some unfathomable reason, changing the dockable maxSpeed to 0 didn't occur to me :shock: :oops: :? :lol:
Maybe need to force it by set velocity to zero. At last resort set the position and orientation to saved values in each frame.
dybal wrote: Mon Dec 07, 2020 6:16 pm
That would turn ILS into a primeable equipment
How about two ILS equipment? The "Auto ILS" could be the current non-primable variant, and a simple "ILS" could get primable property, then players buy what they like.
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

Re: [RELEASE] ILS Instrument Landing System v1.13

Post by dybal »

Cholmondely wrote: Mon Dec 07, 2020 8:02 pm
Two points:
* As I hope I said above, it only makes sense for when there are more fast priming buttons than the 2 we have at the moment.
* I have been killed by pirates once in the past month (I know when to run!). But I have been killed by ILS at least 5 times!
Yep, if we had more fast-priming keys, ILS could work as the docking computer: target the station you mean to dock with, then activate it.
Norby wrote: Mon Dec 07, 2020 8:49 pm
dybal wrote: Mon Dec 07, 2020 6:16 pm
For some unfathomable reason, changing the dockable maxSpeed to 0 didn't occur to me :shock: :oops: :? :lol:
Maybe need to force it by set velocity to zero. At last resort set the position and orientation to saved values in each frame.
I will give it a try, I think setting maxSpeed to 0 will work.
Norby wrote: Mon Dec 07, 2020 8:49 pm
dybal wrote: Mon Dec 07, 2020 6:16 pm
That would turn ILS into a primeable equipment
How about two ILS equipment? The "Auto ILS" could be the current non-primable variant, and a simple "ILS" could get primable property, then players buy what they like.
Yep, that will work now, and I'm always in favour of giving the player the final choice!

That's a roadmap for the next ILS version :D

And hopefully, doing the waypoint thing will solve the NPCs splashing themselves on the back of the station...
User avatar
Cholmondely
Archivist
Archivist
Posts: 5364
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: [RELEASE] ILS Instrument Landing System v1.13

Post by Cholmondely »

1) Looking at this page of posts, most of the issues should be sorted by Phkb's work on increasing the number of Fast Activation/Priming buttons for Oolite v.1.92. If there is then a primable ILS which can be turned on and off, and if the same is made true for Telescope, then it just becomes another easy item for the player to manage. So the super idea of having two purchasable variants of ILS (the current and a new primable one) would "future-proof" this oxp. (Also mentioned on cag's [Beta] Release of Telescope 2.0 thread).

2) But there is another problem which is (for me) a major immersions breaker. Once I've been near the Main Orbital Station I get messages about other ships setting their ILS to the Main Orbital S'n. Within scanner range of the "MOS", good! But when I'm 100,000 "kuː ʊm" distant on the far side of the solar system, this seems bizarre to say the least! Surely there must be some way of limiting these messages?

3) It would be good to have a description about how one docks on the tails of another ILS user (maybe even a You Tube video!). I don't want to risk my ship, so have never tried it: I'm a tad unsure about the description on the ILS wiki page...
If you target the station while another ship is using ILS then you lock on the landing ship - a help to find where it is. If you keep the station in your crosshairs when the current ship arrives into the dock then you get the right to use ILS regardless of whether there are others in the queue.
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: [RELEASE] ILS Instrument Landing System v1.13

Post by hiran »

If someone is touching the ILS OXP it might be nice to mark compatibility issue with the Imperial Star Destroyer. And/or vice versa.

https://bb.oolite.space/viewtopic.php?p=275063#p275063
Sunshine - Moonlight - Good Times - Oolite
User avatar
RockDoctor
---- E L I T E ----
---- E L I T E ----
Posts: 813
Joined: Sat May 01, 2010 9:05 pm
Location: Scotland

Re: [RELEASE] ILS Instrument Landing System v1.13

Post by RockDoctor »

hiran wrote: Wed Dec 01, 2021 12:04 pm
If someone is touching the ILS OXP it might be nice to mark compatibility issue with the Imperial Star Destroyer. And/or vice versa.

https://bb.oolite.space/viewtopic.php?p=275063#p275063
I've never met an ISD, but I tried ILS-ing onto a Leviathan a few times before mussing it's paintwork. Are these things deliberately taking avoiding action, or is ILS just not able to track the moving "glide path" of a Lebviathan quickly enough?
--
Shooting aliens for fun and ... well, more fun.
"Speaking as an outsider, what do you think of the human race?" (John Cooper Clark - "I married a Space Alien")
User avatar
Slartibartfast
Deadly
Deadly
Posts: 175
Joined: Mon Jan 21, 2008 3:54 pm

Re: [RELEASE] ILS Instrument Landing System v1.13

Post by Slartibartfast »

hi

tweak to make the ILS removable

/config/equipment.plist

Code: Select all

// test
(
   (
      4,
      500,
      "ILS Instrument Landing System",
      "EQ_ILS",
      "ILS will guide your ship into the dock of the station you targeted. The speed controls are in your hand so you can ignite Injectors to arrive faster or stop to avoid collisions.",
       {
	   "available_to_all" = yes;
	   "available_to_NPCs" = yes;
	   "available_to_player" = yes;
	   "damage_probability" = 1.0;
	   "fast_affinity_defensive" = no;
	   "fast_affinity_offensive" = no;
	   "portable_between_ships" = no;
	   "requires_cargo_space" = 0;
	   "requires_clean" = no;
	   "requires_empty_pylon" = no;
	   "requires_free_passenger_berth" = no;
	   "requires_full_fuel" = no;
	   "requires_mounted_pylon" = no;
	   "requires_non_full_fuel" = no;
//	   "script" = "ils.js";
	   "strict_mode_only" = no;
	   "strict_mode_compatible" = yes;
	   "visible" = yes; // listed on the F5F5 screen.
       }
    ),
// begin: added by Slartibartfast
    (
	4,
	250,
	"Remove ILS Instrument Landing System",
	"EQ_ILS_REMOVAL",
	"removes the ILS for 25 credits.",
		{
		"available_to_all" = yes;
		"requires_equipment" = "EQ_ILS";
		}
	)
// end:	added by Slartibartfast
)
/config/world-scripts.plist

Code: Select all

(
	"removescript.js",
	"ils.js"
)
/Scripts/removescript.js ( add new file )

Code: Select all

// remove script for ILS - based on beercooler

this.name           = "ILS.oxp";
this.description    = "script for removing the ILS";
this.author         = "Slartibartfast";
this.copyright      = "no© 2022 Slartibartfast";
this.license				= "CC-by-nc-sa 3.0"; // .. necessary?
this.version        = "0.1.0";


this.playerBoughtEquipment = function(equipmentKey)
{
	if(equipmentKey == "EQ_ILS_REMOVAL")
	{
		player.ship.removeEquipment("EQ_ILS");
		player.ship.removeEquipment("EQ_ILS_REMOVAL");
	}
}
Oolite 1.91 / Imp. Trader ( slighly modified :wink: ) on Lubuntu 22.04 LTS on AMD64 2x 3800+ ,
ATI Radeon R7240 XFS / Samsung TV 40" 1080p
C-Media CMI8738 / Yamaha RX-V575 / DIY-Speaker
Logitech Attack3 & standard german keyboard
User avatar
Cholmondely
Archivist
Archivist
Posts: 5364
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: [RELEASE] ILS Instrument Landing System v1.13

Post by Cholmondely »

Downside Up!

Am I correct in presuming that ILS always docks upside down? Whenever there is a docking bay with a "right way up" (eg Imperial AstroFactory, SLAPU, Hathor, Transhab) often determined by writing inside the bay, for example, ILS will dock upside down.

Since one is in space without gravity, I could understand this happening half of the time. But every single time?

Experiment carried out with my usual cocktail of oxp's but also a special try-out with just ILS & the Imperial AstroFactory loaded...
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: [RELEASE] ILS Instrument Landing System v1.13

Post by Cody »

The Coriolis docking bay has a "right way up" too!
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
Post Reply