Jump to content

Alerax's LSO AI Script


Recommended Posts

Sounds like something different.

Problem we have is only, that F10-Others doesn't have the added radio items.

Hi Painter-

 

I'll include a script to reload the F10 menu, stay tuned.

 

Thanks for letting us know if the issues-

Alerax

Link to comment
Share on other sites

  • Replies 274
  • Created
  • Last Reply

Top Posters In This Topic

I have a suggestion (or is it already there?)

 

 

My buddy and I were flying and he trapped. For some reason he couldn't unhook from the wire so he was still on deck when I turned into the groove. The LSO never called foul deck waveoff...

 

 

Is there any way that can be added? That would be cool.

 

 

Thanks and great job.

 

 

v6,

boNes

 

-Definitely. Thanks for the suggestion. I'll add this to the list of feature update.

 

Also, when your grade refers to at the start, in the middle, at the ramp, these are all position whilst in the groove, correct? If not, where?

 

 

v6,

boNes

 

-Yes, you are correct. The positions are referenced in the groove (i.e. from the ball call to the Carrier ramp)

Link to comment
Share on other sites

9RTyWDx.png

 

Any idea what the diamonds with question marks are? I'm guessing I'm missing a font or something?

 

Hi RyboPops- you are correct. They are missing symbols (e.g. degress, +/-). In the next update, I've replaced them with standard symbols instead.

 

And nice landing by the way!

 

-Alerax

Link to comment
Share on other sites

No one need be too impressed, it was simply a straight in approach to test if I implemented the script correctly. My first pass doing a full marshal stack and overhead was not nearly as nice lol

 

Also, I noticed that the actual BRC that runs perfectly parallel to the boat is 5 degrees less than what was shown, so in the case of my pass earlier the actual BRC that got me parallel with the wake was 290 degrees rather than 295 degrees. I haven't extensively tested yet to see if this is always true...has anyone else noticed this?

Link to comment
Share on other sites

No one need be too impressed, it was simply a straight in approach to test if I implemented the script correctly. My first pass doing a full marshal stack and overhead was not nearly as nice lol

 

Also, I noticed that the actual BRC that runs perfectly parallel to the boat is 5 degrees less than what was shown, so in the case of my pass earlier the actual BRC that got me parallel with the wake was 290 degrees rather than 295 degrees. I haven't extensively tested yet to see if this is always true...has anyone else noticed this?

 

You're seeing the difference between True North and Magnetic North. I believe by default units in DCS follow True North, and the Hornet starts in Magnetic North, If you modify your Hornet to True north in the HSI DDI, you'll see the same bearings

Intel i9-9900KF @5.2GHz

MSI Z390 Gaming Pro Carbon

32GB G.Skill Trident Z DDR3200 RAM

MSI RTX 2080 Ti Gaming X Trio

40" Panasonic TH-40DX600U @ 4K

Pimax Vision 8K Plus / Oculus Rift CV1 / HTC Vive

Gametrix JetSeat with SimShaker

Windows 10 64 Bit Home Edition

 

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

Doh! Thanks, I forgot about that.

 

I also have a feature request. I flew a few hook up passes for practice and it counts all of them as bolters. Is it possible for it to detect the hook up/down status so it can grade accordingly? Hook up passes are graded as if they were regular passes minus a wire caught. IIRC there is LSO shorthand for hook up passes as well. I don't remember what it is, but let's say the shorthand is HU. An example of a hook up pass would then look like:

 

(OK)HU (H)X (H)IM (DL)IC NCAR

 

Edit: The reason for this is that if you are using this script for grading, all of those training hook up passes are graded as bolters, which only give 2.5 points (instead of 3 for the fair pass example above). Bolters also count against your boarding rate, whereas hook up passes don't.


Edited by RyboPops
Link to comment
Share on other sites

I have some more bug reports and requests after playing with it more. Please forgive me if I missed a post somewhere that indicates if these are already in-work:

 

1) BUG REPORT - The altimeter provided by the script is incorrect. For example, the altimeter setting CATCC gave was 30.3, but the correct setting was actually 30.03.

 

