[RELEASE] ILS Instrument Landing System v1.13

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

Moderators: winston, another_commander

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.11

Post by Norby »

cythev wrote: Thu May 10, 2018 1:39 pm
Hi, I'm pretty new to OOlite after I've not played it for some years and ILS is a VERY nice addon. I have one suggestion, if developement is not abandoned already: Would it be possible to it use as a replacement for the Docking-Computer so that it's only activated after pressing 'c' and not by just approaching the station?
Welcome cythew!

Although ILS is not under active development I am still around to answer you. :)

Docking Computer is a core feature what I can not change, ILS is an addon which can not change any keys. But there is a way to avoid ILS, just use missile targeting mode and not the normal target lock. So use the "t" key instead of "r" to lock the station and ILS will not switch on. Then you can press 'r' to turn it on, rather than 'c'. Then press 't' again anytime to turn it off, for example to avoid a collision.
cythev
Poor
Poor
Posts: 4
Joined: Thu May 10, 2018 1:35 pm

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

Post by cythev »

Hi Norby,

Thanks for all the great MODs.. I read your name pretty often in the list :)

The concrete problem with ILS is, that with the Scanner Targeting Enhancement installed, the station gets automatically selected, when the crosshair is anywhere near it what triggers the landing immediately. That makes dogfighting anywhere near a station very unpleasant. :?

Isn't it possible to just activate it on a key press as a primeable eqiptment, when replacing the default docking-computer is not possible?

Or maybe there is a different tip to avoid this behaviour?
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.11

Post by Norby »

Making ILS to a primeable equipment is not a good idea imho. It would be slower to use, pilots maybe forget to activate it and the primeable list usually too long. Moreover ILS is not triggered in Red Alert (except with offline weapons), this is already implemented.
cythev wrote: Thu May 10, 2018 8:55 pm
the station gets automatically selected, when the crosshair is anywhere near it what triggers the landing immediately.
Except if you pressed 't' before, or at least right when it happen first, then should not repeat. Arming your missiles can be useful during combat anyway.
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.11

Post by RockDoctor »

Norby wrote: Fri Nov 25, 2016 9:29 pm
hoqllnq wrote:
before entering the docking slit, it rotated 90º.
Some stations are built differently than most ones, which make exceptions from the currently programmed rules. I already added many exceptions just this job looks endless. If you remember which station is the problematic then I can reproduce and fix it once.
I've got bounced twice today using ILD. Once I was trying to ILS into a ConStore near the Witchpoint - which rotate faster than the normal stations.
The other time I was going to file myself into a bog standard Octahedron station (OK, it's actually a cuboctahedron, or a truncated cube. Meh.) when it (or I) did a sudden 90deg rotation. Bang ! Flying backwards at full tilt with a screen full of "(Equipment Name} Is damaged" messages and just enough time to think "WTF?" before crashing into the Navigation Buoy solved my problems.

But to be honest, a bit of uncertainty on the equipment front is good for a Jameson's cortical activity. If it wasn't for insane other drivers and the ever-present risk of a puncture, driving long distances would be even more boring.
--
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
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 462
Joined: Mon Sep 17, 2018 5:01 pm

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

Post by Milo »

ILS seems to have trouble with the rotation of tetrahedron stations from the Z-GrOovY Small System Stations OXZ (I have v1.5) available through the in-game manager.
User avatar
Nite Owl
---- E L I T E ----
---- E L I T E ----
Posts: 556
Joined: Sat Jan 20, 2018 4:08 pm
Location: In The Dark

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

Post by Nite Owl »

ILS has a problem with any station that does not have its Docking Bay at the center point of the station. If you target such a station with your missile targeting system it will disable the ILS and you can dock safely, albeit manually. NPCs will not be so lucky and will crash into such non centered stations.
Humor is the second most subjective thing on the planet

Brevity is the soul of wit and vulgarity is wit's downfall

Good Night and Good Luck - Read You Soon
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.11

Post by RockDoctor »

Nite Owl wrote: Sun Sep 23, 2018 6:39 pm
If you target such a station with your missile targeting system it will disable the ILS and you can dock safely, albeit manually. NPCs will not be so lucky and will crash into such non centered stations.
Seems to be a particular habit of Worker's Commuters in Communist systems, as I recall. Get cued (and queued) up behind one in the approach lanes, trundle along a kilometre or two behind the bus ... and cerrunch!, you're at the head of the queue.

Why do those lumbering vessels remind me of these - or at least their real-world version (I gave up trying to find a non-stockphoto.company image). Image
--
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
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

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

Post by phkb »

Thanks to dybal, version 1.12 of ILS is now available, which should address the issues with docking at stations with off-centred docks. Available via the download manager.
User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 462
Joined: Mon Sep 17, 2018 5:01 pm

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

Post by Milo »

Can it be? No more nail-biting terror as I approach a docking bay? Will ILS suddenly decide to rotate again? Thanks for fixing this, dybal!
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.11

Post by dybal »

Milo wrote: Thu Jul 16, 2020 2:19 pm
Can it be? No more nail-biting terror as I approach a docking bay? Will ILS suddenly decide to rotate again? Thanks for fixing this, dybal!
I found a fix for the "90 degrees off" in some stations (tetrahedron and octahedron are the ones I know about) and the off-centre docking bays of non-rotating dockables like Astromines, Zero-G Factories, AstroFactories, Mining Outposts, etc.

But I'm not sure about the "let's stop matching station rotation" or "hey, we are upside down, let's rotate 180 degrees" (I don't know which is the case, or even if it would be only 180 degrees, I always crashed before getting that far...) when your are just entering the docking bay, or already in it.... to be truthful, I had forgotten about that one - it hasn't happened to me lately, but I've being using the escorts to hunt, not the mothership, and they are small enough to dock without rolling.

