如何从MIMO雷达数据绘制3D图

时间:2020-03-11 22:04:47

标签: python matplotlib plot 3d

我目前正在使用MIMO雷达(VTRIG-74)。产品给出的示例代码正在打印出大量数字,我现在发现它们是复数。有人可以告诉我如何从中绘制出有意义的3D图形吗?

import itertools
import ctypes
import argparse
import sys
import matplotlib.pyplot as plt
from imp import load_source
from os.path import join

def DefaultModulePath():
    if sys.platform == 'win32':
        modulePath = join('C:/', 'Program Files', 'Vayyar', 'vtrigU', 'python', 'vtrigU.py')
    elif sys.platform.startswith('linux'):
        modulePath = join('/usr', 'share', 'vtrigU', 'python', 'vtrigU.py')
    else:
        raise BaseException('Unsupported platform: ' + sys.platform)
    return modulePath

def Import_vtrigU():
    global vtrig
    vtrig = load_source('vtrigU', DefaultModulePath())

if __name__ == '__main__':
    Import_vtrigU()

    vtrig.Init()
    # apply settings:

    vtrigSettings = vtrig.RecordingSettings(
        vtrig.FrequencyRange(65.0*1000, 65.5*1000, 21), # 101 points, from 65.0-66.0 GHz
        30.0, # RBW (in KHz)
        vtrig.VTRIG_U_TXMODE__LOW_RATE #
        ) 
    vtrig.ApplySettings(vtrigSettings)

    vtrig.Record() # one recording

    # modify settings
    vtrigSettings.rbw_khz = 30.5
    vtrigSettings.mode = vtrig.VTRIG_U_TXMODE__MED_RATE
    vtrig.ApplySettings(vtrigSettings)

    actual_freqs = vtrig.GetFreqVector_MHz()
    pair_list = vtrig.GetAntennaPairs(vtrigSettings.mode)
    print(vtrig.GetRecordingResult())

Printed Data from Example Code

0 个答案:

没有答案