Jump to content

Recommended Posts

Posted (edited)

Carrier script HOTFIX 1.0.1 uploaded.

 

In other news, RE:

Hello, Ineed your help. i dont know whats wrong, but after launching the mission the carrier stops and doesnt turn against the wind. THX

[ATTACH]194924[/ATTACH]

 

 

Got it fixed. It was a combination of a few errors. I also took the liberty of updating it to version 1.0.1 as added to the 1st post.

_1_test.miz

Edited by Wrench
Posted (edited)

Hey Wrench, great script.

 

 

I am having some trouble setting it up. I have followed your video exactly (btw it is wrench.wind_set, not wrench_wind_set as in your post), but when I spawn, I have a carrier menu with nothing in it.

 

 

 

I have referred to the sample mission (hotfix.miz) and everything seems to be the same, with the exception I have not setup fighters or AWACS, and there is a script file in that mission wrenchfunctions.lua, which I am assuming for spawning fighters and not important.

 

 

 

 

 

Any idea as to what I am doing wrong?

 

 

Got it working. For whatever reason when I changed it to Wrench.wind_set with a capital W it now works, in case anyone else has this issue.

Edited by patpatpowercat
Posted (edited)

Still love the script. However, has anyone else noticed it messes up ICLS with the carrier? Without the script loaded, ICLS works fine. With it, no ICLS. I have also tried loading the ICLS as a triggered action (after the TACAN of course) that is activated after the script loads, and no joy. Any ideas?

 

 

Nevermind, guess it does still work. Sometimes anyways... Maybe has to do with me not intercepting the glidepath. I have noticed however, that the max charlie time is always 30 min, regardless of what I put in the Wrench.wind_set.

Edited by patpatpowercat
I was wrong.
Posted

I have noticed it will have a negative charlie time. So it seems like perhaps the carrier actually cycles on the set time, it may just be a display thing. I have seen ready for recovery, charlie time -5 minutes or something to that effect before.

Posted

So the Charlie time uses the set cycletime - elapsed cycle time - 5 minutes (the time it takes to complete the turns) so it will output negative numbers is certain situations. Only when it's about to turn up I didn't bother to put in a floor.

Posted

Any chance we can get the tanker orbit a bit larger? Having trouble because soon as I'm lined up, the tanker is making a turn, and since created waypoints are always flyover, it banks left, then right, then levels, then immediately turns again.

Posted (edited)

Disregard.

 

Figured out the problem.

Edited by Yoda967

Very Respectfully,

Kurt "Yoda" Kalbfleisch

San Diego, California

"In my private manual I firmly believed the only time there was too much fuel aboard any aircraft was if it was fire." --Ernest K. Gann

 

Posted

Thanks for the script!

Any chance to add a plane guard helicopter (spawn on deck when triggered, go into guard position and stay there - starboard side of the ship)?

 

 

https://en.wikipedia.org/wiki/Plane_guard#/media/File:US_Navy_070810-N-2659P-063_An_SH-60F_Seahawk_assigned_to_the_Eightballers_of_Helicopter_Anti-Submarine_Squadron_(HS)_8,_attached_to_Carrier_Air_Wing_(CVW)_9,_hovers_near_the_Nimitz-class_aircraft_carrier_USS_John_C._Stennis.jpg

File:US_Navy_070810-N-2659P-063_An_SH-60F_Seahawk_assigned_to_the_Eightballers_of_Helicopter_Anti-Submarine_Squadron_(HS)_8,_attached_to_Carrier_Air_Wing_(CVW)_9,_hovers_near_the_Nimitz-class_aircraft_carrier_USS_John_C._Stennis.jpg

Regards

REAPER 31 | Painter

[sIGPIC][/sIGPIC]

Posted
Thanks for the script!

Any chance to add a plane guard helicopter (spawn on deck when triggered, go into guard position and stay there - starboard side of the ship)?

 

I don't think I'll be able to get this to work. Helos don't like being scripted in DCS, sorry.

Posted (edited)

line 6: describtion comment is talking about "wrench_wind_setup" instead of "Wrench.wind_setup" to call the function - took me a while to figure out why it's not starting in the mission :D )

Edited by -Painter-

Regards

REAPER 31 | Painter

[sIGPIC][/sIGPIC]

Posted (edited)

Really good job Wrench!!

 

We will test the script during several big missions during our LAN event with my team (20+ pilots from several squadrons) Thank you again for your work !!

Edited by 3rd-Nidray
Posted

Hey Wrench,

 

I'd like to adapt this to the Tarawa for Harrier ops. I thought about it and the offset angle for the CVN needs to be removed. Is the section below the section that deals with setting the heading? Specifically setting the 8

dir = dir + 8 --to account for angle of landing deck and movement of the ship

to 0 should make the boat follow the wind? Thanks.

 

 

if not _G[unit1 .. 'returning'] then

local wind = {}

