Skip to content

Commit

Permalink
v0.4.5, minor bug fixes: invalid instrument approach on APP UPLOAD, e…
Browse files Browse the repository at this point in the history
…mpty ROUTER in APP SCRAPE, clear console after installing modules.
  • Loading branch information
glott committed Apr 13, 2023
1 parent b7f9b65 commit 071616d
Show file tree
Hide file tree
Showing 17 changed files with 36 additions and 20 deletions.
9 changes: 6 additions & 3 deletions APP_SCRAPE.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'install', 'selenium']);
subprocess.check_call([sys.executable, '-m', 'pip',
'install', 'webdriver_manager']);
os.system('cls')

import requests
from selenium import webdriver
Expand Down Expand Up @@ -151,9 +152,11 @@ def wait(w=1, t=5):
s = 'ident,type,dep,arr,alt,speed,route,rules,equip,spawn-delay,' \
+ 'gate,lat,lon,ralt,rspeed,hdg,dct,proc'
goal_intercept_alt = int(read_config_value('INTERCEPT_ALT'))
router_long = read_config_value('ROUTER').split(',')
router = [i.split(':') for i in router_long]
routes = [i[0] for i in router]
routes = list()
if ',' in read_config_value('ROUTER'):
router_long = read_config_value('ROUTER').split(',')
router = [i.split(':') for i in router_long]
routes = [i[0] for i in router]

def find_intercept(tracklog_url):
wait(w=random.uniform(1, 2.5))
Expand Down
5 changes: 4 additions & 1 deletion APP_UPLOAD.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'install', 'selenium']);
subprocess.check_call([sys.executable, '-m', 'pip',
'install', 'webdriver_manager']);
os.system('cls')

import requests
from selenium import webdriver
Expand Down Expand Up @@ -244,7 +245,9 @@ def delete_existing(ident):
prev_spawn_delay = true_spawn_delay
set_data(pos, 'spawnDelay', true_spawn_delay)
set_data(pos, 'airportId', plane['arr'][1:])
set_data(pos, 'expectedApproach', plane['proc'])
exp_app = 'I' + plane['proc'] if len(plane['proc']) > 0 and \
plane['proc'][0].isdigit() else plane['proc']
set_data(pos, 'expectedApproach', exp_app)

click_button('Create Flight Plan')

Expand Down
1 change: 1 addition & 0 deletions ARR_SCRAPE.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'install', 'selenium']);
subprocess.check_call([sys.executable, '-m', 'pip',
'install', 'webdriver_manager']);
os.system('cls')

import requests
from selenium import webdriver
Expand Down
1 change: 1 addition & 0 deletions ARR_UPLOAD.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'install', 'selenium']);
subprocess.check_call([sys.executable, '-m', 'pip',
'install', 'webdriver_manager']);
os.system('cls')

import requests
from selenium import webdriver
Expand Down
1 change: 1 addition & 0 deletions DEP_SCRAPE.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'install', 'selenium']);
subprocess.check_call([sys.executable, '-m', 'pip',
'install', 'webdriver_manager']);
os.system('cls')

import requests
from selenium import webdriver
Expand Down
1 change: 1 addition & 0 deletions DEP_UPLOAD.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'install', 'selenium']);
subprocess.check_call([sys.executable, '-m', 'pip',
'install', 'webdriver_manager']);
os.system('cls')

import requests
from selenium import webdriver
Expand Down
1 change: 1 addition & 0 deletions DEP_VFR.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'install', 'selenium']);
subprocess.check_call([sys.executable, '-m', 'pip',
'install', 'webdriver_manager']);
os.system('cls')

import requests
from selenium import webdriver
Expand Down
1 change: 1 addition & 0 deletions FAST_UPDATE.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
except ImportError:
subprocess.check_call([sys.executable, '-m', 'pip',
'install', 'requests']);
os.system('cls')

import requests