2) BUG REPORT - Script seemed to hang up in MP (self-hosted server) after my dash two got an interval WOP. Resetting to inbound displayed the message, but after that no further communications were received for any of the options (i.e. Marshal single, straight in, etc). I was able to reproduce this behavior on a subsequent re-hosting of the server using a different miz file.

 

3) REQUEST - Is it possible to use a frequency OTHER than the in-sim carrier ATC frequency? That would be nice so I don't hear those silly calls the current AI ATC makes after trapping. It should also prevent the comm menu selection window from auto-appearing on trap, which would help with immersion (and makes recorded footage look less silly).

 

4) REQUEST - Is it possible to add an option for a Pattern Section in addition to the Marshal Section? I'm not sure if this is done IRL, but in some circumstances it would be nice to be able to proceed direct to the pattern as a section if the stack is empty.

 

5) REQUEST - Is it possible to read tanker info from the sim? Would be nice to have a "99, tanker overhead mother angels XX" call. Since you can't (currently) anchor an AI orbit around the boat, perhaps it could just read any tanker within 25 miles of the boat, for example?

 

Thanks again for an awesome tool!


Edited by RyboPops
Link to comment
Share on other sites

Some helpers for you (not tested in game)

Not a lua coder, so hope it aint too crufty

 

 

 

function VecDot(v1,v2)
 local ret = 0
 for k,_ in pairs(v1) do
   ret = ret + v1[k] * v2[k]
 end
 return ret
end


-- transform a vector from frame local (body) coordinate system into global (world)
-- takes
--   Pos3 frame (unit.getPosition())
--   Vec3 localVec
--   boolean ispoint (will translate vector if true)
-- returns
--   Vec3 globalVec

function LocalToGlobal(frame,localVec,ispoint)
 local ret={}
 for k,_ in pairs(localVec) do
   ret[k] = VecDot({x=frame.x[k], y=frame.y[k], z=frame.z[k]},localVec)
 end
 -- do translation if vector is point vector
 if ispoint == 1 then
   for k,v in pairs(ret) do
     ret[k] = ret[k] + frame.p[k]
   end
 end
 return ret
end

-- transform a vector from global coordinate system (world) into frame local (body)
-- takes
--   Pos3 frame (unit.getPosition())
--   Vec3 globalVec
--   boolean ispoint (will translate vector if true)
-- returns
--   Vec3 localVec


function GlobalToLocal(frame,globalVec,ispoint)
 local ret={}
 for k,_ in pairs(globalVec) do
   ret[k] = VecDot(frame[k],globalVec)
 end
 -- do translation if vector is point vector
 if ispoint == 1 then
   for k,v in pairs(ret) do
     ret[k] = ret[k] + (VecDot(frame[k],frame.p) * -1)
   end
 end
 return ret
end


-- example usage

-- For your "Fast/Slow" calls
-- Assumes unit x vector corresponds to wing chord
-- returns AoA in radians

function getAoA(unit)
 local p = unit.getPosition()
 local v_world = unit.getVelocity()
 v_local = GlobalToLocal(p,v_world)
 return math.atan2(v_local.y,v_local.x)
end

Link to comment
Share on other sites

Hi RyboPops- couple of responses, been busy with other things and coding so apologies for the delay.

 

Doh! Thanks, I forgot about that.

 

I also have a feature request. I flew a few hook up passes for practice and it counts all of them as bolters. Is it possible for it to detect the hook up/down status so it can grade accordingly? Hook up passes are graded as if they were regular passes minus a wire caught. IIRC there is LSO shorthand for hook up passes as well. I don't remember what it is, but let's say the shorthand is HU. An example of a hook up pass would then look like:

 

(OK)HU (H)X (H)IM (DL)IC NCAR

 

Edit: The reason for this is that if you are using this script for grading, all of those training hook up passes are graded as bolters, which only give 2.5 points (instead of 3 for the fair pass example above). Bolters also count against your boarding rate, whereas hook up passes don't.

 

Unfortunately, I'm not aware of scripting ability to call out cockpit functions/arguments. Agree that this will be awesome and will look into this, but no promising. What I might do is to create another "mode" called Carrier Qual and allow players to fly this. Will have to queue this up with other features.

 

1) BUG REPORT - The altimeter provided by the script is incorrect. For example, the altimeter setting CATCC gave was 30.3, but the correct setting was actually 30.03.

 

