Template
template for clone install
This commit is contained in:
@@ -10,12 +10,12 @@ import glob
|
|||||||
import os
|
import os
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
#ts="Nnumber"
|
#PLANE="Nnumber"
|
||||||
ts="N72KH"
|
PLANE="N72KH"
|
||||||
|
|
||||||
def prepare(date):
|
def prepare(date):
|
||||||
print("splitting logs")
|
print("splitting logs")
|
||||||
pathstring="../%s Data/flights/%s/%s_combined_%s/" %(ts,date,ts,date) # combined log
|
pathstring="../%s Data/flights/%s/%s_combined_%s/" %(PLANE,date,PLANE,date) # combined log
|
||||||
fl=glob.glob(pathstring+"L*")
|
fl=glob.glob(pathstring+"L*")
|
||||||
for f in fl: # file in filelist
|
for f in fl: # file in filelist
|
||||||
os.rename(f, f.upper())
|
os.rename(f, f.upper())
|
||||||
@@ -28,18 +28,18 @@ def prepare(date):
|
|||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
# NOW MOVE FILES TO CORRECT DIRECTORY
|
# NOW MOVE FILES TO CORRECT DIRECTORY
|
||||||
pi=[i for i, c in enumerate(f) if c =='/']
|
pi=[i for i, c in enumerate(f) if c =='/']
|
||||||
cmd="mv '%sN_E.TXT' '%s/%s_EMS_%s/'" % (fn,f[:pi[-2]],ts,date)
|
cmd="mv '%sN_E.TXT' '%s/%s_EMS_%s/'" % (fn,f[:pi[-2]],PLANE,date)
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
cmd="mv '%sN_F.TXT' '%s/%s_EFIS_%s/'" % (fn,f[:pi[-2]],ts,date)
|
cmd="mv '%sN_F.TXT' '%s/%s_EFIS_%s/'" % (fn,f[:pi[-2]],PLANE,date)
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
cmd="mv '%sN_G.TXT' '%s/%s_GPS_%s/'" % (fn,f[:pi[-2]],ts,date)
|
cmd="mv '%sN_G.TXT' '%s/%s_GPS_%s/'" % (fn,f[:pi[-2]],PLANE,date)
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
|
|
||||||
def process(date,logs):
|
def process(date,logs):
|
||||||
if logs=='all' or logs=='ems':
|
if logs=='all' or logs=='ems':
|
||||||
print("processing EMS")
|
print("processing EMS")
|
||||||
#sp="../%s Data/flights/%s/%s_EIS_%s/" %(ts,date,ts,date) # GRT EIS
|
#sp="../%s Data/flights/%s/%s_EIS_%s/" %(PLANE,date,PLANE,date) # GRT EIS
|
||||||
pathstring="../%s Data/flights/%s/%s_EMS_%s/" %(ts,date,ts,date) # Dynon EMS
|
pathstring="../%s Data/flights/%s/%s_EMS_%s/" %(PLANE,date,PLANE,date) # Dynon EMS
|
||||||
fl=glob.glob(pathstring+"LOG0*.TXT")
|
fl=glob.glob(pathstring+"LOG0*.TXT")
|
||||||
for f in fl:
|
for f in fl:
|
||||||
fn=f.split("/")[-1].split(".")[0] # filename
|
fn=f.split("/")[-1].split(".")[0] # filename
|
||||||
@@ -49,7 +49,7 @@ def process(date,logs):
|
|||||||
|
|
||||||
if logs=='all' or logs=='efis':
|
if logs=='all' or logs=='efis':
|
||||||
print("processing EFIS")
|
print("processing EFIS")
|
||||||
pathstring="../%s Data/flights/%s/%s_EFIS_%s/" %(ts,date,ts,date)
|
pathstring="../%s Data/flights/%s/%s_EFIS_%s/" %(PLANE,date,PLANE,date)
|
||||||
fl=glob.glob(pathstring+"LOG0*.TXT")
|
fl=glob.glob(pathstring+"LOG0*.TXT")
|
||||||
for f in fl:
|
for f in fl:
|
||||||
fn=f.split("/")[-1].split(".")[0] # filename
|
fn=f.split("/")[-1].split(".")[0] # filename
|
||||||
@@ -58,7 +58,7 @@ def process(date,logs):
|
|||||||
|
|
||||||
if logs=='all' or logs=='gps':
|
if logs=='all' or logs=='gps':
|
||||||
print("processing GPS")
|
print("processing GPS")
|
||||||
pathstring="../%s Data/flights/%s/%s_GPS_%s/" %(ts,date,ts,date) # path
|
pathstring="../%s Data/flights/%s/%s_GPS_%s/" %(PLANE,date,PLANE,date) # path
|
||||||
fl=glob.glob(pathstring+"LOG0*.TXT") # file list
|
fl=glob.glob(pathstring+"LOG0*.TXT") # file list
|
||||||
for f in fl:
|
for f in fl:
|
||||||
fn=f.split("/")[-1].split(".")[0] # filename
|
fn=f.split("/")[-1].split(".")[0] # filename
|
||||||
|
|||||||
@@ -27,4 +27,12 @@ Teensy 4.0 based Arduino source.
|
|||||||
Uses USBHost_t36.h and TimeLib.h.
|
Uses USBHost_t36.h and TimeLib.h.
|
||||||
## Analysis Tools
|
## Analysis Tools
|
||||||
Data analysis is done with Jupyter notebooks. Separate notebooks are used for EFIS and EMS logs.
|
Data analysis is done with Jupyter notebooks. Separate notebooks are used for EFIS and EMS logs.
|
||||||
GPS data is visualized with Google Earth.
|
GPS data is visualized with Google Earth.
|
||||||
|
<br>
|
||||||
|
clone this repository.
|
||||||
|
Rename `Analysis_Tools` something like `Flight_Data_Logger`.
|
||||||
|
Rename `Nnumber Data` to your tail number.
|
||||||
|
Edit `walk_logs.py` so `PLANE="Nnumber"`
|
||||||
|
Edit `new_flight.sh` so `PLANE="Nnumber"`
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user