Expand Down
9 changes: 6 additions & 3 deletions Jupyter/APP_SCRAPE.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
" 'install', 'selenium']);\n",
" subprocess.check_call([sys.executable, '-m', 'pip', \n",
" 'install', 'webdriver_manager']);\n",
" os.system('cls')\n",
"\n",
"import requests\n",
"from selenium import webdriver\n",
Expand Down Expand Up @@ -188,9 +189,11 @@
"s = 'ident,type,dep,arr,alt,speed,route,rules,equip,spawn-delay,' \\\n",
" + 'gate,lat,lon,ralt,rspeed,hdg,dct,proc'\n",
"goal_intercept_alt = int(read_config_value('INTERCEPT_ALT'))\n",
"router_long = read_config_value('ROUTER').split(',')\n",
"router = [i.split(':') for i in router_long]\n",
"routes = [i[0] for i in router]\n",
"routes = list()\n",
"if ',' in read_config_value('ROUTER'):\n",
" router_long = read_config_value('ROUTER').split(',')\n",
" router = [i.split(':') for i in router_long]\n",
" routes = [i[0] for i in router]\n",
"\n",
"def find_intercept(tracklog_url):\n",
" wait(w=random.uniform(1, 2.5))\n",
Expand Down
5 changes: 4 additions & 1 deletion Jupyter/APP_UPLOAD.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
" 'install', 'selenium']);\n",
" subprocess.check_call([sys.executable, '-m', 'pip', \n",
" 'install', 'webdriver_manager']);\n",
" os.system('cls')\n",
"\n",
"import requests\n",
"from selenium import webdriver\n",
Expand Down Expand Up @@ -287,7 +288,9 @@
" prev_spawn_delay = true_spawn_delay\n",
" set_data(pos, 'spawnDelay', true_spawn_delay)\n",
" set_data(pos, 'airportId', plane['arr'][1:])\n",
" set_data(pos, 'expectedApproach', plane['proc'])\n",
" exp_app = 'I' + plane['proc'] if len(plane['proc']) > 0 and \\\n",
" plane['proc'][0].isdigit() else plane['proc']\n",
" set_data(pos, 'expectedApproach', exp_app)\n",
"\n",
" click_button('Create Flight Plan')\n",
" \n",
Expand Down
1 change: 1 addition & 0 deletions Jupyter/ARR_SCRAPE.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
" 'install', 'selenium']);\n",
" subprocess.check_call([sys.executable, '-m', 'pip', \n",
" 'install', 'webdriver_manager']);\n",
" os.system('cls')\n",
"\n",
"import requests\n",
"from selenium import webdriver\n",
Expand Down
1 change: 1 addition & 0 deletions Jupyter/ARR_UPLOAD.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
" 'install', 'selenium']);\n",
" subprocess.check_call([sys.executable, '-m', 'pip', \n",
" 'install', 'webdriver_manager']);\n",
" os.system('cls')\n",
"\n",
"import requests\n",
"from selenium import webdriver\n",
Expand Down
1 change: 1 addition & 0 deletions Jupyter/DEP_SCRAPE.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
" 'install', 'selenium']);\n",
" subprocess.check_call([sys.executable, '-m', 'pip', \n",
" 'install', 'webdriver_manager']);\n",
" os.system('cls')\n",
"\n",
"import requests\n",
"from selenium import webdriver\n",
Expand Down
1 change: 1 addition & 0 deletions Jupyter/DEP_UPLOAD.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
" 'install', 'selenium']);\n",
" subprocess.check_call([sys.executable, '-m', 'pip', \n",
" 'install', 'webdriver_manager']);\n",
" os.system('cls')\n",
"\n",
"import requests\n",
"from selenium import webdriver\n",
Expand Down
1 change: 1 addition & 0 deletions Jupyter/DEP_VFR.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
" 'install', 'selenium']);\n",
" subprocess.check_call([sys.executable, '-m', 'pip', \n",
" 'install', 'webdriver_manager']);\n",
" os.system('cls')\n",
"\n",
"import requests\n",
"from selenium import webdriver\n",
Expand Down
13 changes: 3 additions & 10 deletions Jupyter/FAST_UPDATE.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,10 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"id": "e1b6f10f",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Installed!\n"
]
}
],
"outputs": [],
"source": [
"# IMPORTS AND ZIP DOWNLOAD\n",
"import zipfile, os, shutil, urllib.request, subprocess, sys, warnings\n",
Expand All @@ -25,6 +17,7 @@
"except ImportError:\n",
" subprocess.check_call([sys.executable, '-m', 'pip', \n",
" 'install', 'requests']);\n",
" os.system('cls')\n",
"\n",
"import requests\n",
"\n",
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

_by [Josh Glottmann](https://github.com/glott)_

**Version 0.4.4** - 04/11/2023
**Version 0.4.5** - 04/13/2023

Creates scenario files for [ATCTrainer](https://atctrainer.collinkoldoff.dev/#about) by [Collin Koldoff](https://github.com/collink2451) using data from [FlightAware](https://flightaware.com/)\*.

__[Download v0.4.4](https://github.com/glott/FAST/releases/latest/download/FAST.zip)__
__[Download v0.4.5](https://github.com/glott/FAST/releases/latest/download/FAST.zip)__

---
### Installation
Expand Down

0 comments on commit 071616d

Please sign in to comment.