2) BUG REPORT - Script seemed to hang up in MP (self-hosted server) after my dash two got an interval WOP. Resetting to inbound displayed the message, but after that no further communications were received for any of the options (i.e. Marshal single, straight in, etc). I was able to reproduce this behavior on a subsequent re-hosting of the server using a different miz file.

 

First bug fixed, will look into the second bug.

 

3) REQUEST - Is it possible to use a frequency OTHER than the in-sim carrier ATC frequency? That would be nice so I don't hear those silly calls the current AI ATC makes after trapping. It should also prevent the comm menu selection window from auto-appearing on trap, which would help with immersion (and makes recorded footage look less silly).

 

Good suggestion. The reason I kept it the same is because player's need to call to Carrier for lights. However, will put in something that allows for a different freq if the mission designer prefers.

 

4) REQUEST - Is it possible to add an option for a Pattern Section in addition to the Marshal Section? I'm not sure if this is done IRL, but in some circumstances it would be nice to be able to proceed direct to the pattern as a section if the stack is empty.

 

I believe you technically can do this already. Just check-in Pattern individually and fly in a section when entering pattern.

 

5) REQUEST - Is it possible to read tanker info from the sim? Would be nice to have a "99, tanker overhead mother angels XX" call. Since you can't (currently) anchor an AI orbit around the boat, perhaps it could just read any tanker within 25 miles of the boat, for example?

 

Will consider this.

 

Again- thanks for your patience and suggestion.

-Alerax

Link to comment
Share on other sites

Some helpers for you (not tested in game)

Not a lua coder, so hope it aint too crufty

 

 

 

Thanks mdhoover- I actually have the Fast/Slow and Climb/Settle calls completed and is going through testing at the moment. However, appreciate you sharing the script!

 

-Alerax

Link to comment
Share on other sites

I can second this bug. I ran a server tonite with about 10-15 participants. At some point the script stopped accepting commands. I don’t know if it’s a situation that was caused by more than 1 player being in a certain aircraft, but as we were running training that was the case.

 

The correct tail numbers were appearing in the list but there is no option to make a call. Resetting it to Case I/CaseIII didn’t make a difference.

 

I can provide the trk file if you’d like.

 

2) BUG REPORT - Script seemed to hang up in MP (self-hosted server) after my dash two got an interval WOP. Resetting to inbound displayed the message, but after that no further communications were received for any of the options (i.e. Marshal single, straight in, etc). I was able to reproduce this behavior on a subsequent re-hosting of the server using a different miz file.
Link to comment
Share on other sites

Alerax

 

 

Single player. I don't know what I did wrong, but when I try to get the carrier freq, nothing happens and the comms menu freezes. This only happens with your mod. Any thoughts?

Trackir4 using the latest Trackir 5 software, Win10 Pro [Creator Update] updated from Win7Pro Pro 64Bit, Intel® Core™ i5-2500 3.30 GHz 6M Intel Smart Cache LGA115 , GigaByte GA-Z68XP-UD4 Intel Z68 Chipset DDR3 16GB Ram, GTX MSI Gaming 1060 [6 GB] Video Card, Main Monitor 1 on left 1920x1080 Touchscreen Monitor 2 on right 1920x1080 .

Link to comment
Share on other sites

Alerax,

 

 

ME and my buddy were flying the whole kit and kaboodle Marshall etc and have some questions.

 

 

1st, when I requested a Marshall for the both of us, there was no "request Marshall Flight" so I chose Marshall Section, and it said we didn't have a section. Why isn't there one for a flight or do they expect single flights to break off and go single Marshall? I've seen footage of flights entering the initial together so it must be possible right?

 

 

So I requested Marshall single and I was assigned angels 2, he was assigned angels 3. I got my Signal Charlie and he was collapsed to angels 2. While I was in the pattern, he continued to fly his Marshall when some AI Tomcats showed up. So here come the next questions. They appear to have entered a Marshall pattern but nor radio calls were heard by my wingman who was still on the Marshall freq. Then, after I trapped and cleared the deck, the F-14s appeared to be cleared in and they landed (never mind that they taxied into each other and blew up on deck, but hey...). The whole time, my wingman never got a signal Charlie. It was as if the LSO forgot about him. I tried to ask for Marshall single for him just to be sure, and the call was that he already called Marshall.

 

 

