Beispiel #1
0
 def __init__(self, lat, lon, alt, timeout):
     self.time = 0.0
     self.lat = float(lat)
     self.lon = lon
     self.alt = alt
     self.is_timeup = False
     self.timeout = timeout
     self.ascent_pts  = []
     self.descent_pts = []
     self.rap = rapid_refresh()
Beispiel #2
0
def driver(callsign, mass, balloon, tanks, para, aprsfile, lat, lon, time=0):
    rap = rapid_refresh()
    filename = rap.connect_and_fetch(lat, lon)
    rap.parse_file(filename)
        
    aprs = aprs_read()
    aprs.read_xml(aprsfile)   # parses and converts APRS values
    aprs.median_filter()

    # overwrite weather data with APRS data
    merge_data(rap, aprs, time)
    
    # write hybrid data to file
    filename = write_data(rap, aprs, callsign, time)

    # runs C preds with provided vals
    args = ('./run', filename)
    popen = Popen(args, stdin=PIPE, stdout=PIPE, stderr=PIPE)
    pred_input = '{0}\r{1}\r{2}\r{3}\r'.format(mass, balloon, tanks, para)
    out, err = popen.communicate(pred_input)
    print(out)
Beispiel #3
0
from datafetch import rapid_refresh
import pprint

if __name__ == "__main__":
    rap = rapid_refresh()
    rap.read_station_list()
    filename = rap.connect_and_fetch(42.36, -86.0)
    #rap.parse_file(filename)
    
    for ind in range(len(rap.hght)):   # for every data set
        print('{0}\n'.format(rap.vnor[3][ind]))