yolowingpixie / lsobot Goto Github PK
View Code? Open in Web Editor NEWA log scrapper for DCS World that checks for new carrier landing grades made by humans and sends them to Discord.
License: MIT License
A log scrapper for DCS World that checks for new carrier landing grades made by humans and sends them to Discord.
License: MIT License
Please attach your dcs.log for when the bug is experienced
dcs.log
2021-05-26 17:40:06.323 INFO Scripting: event:type=land,initiatorPilotName=200 Rebound,place=CVN-71,t=2422.683,initiatorMissionID=976,
2021-05-26 17:40:07.684 INFO Scripting: event:type=landing quality mark,initiatorPilotName=200 Rebound,place=CVN-71,t=2424.04,comment=LSO: GRADE:C : WX FX DRX (LURIM) DRIM DLIC LULIC TMRDAR WIRE# 2 EGIW [BC],initiatorMissionID=976,
Event Log
lsobot-debug.txt
2021-05-26 12:39:51:783 | INFO | JOB | Begin cycle 8 of 40
2021-05-26 12:39:52:264 | INFO | DETECT | Landing detected at 2021-05-26 17:34:20 UTC
2021-05-26 12:39:52:266 | INFO | TIMING | Time diference from the start of the loop is 00:05:31.7830000
2021-05-26 12:39:52:269 | INFO | Raw Grade is GRADE:--- : WIRE# 2 EGIW [BC]
2021-05-26 12:39:52:278 | INFO | REGEX | Found no deviations and a #2 or #4 WIRE. Graded as OK.
2021-05-26 12:39:52:281 | INFO | REGEX | Regraded Grade: OK (Acceptable): WIRE# 2
2021-05-26 12:39:52:289 | WARNING | TIMING | Landing detected at 2021-05-26 17:34:20 is too old. Excepted interval was 00:00:15.7500000. Discarding.
2021-05-26 12:39:52:291 | INFO | JOB | LSO BOT loop duration was 00:00:00.5080000
2021-05-26 12:39:52:293 | INFO | TIMING | Sleep duration is now 15242 based on 00:00:15.7500000 - 00:00:00.5080000
2021-05-26 12:39:52:294 | INFO | TIMING | LSO BOT Cycle Ran. Sleeping for 15242 milliseconds
2021-05-26 12:40:07:549 | INFO | JOB | Begin cycle 9 of 40
2021-05-26 12:40:07:986 | INFO | DETECT | Landing detected at 2021-05-26 17:40:07 UTC
2021-05-26 12:40:07:986 | INFO | TIMING | Time diference from the start of the loop is 00:00:00.5510000
2021-05-26 12:40:07:986 | INFO | Raw Grade is GRADE:C : WX FX DRX (LURIM) DRIM DLIC LULIC TMRDAR WIRE# 2 EGIW [BC]
2021-05-26 12:40:07:986 | INFO | REGEX | Regraded Grade: C (CUT): WX FX DRX (LURIM) DRIM DLIC LULIC TMRDAR WIRE# 2
2021-05-26 12:40:08:658 | INFO | DISCORD | A landing event was detected and sent successfully via Discord.
2021-05-26 12:40:08:674 | INFO | JOB | LSO BOT loop duration was 00:00:01.1230000
2021-05-26 12:40:08:674 | INFO | TIMING | Sleep duration is now 14893 based on 00:00:16.0160000 - 00:00:01.1230000
2021-05-26 12:40:08:674 | INFO | TIMING | LSO BOT Cycle Ran. Sleeping for 14893 milliseconds
2021-05-26 12:40:23:582 | INFO | JOB | Begin cycle 10 of 40
2021-05-26 12:40:24:048 | INFO | DETECT | Landing detected at 2021-05-26 17:40:07 UTC
2021-05-26 12:40:24:057 | INFO | TIMING | Time diference from the start of the loop is 00:00:16.5860000
2021-05-26 12:40:24:059 | INFO | Raw Grade is GRADE:C : WX FX DRX (LURIM) DRIM DLIC LULIC TMRDAR WIRE# 2 EGIW [BC]
2021-05-26 12:40:24:061 | INFO | REGEX | Regraded Grade: C (CUT): WX FX DRX (LURIM) DRIM DLIC LULIC TMRDAR WIRE# 2
2021-05-26 12:40:24:295 | INFO | DISCORD | A landing event was detected and sent successfully via Discord.
2021-05-26 12:40:24:297 | INFO | JOB | LSO BOT loop duration was 00:00:00.7100000
2021-05-26 12:40:24:298 | INFO | TIMING | Sleep duration is now 16536 based on 00:00:17.2460000 - 00:00:00.7100000
2021-05-26 12:40:24:302 | INFO | TIMING | LSO BOT Cycle Ran. Sleeping for 16536 milliseconds
2021-05-26 12:40:40:846 | INFO | JOB | Begin cycle 11 of 40
2021-05-26 12:40:41:174 | INFO | DETECT | Landing detected at 2021-05-26 17:40:07 UTC
2021-05-26 12:40:41:174 | INFO | TIMING | Time diference from the start of the loop is 00:00:33.8460000
2021-05-26 12:40:41:174 | INFO | Raw Grade is GRADE:C : WX FX DRX (LURIM) DRIM DLIC LULIC TMRDAR WIRE# 2 EGIW [BC]
2021-05-26 12:40:41:174 | INFO | REGEX | Regraded Grade: C (CUT): WX FX DRX (LURIM) DRIM DLIC LULIC TMRDAR WIRE# 2
2021-05-26 12:40:41:197 | WARNING | TIMING | Landing detected at 2021-05-26 17:40:07 is too old. Excepted interval was 00:00:16.4200000. Discarding.
2021-05-26 12:40:41:199 | INFO | JOB | LSO BOT loop duration was 00:00:00.3530000
2021-05-26 12:40:41:200 | INFO | TIMING | Sleep duration is now 16067 based on 00:00:16.4200000 - 00:00:00.3530000
2021-05-26 12:40:41:202 | INFO | TIMING | LSO BOT Cycle Ran. Sleeping for 16067 milliseconds
2021-05-26 12:40:57:283 | INFO | JOB | Begin cycle 12 of 40
lsoBot-rawGrades.txt
2021-05-26 12:34:28:353 GRADE:--- : WIRE# 2 EGIW [BC]
2021-05-26 12:40:08:079 GRADE:C : WX FX DRX (LURIM) DRIM DLIC LULIC TMRDAR WIRE# 2 EGIW [BC]
2021-05-26 12:40:24:068 GRADE:C : WX FX DRX (LURIM) DRIM DLIC LULIC TMRDAR WIRE# 2 EGIW [BC]
2021-05-26 12:45:25:905 GRADE:--- : FX WIRE# 3 EGIW [BC]
lsoBot-reGrades.txt
2021-05-26 12:34:28:355 OK (Acceptable): WIRE# 2
2021-05-26 12:40:08:088 C (CUT): WX FX DRX (LURIM) DRIM DLIC LULIC TMRDAR WIRE# 2
2021-05-26 12:40:24:071 C (CUT): WX FX DRX (LURIM) DRIM DLIC LULIC TMRDAR WIRE# 2
2021-05-26 12:45:25:905 OK (Acceptable): FX WIRE# 3
Describe the bug
Lsobot will send a duplicate grade for the same trap to discord.
See Cycle 9 and 10 in lsobot-debug.txt
To Reproduce
Random and rare; dependent on timing.
Environment Info:
Wire in middle:
Pilot: Maverick Grade: C (CUT): LULX FX TMRDIC WIRE# 1 (NX) DRIC LOIC LOAR
LURIM:
Pilot: Maverick Grade: C CUT: : LURX LOIM LOIC PIC PPPIC (LURIM) LOAR LNFIW WIRE# 4
Please attach your dcs.log for when the bug is experienced
Describe the bug
Embed webhook step improperly splits GRADE: B (Bolter) :
to GRADE
causing misgrade in embed.
To Reproduce
Steps to reproduce the behavior:
GRADE: B (Bolter) :
Expected behavior
Should split to B (Bolter)
Event Log
2021-05-08 08:02:25:392 | INFO | Begin cycle 4 of 4
2021-05-08 08:02:25:532 | INFO | Trap detected at 2021-05-08 13:02:12 UTC
2021-05-08 08:02:25:548 | INFO | Time diference from the start of the loop is 00:00:13.4070000
2021-05-08 08:02:25:579 | INFO | Raw Grade is GRADE:OWO : _DRX_ _LURX_
2021-05-08 08:02:25:595 | INFO | | REGEX | Found an own wave off. Sleeping for 6 seconds to detect a bolter
2021-05-08 08:02:31:720 | INFO | | REGEX | Found a takeoff event within bolter timeframe.
2021-05-08 08:02:31:860 | INFO | | REGEX | Detected bolter, grading pass as Bolter
2021-05-08 08:02:31:876 | INFO | | REGEX | Regraded Grade: GRADE: B (Bolter) : _LURX_
2021-05-08 08:02:32:142 | INFO | | DISCORD | A landing event was detected and sent successfully via Discord.
2021-05-08 08:02:32:157 | INFO | LSO BOT loop duration was 00:00:06.7500000
2021-05-08 08:02:32:173 | INFO | Sleep duration is now 8532 based on 00:00:15.2820000 - 00:00:06.7500000
2021-05-08 08:02:32:189 | INFO | LSO BOT Cycle Ran. Sleeping for 8532 milliseconds
Environment Info:
Additional context
Add any other context about the problem here.
When a new day occurs in UTC, the time difference check evaluates all landings in the log as a negative time difference so it will continuously spam the webhook.
Additionally WOs with 3PTSIW indicating a landing, are WOs, when they should be cuts:
WO (Wave Off): _FX_ _LOIC_ _LULIC_ _PPPIC_ WO(AFU)IC 3PTSIW
Currently, LSO Bot runs on the job interval, will need an internal loop and interval of 4 per job run.
Describe the bug
When running the bot on Windows 10 and following the installation instructions, LsoBot-Register will run and say the job is created, but the bot will not write any debug logs and traps are not recorded.
Checking in Task Scheduler, Task Scheduler Library -> Microsoft -> Windows -> Powershell -> ScheduledJobs -> LSO Check will show this error:
Task Scheduler failed to start "\Microsoft\Windows\PowerShell\ScheduledJobs\LSO Check" task for user "REDACTED". Additional Data: Error Value: 2147943711.
Environment Info:
Describe the bug
WX
, FX
, NX
, HX
, LOX
, and other start calls are all reported separately.
Expected behavior
Per SME, LSOs will usually combine start issues together so WX FX NX HX
should become HWFNX
Please attach your dcs.log for when the bug is experienced
dcslog.zip
Describe the bug
Same report keeps getting sent to Discord
To Reproduce
Steps to reproduce the behavior:
Mot even sure anyone is landing
Expected behavior
Reports of actual landings
Event Log
LsoBotLogs.zip
Environment Info:
Additional context
Add any other context about the problem here.
Please attach your dcs.log for when the bug is experienced
Describe the bug
When at the ramp and in the wires, it is possible for you to land and somehow trigger the foul deck wave off which immediately gets reported as:
Pilot: 102 | "Uno" Hex Grade: WO (Wave Off): LULX LULIM WO(AFU)IC
Expected behavior
In this scenario, there were is no IC, AR, or IW call that justifies the AFU. Pilot reports that they got a foul deck after they were wheels down. In the scenario that there are no IC, AR, or IW calls, but there is a WO(AFU)IC, this may be able to be re-written as WO(FD).
Event Log
2021-05-08 01:24:49:723 | INFO | Begin cycle 4 of 4
2021-05-08 01:24:49:817 | INFO | Trap detected at 2021-05-08 06:24:35 UTC
2021-05-08 01:24:49:832 | INFO | Time diference from the start of the loop is 00:00:14.7230000
2021-05-08 01:24:49:832 | INFO | Raw Grade is GRADE:WO _LULX_ SLOX _LULIM_ WO(AFU)IC
2021-05-08 01:24:49:848 | INFO | | REGEX | Found a wave off. Sleeping for 6 seconds to detect a bolter
2021-05-08 01:24:56:161 | INFO | | REGEX | Did not detect bolter, grading pass as WO
2021-05-08 01:24:56:442 | INFO | | DISCORD | A landing event was detected and sent successfully via Discord.
2021-05-08 01:24:56:458 | INFO | LSO BOT loop duration was 00:00:06.7350000
2021-05-08 01:24:56:474 | INFO | Sleep duration is now 9199 based on 00:00:15.9340000 - 00:00:06.7350000
2021-05-08 01:24:56:489 | INFO | LSO BOT Cycle Ran. Sleeping for 9199 milliseconds
Environment Info:
Please attach your dcs.log for when the bug is experienced
Describe the bug
Currently, in DCS, the following is observed:
Scenario A: A LURX DRX
call indicates an overshoot before the groove (1NM starts)
Scenario B: A LURX DRX LULX DLX
call indicates an overshoot inside the start of the groove (1NM) OR if the player calls in before they are on centerline.
Scenario C: A LURX
with no DRX
appears to indicate a genuine lineup right.
Scenario D: A LULX
with no DLX
appears to indicate a genuine lineup left.
Currently in LSO BOT Scenario A is not evaluated differently, Scenario B writes the grade to LURX DRX
, Scenario C/D do not need additional evaluation.
Desired behavior
When LURX DRX
appears with a LURIM
, this should be evaluated as OS
When LURX DRX
appears with no LURIM
, this should be evaluated as OSCB
When LURX DRX LULX DRX
appears with a LURIM
, this should be evaluated as TTS OS
(?)
When LURX DRX LULX DRX
appears with no LURIM
, this should be evaluated as TTS OSCB
(?)
Describe the bug
Currently a chain of comments like _LULIM_ (LULIC) LULAR
will be written as such which when sprinkled into the rest of a grade may make "reading the story" of the landing difficult.
Expected behavior
Using the above example, this could be written simply as LULIM-AR
.
Similarly LURX LURIM LURIC LURAR
could be written as LURAW
Additional Info
When evaluating the severity of the grades perhaps a point system could be assigned where a minor deviation ( (LURX)
) is worth 1 point, a normal deviation is worth 2 points (LURX
), and a major deviation is worth 3 points (_LURX_
). The points for each phase that get added to the merged comment are averaged and the merged comment made minor if the average is between 1 and 1.5, normal if between 1.5 and 2.5, and major if 2.5 to 3.
e.g. (LURX)
1pt LURIM
2pts _LURIC_
3pts = 5pts/3 = 2 Normal.
But there would need to also be a bias towards IC and AR calls since these are inherently less safe deviations.
This script is super simple to setup, but it's frustrating to check into any sort of public version control since the web hook URL is inside of the primary file.
It's dead simple to read it from a file, and it'd make it easier for people to contribute if they aren't at risk of posting private information. If this increases the complexity for users by too much, consider only using the in-file hook URL if the file doesn't exist or is empty or something, such that users who want to use a file can and users who don't retain their simple flow.
Fwiw, reading from a file is a single line.
$hookUrl = Get-Content "hook_url.txt"
The group I fly with has a number of members who fly multiple carrier-capable aircraft and while the bot is amazing, it is difficult to track who landed in which aircraft. I'm not sure if this is possible (I know the landing event itself doesn't include it, but perhaps it's possible to correlate grades with landing events and those in turn with slot events), but it'd be great if it could be added.
Describe the bug
The registration script will fail and LsoBot will not properly log unless a user manually creates the Logs folder,
Expected behavior
The registration script and main script should check for the Logs folder and make it if it does not exist.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.