So what we ended up doing was resetting, and then requesting a straight-in, and all was fine.

 

 

So what are we doing wrong, or is it a script thing? Did the Tomcats screw it up? Because things seemed to be fine until the Tomcats showed up.

 

 

v6,

boNes

"Also, I would prefer a back seater over the extra gas any day. I would have 80 pounds of flesh to eat and a pair of glasses to start a fire." --F/A-18 Hornet pilot

Link to comment
Share on other sites

Tomcats used to love f***ing up Hornet business back in the days...:pilotfly:

Sorry for OT

 

 

 

 

I'm actually a Tomcat kinda guy so I was actually quietly happy they were screwing with us, haha!

 

 

v6,

boNes

"Also, I would prefer a back seater over the extra gas any day. I would have 80 pounds of flesh to eat and a pair of glasses to start a fire." --F/A-18 Hornet pilot

Link to comment
Share on other sites

1st, when I requested a Marshall for the both of us, there was no "request Marshall Flight" so I chose Marshall Section, and it said we didn't have a section. Why isn't there one for a flight or do they expect single flights to break off and go single Marshall? I've seen footage of flights entering the initial together so it must be possible right?

 

In order to check in as a section (flight of 2), you must be within 200 meters of your wingman.

 

 

So I requested Marshall single and I was assigned angels 2, he was assigned angels 3. I got my Signal Charlie and he was collapsed to angels 2. While I was in the pattern, he continued to fly his Marshall when some AI Tomcats showed up. So here come the next questions. They appear to have entered a Marshall pattern but nor radio calls were heard by my wingman who was still on the Marshall freq. Then, after I trapped and cleared the deck, the F-14s appeared to be cleared in and they landed (never mind that they taxied into each other and blew up on deck, but hey...). The whole time, my wingman never got a signal Charlie. It was as if the LSO forgot about him. I tried to ask for Marshall single for him just to be sure, and the call was that he already called Marshall.

 

So what we ended up doing was resetting, and then requesting a straight-in, and all was fine.

 

So what are we doing wrong, or is it a script thing? Did the Tomcats screw it up? Because things seemed to be fine until the Tomcats showed up.

 

The marshall pattern is very specific. If you are not in the right place between the 10 and 11 O'Clock position of this diagram, the script will ignore you until you are. This is so you can "commence" on the 210 as shown in the second diagram.

 

Marshal-Post.jpg

 