local windspeed = {}

if _G[unit1] then

local pos1 = _G[unit1]:getPosition().p

local magvar = mist.utils.toDegree(mist.getNorthCorrection(pos1))

if pos1 ~= nil then

pos1.y=pos1.y+1

--get wind info

wind = atmosphere.getWind(pos1)

windspeed = mist.vec.mag(wind)

--get wind direction sorted

local dir = math.atan2(wind.z, wind.x) * 180 / math.pi

if dir < 0 then

dir = dir + 360 --converts to positive numbers

end

if dir <= 180 then

dir = dir + 180

else

dir = dir - 180

end

dir = dir + 8 --to account for angle of landing deck and movement of the ship

if dir > 360 then

dir = dir - 360

end

_G[unit1..'dir'] = math.floor(dir+magvar)

_G[unit1..'heading'] = math.floor(mist.utils.toDegree(mist.getHeading(_G[unit1] , false )))

local dirrad = mist.utils.toRadian(dir)

if windspeed < 12.8611 then

speed = 12.8611 - windspeed

Wrench.go_direction(unit1,dirrad,speed)

else

Wrench.go_direction(unit1,dirrad,1)

end

if not _G[unit1 .. 'override'] then

if _G[unit1 .. 'LARC'] then

Wrench.LARC(unit1)

Wrench.shipshore(unit1)

else

Wrench.ship_from_ip(unit1, distip)

Wrench.shipshore(unit1)

end

end

end

else

trigger.action.outText('unit not detected', 2)

end

--[[

if trigger.misc.getUserFlag(_G[unit1]["id_"]) == 0 then

Wrench.carrier_to_ip(unit1)

end

]]

else

if _G[unit1 .. 'LARC'] then

Wrench.LARC(unit1)

end

end

end

Aurora R7 || i7K 8700K || 2TB 7200RPM SATA 6Gb/s || 2TB M.2 PCIe x4 SSD || GTX 1080 Ti with 11GB GDDR5X || Windows 10 Pro || 32GB Dual Channel DDR4 at 2667MHz || Virpil Warbird Base || Virpil T-50 Stick || Virpil MT-50 Throttle || Thrustmaster TPR Pedals || Oculus Rift

Posted
Yup, you're correct.

I'll have to make a hotfix this week, so I'll add that in as a global variable similar to the tanker orbit parameters as shown in the 1.1 video.

 

Thanks. That's awesome. Good work. I'm testing it now.

Aurora R7 || i7K 8700K || 2TB 7200RPM SATA 6Gb/s || 2TB M.2 PCIe x4 SSD || GTX 1080 Ti with 11GB GDDR5X || Windows 10 Pro || 32GB Dual Channel DDR4 at 2667MHz || Virpil Warbird Base || Virpil T-50 Stick || Virpil MT-50 Throttle || Thrustmaster TPR Pedals || Oculus Rift

Posted

It works. Very nice and neat.

 

So, as kind of a niche` end user I'd say the only thing I could think of for you to add is some sort of test to determine if the unit is a Tarawa or Stennis to set the offset angle for the heading. Reason being is the way I have it I couldn't use the script to control a Tarawa and Stennis at the some time and their headings be correct. Just a thought, not sure it's worth your time though, don't know how many people would use it for both. Though I just thought about it and the rotor heads can use this for their small ships too.

 

 

My last question, since I just thought about that too. Does the tanker script set the tanker waypoints from the ship or the tanker start point? Like, could I set up a C-130 from the shore and it still orbit the Tarawa?

Aurora R7 || i7K 8700K || 2TB 7200RPM SATA 6Gb/s || 2TB M.2 PCIe x4 SSD || GTX 1080 Ti with 11GB GDDR5X || Windows 10 Pro || 32GB Dual Channel DDR4 at 2667MHz || Virpil Warbird Base || Virpil T-50 Stick || Virpil MT-50 Throttle || Thrustmaster TPR Pedals || Oculus Rift

Posted

Like I said, I'll look into the other carriers.

I think I might have the script determine the offset itself. That way, as you say, rotor heads can use it on their destroyers as well.

The tanker script uses the ship's current position and BRC every time it runs (when the tanker finishes an orbit) so the tanker can start anywhere, but it will always fly to and orbit the carrier to which it is assigned. It will also attempt to land on the same when it runs out of fuel, so it might not be a great idea to use on a c-130 :lol:

Posted

Now I have to try. haha

Aurora R7 || i7K 8700K || 2TB 7200RPM SATA 6Gb/s || 2TB M.2 PCIe x4 SSD || GTX 1080 Ti with 11GB GDDR5X || Windows 10 Pro || 32GB Dual Channel DDR4 at 2667MHz || Virpil Warbird Base || Virpil T-50 Stick || Virpil MT-50 Throttle || Thrustmaster TPR Pedals || Oculus Rift

  • Recently Browsing   0 members

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