Vatsim-Scandinavia / controlcenter

Training Management System created by VATSIM Scandinavia
https://docs.vatsca.org/controlcenter/
GNU General Public License v3.0
16 stars 14 forks source link

Inactivity notification to pilot #910

Open blt950 opened 1 month ago

blt950 commented 1 month ago

Seems there's a bug which made ESSAS be interpreted as a controller position. The regex might need some tweaks, or maybe the API has some value we can check to filter out pilots vs. controllers?

image

Adrian2k commented 6 days ago

Assuming you get the data from the live datafeed, you can filter after connections with a "facility": higher than 0 or `

Filtering after "rating": higher than 1 could also work as pilots can not connect with a controller rating - but this could affect supervisors.

-1 | INA | Inactive 0 | SUS | Suspended 1 | OBS | Pilot/Observer 2 | S1 | Tower Trainee 3 | S2 | Tower Controller 4 | S3 | TMA Controller 5 | C1 | Enroute Controller 6 | C2 | Senior Controller 7 | C3 | Senior Controller 8 | I1 | Instructor 9 | I2 | Senior Instructor 10 | I3 | Senior Instructor 11 | SUP | Supervisor 12 | ADM | Administrator

Adrian2k commented 6 days ago

Example of a pilot connection vs ATC connection

{
      "cid": 123456,
      "name": "Firstname Lastname",
      "callsign": "SAS123",
      "server": "USA-WEST",
      "pilot_rating": 0,
      "military_rating": 0,
      "latitude": 33.94736,
      "longitude": -118.40436,
      "altitude": 129,
      "groundspeed": 0,
      "transponder": "1200",
      "heading": 174,
      "qnh_i_hg": 29.89,
      "qnh_mb": 1012,
      "flight_plan": {
        "flight_rules": "I",
        "aircraft": "A20N/M-SDE2E3FGHIJ1RWXY/LB1",
        "aircraft_faa": "A20N/L",
        "aircraft_short": "A20N",
        "departure": "KLAX",
        "arrival": "KLAS",
        "alternate": "KGCN",
        "cruise_tas": "407",
        "altitude": "25000",
        "deptime": "2210",
        "enroute_time": "0044",
        "fuel_time": "0210",
        "remarks": "PBN/A1B1C1D1O1S2 DOF/240710 REG/GINEO OPR/DAL PER/C /V/",
        "route": "ORCKA5 MISEN RNDRZ2",
        "revision_id": 3,
        "assigned_transponder": "4626"
      },
      "logon_time": "2024-07-10T21:43:02.9249741Z",
      "last_updated": "2024-07-10T21:43:08.1274857Z"
    },
    {
      "cid": 1234567,
      "name": "Firstname Lastname",
      "callsign": "BEST_TWR",
      "frequency": "118.000",
      "facility": 4,
      "rating": 2,
      "server": "CANADA",
      "visual_range": 100,
      "text_atis": [
        "Example Tower",
        "Some more text"
      ],
      "last_updated": "2024-07-10T21:42:47.0847164Z",
      "logon_time": "2024-07-10T12:02:46.2011069Z"
    },
blt950 commented 5 days ago

Ahh perfect, thanks @Adrian2k . Because I see that we already filter on "controllers" category, but seems some airplanes still end up there (maybe it's observers?), the facility value will be perfect for further filtering then.

Example of "controller" I found in datafeed right now

    { 
"cid": 1781815,
            "name": "name name",
            "callsign": "DAL141",
            "frequency": "199.998",
            "facility": 0,
            "rating": 1,
            "server": "USA-EAST",
            "visual_range": 42,
            "text_atis": null,
            "last_updated": "2024-07-11T07:33:30.9384722Z",
            "logon_time": "2024-07-11T04:34:23.6330483Z"
        }