Assuming the ship BRC is 360 and you are checked in, your altitude must be within 500ft of your assigned Angels, vertical velocity less than +/- 500ft / min, heading within +/- 20 degrees of 210 (at the 10 O'clock position), angle of bank less than 45 degrees. Finally, there is a minimum 90 second spacing between flights being called into the pattern from the stack to allow for spacing.

 

If these conditions are met, you will receive the signal Charlie.

 

Some of our pilots initially had a lot of issues flying the correct marshall pattern and failed to account for the movement of the ship meaning that they never hit the 10 O'clock position at all or with the correct attitude.

 

As a general guide, we fly the pattern with barometric altitude hold and ATC engaged at 250kts. we then fly upwind of the carrier on BRC heading for 1.2nm to allow for the ships movement, and then start a (roughly) 25 degree constant rate turn. this pretty much always guarantees a call at around that 10 O'Clock position when you are roughly 4.5nm from the ship. If you are checked in as a section, you would then both accelerate to 350kts, descend to 800ft to enter the pattern and separate for spacing at the break (17 seconds I belive is the correct timing at 350kts).

 

NATOPS-CASE-1.jpg


Edited by Highwayman-Ed

Intel i9-9900KF @5.2GHz

MSI Z390 Gaming Pro Carbon

32GB G.Skill Trident Z DDR3200 RAM

MSI RTX 2080 Ti Gaming X Trio

40" Panasonic TH-40DX600U @ 4K

Pimax Vision 8K Plus / Oculus Rift CV1 / HTC Vive

Gametrix JetSeat with SimShaker

Windows 10 64 Bit Home Edition

 

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

Great explanation, thanks! Now, since the boat is at the 3:00 posit, how do you keep a 5 mile circle on it? The only time you would actually be 5 miles for sure is abeam (at the 9:00). Any other point you would be less than 5 miles because the carrier is on the circumference of the circle, not in the center. IT would be easy if the boat was in the center because then you just make sure your DME (TACAN) says 2.5 all the time, as you would flying a DME arc. But since it's not, how do you keep on the circumference of the circle, or is it just keep it as consistent and close as possible?

 

 

v6,

boNes

"Also, I would prefer a back seater over the extra gas any day. I would have 80 pounds of flesh to eat and a pair of glasses to start a fire." --F/A-18 Hornet pilot

Link to comment
Share on other sites

If you follow the rough guide above, 250kts with a (roughly) 25 degree angle of bank turning off the brc at 1.2 nm from the ship, by the time you’re at the 9 O’Clock position, you will be at 5nm across from the ship. You should come back to the brc heading behind the ship then, level out and fly level until 1.2nm again and then rinse and repeat until you’re called in.


Edited by Highwayman-Ed

Intel i9-9900KF @5.2GHz

MSI Z390 Gaming Pro Carbon

32GB G.Skill Trident Z DDR3200 RAM

MSI RTX 2080 Ti Gaming X Trio

40" Panasonic TH-40DX600U @ 4K

Pimax Vision 8K Plus / Oculus Rift CV1 / HTC Vive

Gametrix JetSeat with SimShaker

Windows 10 64 Bit Home Edition

 

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

Thanks did that, but I found 30 AOB at 250 kts made me too close. So I decreased AOB to 20 at 250 kts and it worked like a charm.

 

 

Now, when you accelerate to 340 at 800 ft at the 30 deg right of heading, at what point and how do you usually start your turn left to arc back to the boat to hit the 3 nm astern at 350 kts and 800 ft?

 

 

Thanks.

 

 

 

v6,

boNes

"Also, I would prefer a back seater over the extra gas any day. I would have 80 pounds of flesh to eat and a pair of glasses to start a fire." --F/A-18 Hornet pilot

Link to comment
Share on other sites

I start my turn at 6nm with a sharper angle of bank 45 degrees off the top of my head at 350kts, that usually brings me wings level on BRC about 3-4nm.

Intel i9-9900KF @5.2GHz

MSI Z390 Gaming Pro Carbon

32GB G.Skill Trident Z DDR3200 RAM

MSI RTX 2080 Ti Gaming X Trio

40" Panasonic TH-40DX600U @ 4K

Pimax Vision 8K Plus / Oculus Rift CV1 / HTC Vive

Gametrix JetSeat with SimShaker

Windows 10 64 Bit Home Edition

 

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

Thanks for the explanation, Highwayman. I have also had difficulties in getting a call to start my approach.

 

However, having looked at your explanation, I suspect the reason was that I started my orbit abeam the ship, rather than 1.2 nm ahead. I then continued round to line up behind the ship (by about 1 nm), where I rolled my wings level, to catch up again, before starting my next orbit. It looks as though I was probably past the 4.5 nm abeam position by the time I passed through the 210 degree position.

 

I will try your procedure, and fly 1.2 nm beyond the bow before starting my orbit.

Link to comment
Share on other sites

Hi Alerax,

 

Question about the Cut Pass grade (damn, just gave away my quality of landings!): I’ve occasionally received a Cut Pass grade where everything looked good to me, and I’m curious as to what conditions you have scripted to trigger that grade, other than “slamming on the deck” which I remember you implemented in the previous version. But what’s your FPM/MPS trigger? I ask because i just had a grade of C 3 LULX NCIM \AR, didn’t have any LSO voice corrrctions called, ball never went red or even half ball low at any point, and actually had a softer than usual touchdown (tho didn’t look at the VSI in hud). I can provide a track if it helps, but maybe you could expand on what screw ups will lead to a Cut Pass, or perhaps another message in the grade like, “nice going Maverick, you just busted your landing gear” so we get an idea as to why we received a Cut pass. Maybe a dumb suggestion but would love to know why I sometimes get that horrible “C” grade when I’m all excited for a potential OK-Underline. Well, maybe just an OK. ;)

 

Thanks!!

TM Warthog, Oculus Rift, Win10...

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...