Omaha #3392 Strip spaces from receiver and tailnumber to match original version
Change-Id: I2f13a8b8e43d78b589bd139ccd44b7142536042b Former-commit-id:46ca1ee8a4
[formerly 3e4f98be1973aa7342bc8a0a1191f37ce93ada49] Former-commit-id:f06b17494f
This commit is contained in:
parent
4ec7dd68dc
commit
47f978b87d
1 changed files with 19 additions and 15 deletions
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -31,9 +31,9 @@
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 07/23/2014 3392 nanbowle Initial modification. Replaces UEngine with DAF.
|
# 07/23/2014 3392 nabowle Initial modification. Replaces UEngine with DAF.
|
||||||
#
|
# 07/28/2014 3392 nabowle Strip tail and receiver to match original formatting.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,27 +60,27 @@ def get_args():
|
||||||
def main():
|
def main():
|
||||||
# Values used to indicate no data.
|
# Values used to indicate no data.
|
||||||
NO_DATA = [None, "None", -9999, -9999.0, "-9999", "-9999.0", ""]
|
NO_DATA = [None, "None", -9999, -9999.0, "-9999", "-9999.0", ""]
|
||||||
|
|
||||||
user_args = get_args()
|
user_args = get_args()
|
||||||
|
|
||||||
# Set the host in the DataAcessLayer if supplied
|
# Set the host in the DataAcessLayer if supplied
|
||||||
if user_args.host:
|
if user_args.host:
|
||||||
DataAccessLayer.changeEDEXHost(user_args.host)
|
DataAccessLayer.changeEDEXHost(user_args.host)
|
||||||
|
|
||||||
start = user_args.start
|
start = user_args.start
|
||||||
end = user_args.end
|
end = user_args.end
|
||||||
|
|
||||||
if not start or not end:
|
if not start or not end:
|
||||||
print >> sys.stderr, "Start or End date not provided"
|
print >> sys.stderr, "Start or End date not provided"
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
req = DataAccessLayer.newDataRequest("acars")
|
req = DataAccessLayer.newDataRequest("acars")
|
||||||
req.setParameters("tailNumber", "receiver", "pressure", "flightPhase",
|
req.setParameters("tailNumber", "receiver", "pressure", "flightPhase",
|
||||||
"rollAngleQuality", "temp", "windDirection", "windSpeed",
|
"rollAngleQuality", "temp", "windDirection", "windSpeed",
|
||||||
"humidity", "mixingRatio", "icing")
|
"humidity", "mixingRatio", "icing")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
beginRange = datetime.strptime( start + ":00.0", "%Y-%m-%d %H:%M:%S.%f")
|
beginRange = datetime.strptime( start + ":00.0", "%Y-%m-%d %H:%M:%S.%f")
|
||||||
endRange = datetime.strptime( end + ":59.9", "%Y-%m-%d %H:%M:%S.%f")
|
endRange = datetime.strptime( end + ":59.9", "%Y-%m-%d %H:%M:%S.%f")
|
||||||
|
@ -96,13 +96,15 @@ def main():
|
||||||
mytail = geoData.getString("tailNumber")
|
mytail = geoData.getString("tailNumber")
|
||||||
if mytail in NO_DATA:
|
if mytail in NO_DATA:
|
||||||
mytail = ""
|
mytail = ""
|
||||||
|
else:
|
||||||
|
mytail = mytail.strip()
|
||||||
|
|
||||||
mytime = geoData.getDataTime()
|
mytime = geoData.getDataTime()
|
||||||
if mytime == None:
|
if mytime == None:
|
||||||
continue
|
continue
|
||||||
#2014-07-16 00:00:00 (0) => 2014-07-16_00:00:00
|
#2014-07-16 00:00:00 (0) => 2014-07-16_00:00:00
|
||||||
mytime = str(mytime)[0:19].replace(" ","_")
|
mytime = str(mytime)[0:19].replace(" ","_")
|
||||||
|
|
||||||
geo = geoData.getGeometry()
|
geo = geoData.getGeometry()
|
||||||
if geo == None:
|
if geo == None:
|
||||||
continue
|
continue
|
||||||
|
@ -112,10 +114,12 @@ def main():
|
||||||
continue
|
continue
|
||||||
mylat = "%.4f"%float(mylat)
|
mylat = "%.4f"%float(mylat)
|
||||||
mylon = "%.4f"%float(mylon)
|
mylon = "%.4f"%float(mylon)
|
||||||
|
|
||||||
myrec = geoData.getString("receiver")
|
myrec = geoData.getString("receiver")
|
||||||
if myrec in NO_DATA:
|
if myrec in NO_DATA:
|
||||||
myrec = ""
|
myrec = ""
|
||||||
|
else:
|
||||||
|
myrec = myrec.strip()
|
||||||
|
|
||||||
mypres = geoData.getNumber("pressure")
|
mypres = geoData.getNumber("pressure")
|
||||||
if mypres in NO_DATA:
|
if mypres in NO_DATA:
|
||||||
|
|
Loading…
Add table
Reference in a new issue