Jump to content

TEMPEST.114

Members
  • Posts

    1724
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by TEMPEST.114

  1. Please, please, please would you allow OMM to remember the last used folders when making packages? I am trying to make 40 mod packages, and each one, I have to go back to the beginning and drill down for where the source folder is, and then drill down for where I want it to be built/saved. Please make it so it remembers the last used ones. And also not automatically change the 'Destination Folder' as soon as you change the 'Create from folder content' folder.
  2. 0.1km is very small of a window to transition from one waypoint to another, which, in a 4 ship can lead to manually having to increment the waypoint. Are you really telling me that it takes a real apache pilot, whilst flying at 25ft above the ground, at least 5 if not many, many more MFD button presses to increment the waypoint?! That there is nothing on the HOTAS or another mechanism to do it? If that's true a) the person who designed the UX needs to be lynched and b) why can't we have a george option to tell him to increment/decrement or even go to a specific waypoint like we (sort of) can with Jester on the F14?!
  3. did you look at the source link? The 90.833 is the figure from Nasa for the solar disk at twilight. Lat Long in degrees as the source doc says.
  4. So this was suggested by @cfrag solareqns.PDF (noaa.gov) I'm trying to find if a game time is during the day or night, so I need to convert local time to zulu and time in seconds (game time) to hours and get the date and lat/long. All that is working correctly. I'm also correctly working out if the year is a leap and what the 'Day of the Year' is - that's all working correctly and checked. The problem I'm having is not understanding the main formulas and not getting the right numbers out of it. Here's my coding implementation of the formulas in that document: local fractionalYear = (( 2 * math.pi ) / numberOfDaysInThisYear) * ( dayOfYear - 1 + ( (hour - 12) / 24 ) ) local equationOfTimeInMinutes = 229.18 * (0.000075 + 0.001868 * math.cos(fractionalYear) - 0.032077 * math.sin(fractionalYear) - 0.014615 * math.cos(2 * fractionalYear) - 0.040849 * math.sin(2 * fractionalYear) ) local solarDeclinationAngleInRadians = 0.006918 - 0.399912 * math.cos(fractionalYear) + 0.070257 * math.sin(fractionalYear) - 0.006758 * math.cos(2 * fractionalYear) + 0.000907 * math.sin(2 * fractionalYear) - 0.002697 * math.cos(3 * fractionalYear) + 0.00148 * math.sin(3 * fractionalYear) local hourAngleInDegrees = math.acos( (math.cos(90.833) / (math.cos(lat) * math.cos(solarDeclinationAngleInRadians))) - (math.tan(lat) * math.tan(solarDeclinationAngleInRadians)) ) local sunriseOrSunsetInMinutesZulu = 720 - 4 * (long + hourAngleInDegrees) - equationOfTimeInMinutes The output from this for the following date and time 30th of July, 2020 for the Marianas map (Lat 13, Long, 144) is: (Main): DayOfYear 211 (Main): fractionalYear 3.626565 (Main): equationOfTimeInMinutes -6.550151 (Main): solarDeclinationAngleInRadians 0.323732 (Main): hourAngleInDegrees -nan(ind) I *think* the fractionalYear is wrong but I've done the maths by hand and it's coming out the same... It just seems like a small number for 1/2 a year. Anyway, the hourAngleInDegrees is Not A Number... but I don't see where I'm going wrong. Could somebody give me a 2nd pair of eyes on this please?
  5. Wow... I'd never have caught that. Thanks so much @Grimes After being utterly shocked by that field name and how it would relate to a non-helo on a non helo parking spot, I searched hoggit for that 'helipadid' and found this - which I never picked up on... Hopefully this will help someone else... DCS task mission - DCS World Wiki - Hoggitworld.com Waypoint Type Specific Parameters The following are used with take-off and landing waypoint types. helipadId: Used when the waypoint is associated with the a static object or a unit placed in the mission editor. Needs to be the unitId associated with the object. linkUnit: Used when the waypoint is associated with the a static object or a unit placed in the mission editor. Value is identical to helipadId, but it is required.
  6. I'm setting the altitude to 0 but when the table gets made this comes out randomly at a little less or a little more than 0 - I don't know if that's the problem. I'm not setting speed to match the carrier but I am linking it to the correct carrier. Please, anyone help? 2023-03-07 17:10:20.153 INFO TLO (Main): { ['taskSelected'] = true, ['modulation'] = 0, ['groupId'] = 1000008, ['tasks'] = { }, ['frequency'] = 309, ['hidden'] = false, ['units'] = { [1] = { ['alt'] = 0.043982401810354, ['type'] = 'E-2C', ['alt_type'] = 'BARO', ['livery_id'] = 'vaw-124_161781 - used', ['onboard_num'] = 999, ['name'] = 'DARKSTAR91', ['payload'] = { ['pylons'] = { }, ['fuel'] = '5624', ['flare'] = 60, ['chaff'] = 120, ['gun'] = 100 }, ['speed'] = 0, ['unitId'] = '1000009', ['callsign'] = { [1] = 5, [2] = 9, ['name'] = 'DARKSTAR91', [3] = 1 } } }, ['y'] = -365648.4741437, ['radioSet'] = true, ['name'] = 'EMERGENCY AWACS', ['communication'] = true, ['x'] = 76912.977130156, ['route'] = { ['points'] = { [1] = { ['y'] = -365648.4741437, ['x'] = 76912.977130156, ['action'] = 'From Parking Area', ['alt_type'] = 'BARO', ['linkUnit'] = '5', ['type'] = 'TakeOffParking', ['task'] = { ['id'] = 'ComboTask', ['params'] = { ['tasks'] = { [1] = { ['enabled'] = true, ['id'] = 'WrappedAction', ['auto'] = true, ['params'] = { ['action'] = { ['id'] = 'EPLRS', ['params'] = { ['value'] = true } } } }, [2] = { ['enabled'] = true, ['id'] = 'AWACS', ['auto'] = true, ['params'] = { } } } } }, ['alt'] = 0 }, [2] = { ['alt'] = 12801.599980542, ['type'] = 'Turning Point', ['action'] = 'Turning Point', ['alt_type'] = 'BARO', ['speed'] = 231.50000029066, ['x'] = 162895.04596427, ['task'] = { ['id'] = 'ComboTask', ['params'] = { ['tasks'] = { [1] = { ['enabled'] = true, ['id'] = 'Orbit', ['auto'] = false, ['params'] = { ['altitude'] = 12801.599980542, ['pattern'] = 'Circle', ['speed'] = 231.50000029066, ['altitudeEdited'] = true, ['speedEdited'] = true } } } } }, ['y'] = -400026.42985671 } } }, ['task'] = 'AWACS', ['uncontrolled'] = false }
  7. Is this SP or MP or on a DEDICATED SERVER? One way around the MP/DS issues is to have a radio menu option to 'request shutdown' and then you can do your trigger from that. SP you're going to have to struggle and find the codes for them. There is this too:
  8. In the TACAN task I had a 'unitId' where there shouldn't have been one. On restarts sometimes it was okay, sometimes it wasn't. Spoke too soon.. still crashing.
  9. { ['taskSelected'] = true, ['modulation'] = 0, ['tasks'] = { }, ['frequency'] = 308, ['hidden'] = false, ['units'] = { [1] = { ['alt'] = 166.12214660645, ['type'] = 'KC135MPRS', ['alt_type'] = 'BARO', ['livery_id'] = '22nd arw', ['onboard_num'] = 888, ['name'] = 'TEXACO91', ['payload'] = { ['pylons'] = { }, ['fuel'] = 90700, ['flare'] = 60, ['chaff'] = 120, ['gun'] = 100 }, ['speed'] = 0, ['callsign'] = { [1] = 1, [2] = 9, ['name'] = 'Texaco91', [3] = 1 } } }, ['y'] = 13072.155273438, ['radioSet'] = true, ['name'] = 'EMERGENCY TANKER', ['communication'] = true, ['x'] = 9961.662109375, ['route'] = { ['points'] = { [1] = { ['y'] = 13072.155273438, ['x'] = 9961.662109375, ['action'] = 'From Parking Area', ['alt_type'] = 'BARO', ['type'] = 'TakeOffParking', ['airdromeId'] = 6, ['task'] = { ['id'] = 'ComboTask', ['params'] = { ['tasks'] = { [1] = { ['enabled'] = true, ['id'] = 'WrappedAction', ['auto'] = true, ['params'] = { ['action'] = { ['id'] = 'EPLRS', ['params'] = { ['value'] = true } } } }, [2] = { ['enabled'] = true, ['id'] = 'Tanker', ['auto'] = true, ['params'] = { } }, [3] = { ['id'] = 'WrappedAction', ['enabled'] = true, ['auto'] = true, ['params'] = { ['action'] = { ['id'] = 'ActivateBeacon', ['params'] = { ['type'] = 4, ['AA'] = false, ['callsign'] = 'ETX', ['system'] = 5, ['channel'] = 99, ['modeChannel'] = 'Y', ['unitId'] = 1, ['bearing'] = true, ['frequency'] = 1060000000 } } } } } } }, ['alt'] = 166.12214660645 }, [2] = { ['alt'] = 12801.599980542, ['type'] = 'Turning Point', ['action'] = 'Turning Point', ['alt_type'] = 'BARO', ['speed'] = 231.50000029066, ['x'] = 57611.49487342, ['task'] = { ['id'] = 'ComboTask', ['params'] = { ['tasks'] = { [1] = { ['enabled'] = true, ['id'] = 'Orbit', ['auto'] = false, ['params'] = { ['altitude'] = 12801.599980542, ['pattern'] = 'Circle', ['speed'] = 180.05555578163, ['altitudeEdited'] = true, ['speedEdited'] = true } } } } }, ['y'] = -66327.173675607 } } }, ['task'] = 'Refueling', ['uncontrolled'] = false } So this is the table. I can't see anything wrong with this. I just tried the mission and script again, fresh, just now and it worked perfectly. I SHIFT + R and tried it again and - bang - CTD. I'm confused. Can any fresh eyes see if I've made a mistake here?
  10. Okay, two steps forward, one backward. I've now got an aircraft spawning and I thought I'd won. I spawn the group on the command of an F10 Radio Menu choice. However, about 40% of the time, DCS just crashes to desktop - no error in the log, no crash report - it just hangs for a second or two then closes. Now, I relaunch DCS and run the exact same mission, in the same exact way and it works perfectly. In fact I can restart (Shift + R) and do it again and again and again... but then once in a while, it will just crash again just like I've described. Now, I'm not asking for a code review because there's too much and most people don't bother to do it, but I'm asking if anyone has ever experienced this and if so, what where things you looked for and how you fixed it? What is weird is that I'm adding a group, with it's route already inside the table so I'm not adding a group and then immediately pushing a task before the back end has got it all setup. I can't fathom why it works more than 50% of the time, without any code changes, and then will just crash doing the exact same thing.
  11. The lack of getters in the api means that we have to create additional look up tables for all scripting spawned units/groups etc... and have to keep going back to them. That's memory, processing overhead, just because of a lack of useful getters on Group/Unit objects. Please fix this glaring omission.
  12. Yeah, since I posted this question, I realised I would have to keep tables of all the units and groups I spawn by category and I've done exactly that. Sheesh... what a pain, just for lack of a few getters... Thanks as always @cfrag
  13. Here is the table I'm creating to spawn my aircraft. { ['taskSelected'] = true, ['modulation'] = 0, ['tasks'] = { }, ['hidden'] = true, ['units'] = { [1] = { ['alt'] = 166.12214660645, ['type'] = 'E-3A', ['alt_type'] = 'BARO', ['livery_id'] = { ['livery_id'] = 'nato' }, ['onboard_num'] = 999, ['name'] = 'DARKSTAR91', ['payload'] = { ['payload'] = { ['pylons'] = { }, ['fuel'] = '65000', ['flare'] = 60, ['chaff'] = 120, ['gun'] = 100 } }, ['speed'] = 0, ['callsign'] = { [1] = 5, [2] = 9, ['name'] = 'DARKSTAR91', [3] = 1 } } }, ['y'] = 13072.155273438, ['x'] = 9961.662109375, ['name'] = 'EMERGENCY_AWACS', ['communication'] = true, ['frequency'] = 309, ['route'] = { ['points'] = { [1] = { ['alt'] = 166.12214660645, ['type'] = 'TakeOffParking', ['action'] = 'From Parking Area', ['alt_type'] = 'BARO', ['x'] = 9961.662109375, ['y'] = 13072.155273438, ['task'] = { ['id'] = 'ComboTask', ['params'] = { ['tasks'] = { [1] = { ['enabled'] = true, ['id'] = 'AWACS', ['auto'] = true, ['params'] = { } }, [2] = { ['enabled'] = true, ['id'] = 'WrappedAction', ['auto'] = true, ['params'] = { ['action'] = { ['id'] = 'EPLRS', ['params'] = { ['value'] = true } } } } } } }, ['airdromeId'] = 6 }, [2] = { ['alt'] = 10667.999983785, ['type'] = 'Turning Point', ['action'] = 'Turning Point', ['alt_type'] = 'BARO', ['x'] = 58586.825139276, ['task'] = { ['id'] = 'ComboTask', ['params'] = { ['tasks'] = { [1] = { ['enabled'] = true, ['id'] = 'Orbit', ['auto'] = false, ['params'] = { ['altitude'] = 10667.999983785, ['speedEdited'] = true, ['pattern'] = 'Circle', ['speed'] = 180.05555578163 } } } } }, ['y'] = 166.12214660645 } } }, ['task'] = 'AWACS', ['uncontrolled'] = false } I have to give it all this data to create it and when added via 'coalition.addGroup()' it gets added to the mission and spawns. Everything is working. Thanks to everyone who helped me understand this along the way. ( @cfrag, @Morpheus @Chump, @Grimes, @SUNTSAG @PravusJSB and anyone I missed). However, later during my mission, my script needs to find this aircraft and get it's callsign, frequency and if it has any TACAN data. The way I was doing this for existing units was looking in env.mission and scraping that, however, as this newly spawned group doesn't exist in that table, I only have the functions provided by the api to get hold of this information. The problem is, that I can't find out how to do that. If I used Unit.getDesc() on the unit of this newly created group I get back this table: { ['speedMax0'] = 280.2799987793, ['massEmpty'] = 60000, ['tankerType'] = 0, ['range'] = 12247, ['box'] = { ['min'] = { ['y'] = -3.1141595840454, ['x'] = -26.12522315979, ['z'] = -22.957130432129 }, ['max'] = { ['y'] = 9.3631839752197, ['x'] = 21.747020721436, ['z'] = 22.924991607666 } }, ['Hmax'] = 12000, ['Kmax'] = 4, ['_origin'] = '', ['speedMax10K'] = 280.2799987793, ['NyMin'] = 0.5, ['fuelMassMax'] = 65000, ['speedMax'] = 280.2799987793, ['NyMax'] = 2.5, ['massMax'] = 148000, ['RCS'] = 80, ['displayName'] = 'e-3a', ['life'] = 60, ['VyMax'] = 10, ['Kab'] = 0, ['attributes'] = { ['Air'] = true, ['Refuelable'] = true, ['Link16'] = true, ['AWACS'] = true, ['NonAndLightArmoredUnits'] = true, ['Planes'] = true, ['All'] = true, ['Datalink'] = true, ['NonArmoredUnits'] = true }, ['typeName'] = 'E-3A', ['category'] = 0 } Which doesn't have any of that information I need in it. In fact, there seems to be no way in the Group class methods to get that information. What am I missing? Can anyone please help?
  14. ...or is that just a static representation of the mission as the mission editor had last saved and nothing newly added via scripting gets added to it?
  15. Ah. didn't get that. Sorry.
  16. Just set a 'smoke' no fire effect.
  17. event.place.getDesc == nil or event.place:getDesc() You have a . instead of a colon on the first part.
  18. Only way I can think of is to detect the refuelling event and if it's an AI aircraft, give them a new task to immediately land or go somewhere. You can get the fuel of the ai aircraft and wait until they have a limit of a %'age of fuel you want and then give them a new task.
  19. Thanks, but your guess is as good as mine.
  20. Is this something that I can negate with the ['communication'] = false? I'm guestimating that that turns off the radio for the unit right? So then the fact that I've spawned an aircraft with no radio means no-one will see or hear it's callsign right? So it doesn't matter if it's duplicated?
  21. Is the only option to run a world.searchObjects for all other aircraft, save all the found callsigns and then write a routine to find one that hasn't been used? That seems like a lot of work. If you don't care about the callsign, is there no way to, like Group and Unit ID's to get DCS to pick it for you?
  22. Ah ha! You said exactly what I was asking... This: The 'mission' table, which I've worked out how to do from other questions / examples and can now give tasks to ground, naval and aircraft units by PUSHING a new MISSION task. But I couldn't see from the exampls 'ripped' from the mission file how the 'mission' table fit in with the 'addGroup' table. So my only thought was to do as you just said I shouldn't probably do - which is spawn the group with only the 'required' data, and then immediately 'PUSH' a new 'MISSION' task. But if I can add the contents of the 'mission' table right into the 'addGroup' table then I'll do that instead. Thanks.
×
×
  • Create New...