I will look into it, but if anybody has that happen with this release of ILS, please let me know (so I don't give up thinking its already fixed...)

And you still can crash into the border of the DSD's docking bay if it doesn't stop and you don't get far enough ahead of it before engaging ILS

EDIT: Looked at the code, I changed code that aligns the ship's direction of travel with the docking bay center, not the code that deals with matching the station rotation, so that bug remains... I have some ideas, but this bug isn't easily reproducible, so testing them is a problem.
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.11

Post by dybal »

dybal wrote: Thu Jul 16, 2020 3:40 pm
But I'm not sure about the "let's stop matching station rotation" or "hey, we are upside down, let's rotate 180 degrees" (I don't know which is the case, or even if it would be only 180 degrees, I always crashed before getting that far...) when your are just entering the docking bay, or already in it.... to be truthful, I had forgotten about that one - it hasn't happened to me lately, but I've being using the escorts to hunt, not the mothership, and they are small enough to dock without rolling.
I think I found it...

If the player ship gets "out-of-sync" with the station rotation more than X rads, it rotates the ship at half its maxRoll _contrary_ to the station rotation direction - that would continue for N frame callbacks until the ship got back in sync with the station rotation.

Rotating against the station rotation gets the ship in-sync faster, but if the ship is already inside the dock and "lagging" in rotation next to the station, it would rotate almost 180 degrees and crash into the dock walls.

But the ship rotation is done only if the ships is at most Y rads out-of-alignment with the "docking lane" (line normal to the docking entrance and passing by its centre)... when that happened there would be at least on frame callback where no rotation was applied to the ship... on v1.11 the steering would correct the ship heading only if the out-of-alignement angle got to that same Y value, but my fix made steering act with a Y/10 threshold to get hid of jerkiness (the ship's heading would not converge to the docking lane alignment on final approach, it would keep steering too much to one side, than too much to the other), so now there will less no-rotation-applied to the ship periods and perhaps it won't get so out-of-sync that the bug triggers.
User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 462
Joined: Mon Sep 17, 2018 5:01 pm

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

Post by Milo »

After the ship achieves the desired rotation, instead of applying roll to maintain it, ILS could directly set the orientation of the ship to maintain it. No more rolling = no more accidents. From player perspective it would look the same I think.
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.11

Post by dybal »

Milo wrote: Fri Jul 17, 2020 2:07 am
After the ship achieves the desired rotation, instead of applying roll to maintain it, ILS could directly set the orientation of the ship to maintain it. No more rolling = no more accidents. From player perspective it would look the same I think.
I would have to find a way to obtain the ship's orientation based on the station's orientation: they are facing opposite ways.
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.11

Post by dybal »

I hope I have fixed the "Let's rotate once more, even if we're already in the dock" bug, but that isn't a bug I can reproduce "on demand", so instead of forwarding the fix to phkb I uploaded a beta OXZ file for those adventurous and willing to help me test it. Debug is on, so there will be a lot of trace messages in Latest.log, specially if you dock at slow speed (more time docking, more frame callback calls, more messages...)

Beware you might crash while docking and lose everything you accomplished in that game session!

That said, I tested it on several kinds of dockables, docking at slow speed (120), medium speed (250), high speed (500) and break-neck speed (1100 with Q-Charger) from a 90 degrees to the docking lane starting point, and a 90 degrees rotation mis-alignment for non-rotating dockables whithout a crash. I was able to dock with injectors all the way if I started with a low angle to the docking lane (<45 degrees).

I changed some things besides fixing that bug, dealing with several edge cases:

- the code to discover the docking bay orientation and get the orientation of its wide dimension was for particular cases of docking bays aligned with the station model axes, i.e., if rotated, rotated 90 degrees; I generalized it to any rotation (arbitrarily rotated docking bays are not tested - I don't know of any - but the 90 degrees rotated were tested)

- the code took for granted the docking bays were facing forward (same heading as the station) and used the station heading, I changed it to use the docking bay final heading, so it should work with the docking bay facing any direction (but for rotating dockables the rotation axis must go through the docking centre, so we are talking about aft-facing docking bays - again untested because I don't know of any);

- the code rotated the ship without caring about the ship's maxRoll, so you could dock at a really fast-rotating station with a very roll-limited ship; I limited the amount of rotation when matching the station rotation to the ship's maxRoll - if you have a ship that can't match station rotation, you will have to engage ILS, stop just before entering the dock (that is, speed=0 but ILS still engaged), wait for the dock to align with your ship (it will, but might take some time), then jump forward at top speed - as ILS does for NPCs).

If anybody have any trouble, send me the logs, if nobody reports problems I will forward the fix to phkb in two or three weeks.
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.11

Post by dybal »

Found a mismatch with Towbar, so keep your speed really slow when docking with ILS towing a ship.

Towbar has a FCB that limits the ship's maneuverability and it keeps the ship's orientation from last FCB call, calculates the heading difference to the current orientation, then rotates the previous orientation to a fraction of that difference and sets the ship orientation with that, effectively undoing the rotation sync from the last FCB call of ILS.

Any fix to this will have to be done in both OXPs

If the player's ship isn't towing, ILS is working fine.
Post Reply