コード例 #1
0
    #        {'flt': 'FLT06', 'seg': ('time_us', [1122539650, 1134539650], 'FLT06 - 23 m/s')}, # 23 m/s
    #        {'flt': 'FLT05', 'seg': ('time_us', [582408497, 594408497], 'FLT05 - 26 m/s')}, # 26 m/s
    #        {'flt': 'FLT05', 'seg': ('time_us', [799488311, 811488311], 'FLT05 - 29 m/s')}, # 29 m/s
    #        {'flt': 'FLT06', 'seg': ('time_us', [955822061, 967822061], 'FLT06 - 32 m/s')}, # 32 m/s
]

oDataSegs = []
for rtsmSeg in rtsmSegList:
    fltNum = rtsmSeg['flt']

    fileLog = fileList[fltNum]['log']
    fileConfig = fileList[fltNum]['config']

    # Load
    h5Data = Loader.Load_h5(fileLog)  # RAPTRS log data as hdf5
    sysConfig = Loader.JsonRead(fileConfig)
    oData = Loader.OpenData_RAPTRS(h5Data, sysConfig)

    # Create Signal for Bending Measurement
    aZ = np.array([
        oData['aCenterFwdIMU_IMU_mps2'][2] -
        oData['aCenterFwdIMU_IMU_mps2'][2][0],
        oData['aCenterAftIMU_IMU_mps2'][2] -
        oData['aCenterAftIMU_IMU_mps2'][2][0],
        oData['aLeftMidIMU_IMU_mps2'][2] - oData['aLeftMidIMU_IMU_mps2'][2][0],
        oData['aLeftFwdIMU_IMU_mps2'][2] - oData['aLeftFwdIMU_IMU_mps2'][2][0],
        oData['aLeftAftIMU_IMU_mps2'][2] - oData['aLeftAftIMU_IMU_mps2'][2][0],
        oData['aRightMidIMU_IMU_mps2'][2] -
        oData['aRightMidIMU_IMU_mps2'][2][0],
        oData['aRightFwdIMU_IMU_mps2'][2] -
コード例 #2
0
]

#windSegList = [
#        {'flt': 'FLT03', 'seg': ('time_us', [610000000, 741298701])},
#        {'flt': 'FLT03', 'seg': ('time_us', [839997973, 925000000])},
#        {'flt': 'FLT04', 'seg': ('time_us', [940469572, 957651007])}
#    ]

oDataWindList = []
for windSeg in windSegList:
    fltNum = windSeg['flt']

    fileLog = fileList[fltNum]['log']
    fileConfig = fileList[fltNum]['config']

    oData, h5Data = Loader.Log_RAPTRS(fileLog, fileConfig)
    oData = OpenData.Decimate(oData, 10)
    oDataWindList.append(OpenData.Segment(oData, windSeg['seg']))

fig, ax = plt.subplots(nrows=2)
for oDataWind in oDataWindList:

    latGps_deg = oDataWind['rGps_D_ddm'][0]
    lonGps_deg = oDataWind['rGps_D_ddm'][1]
    latB_deg = oDataWind['rB_D_ddm'][0]
    lonB_deg = oDataWind['rB_D_ddm'][1]
    ax[0].plot(lonGps_deg, latGps_deg, '.', label='GPS')
    #    ax[0].plot(lonB_deg, latB_deg, label='Ekf')
    ax[0].grid()
    ax[1].plot(oDataWind['time_s'], oDataWind['vIas_mps'])
    #    ax[1].plot(oDataWind['time_s'], oDataWind['sB_L_rad'][0]*180.0/np.pi)
コード例 #3
0
                                 'Huginn' + flt + '.h5')
fileList[flt]['config'] = path.join(pathBase, 'Huginn' + flt, 'huginn.json')
fileList[flt]['def'] = path.join(pathBase, 'Huginn' + flt, 'huginn_def.json')

#%% Bending

ExcName = 'Bend'
segList = []
oDataList = []

for flt in fileList.keys():
    fileLog = fileList[flt]['log']
    fileConfig = fileList[flt]['config']
    fileDef = fileList[flt]['def']

    fltDef = Loader.JsonRead(fileDef)

    for testPt in fltDef['Test-Points']:
        if testPt['Excitation'] == ExcName:

            # Load Flight Log
            oData, h5Data = Loader.Log_RAPTRS(fileLog, fileConfig)
            t0 = testPt['time_us'][0] * 1e-6
            tf = t0 + (2 * np.pi) + 2.0

            ODataSeg = OpenData.Segment(oData, ('time_s', [t0, tf]))
            oDataList.append(ODataSeg)

            seg = {
                'flt': flt,
                'seg': ('time_us', testPt['time_us']),
コード例 #4
0
# Constants
hz2rps = 2 * np.pi
rps2hz = 1 / hz2rps

pathBase = os.path.join('/home', 'rega0051', 'FlightArchive')
ac = 'Huginn'
flt = 'FLT03'

fileLog = os.path.join(pathBase, ac, ac + flt, ac + flt + '.h5')
fileTestDef = os.path.join(pathBase, ac, ac + flt, ac.lower() + '_def.json')
fileSysConfig = os.path.join(pathBase, ac, ac + flt, ac.lower() + '.json')

#%%
# Read in raw h5 data into dictionary and data
oData, h5Data = Loader.Log_RAPTRS(fileLog, fileSysConfig)

# Plot Overview of flight
#oData = OpenData.Segment(oData, ('time_s', [950, 970]))
OpenData.PlotOverview(oData)

#%% Find Excitation Times
excList = OpenData.FindExcite(oData)
segList = []
print('\n\nFlight Excitation Times:\n')
for iExc in range(0, len(excList)):
    print('Excitiation: ', excList[iExc][0], ', Time: [', excList[iExc][1][0],
          ',', excList[iExc][1][1], ']')

    segList.append(('time_us', excList[iExc][1]))