Exemplo n.º 1
0
def basic_kf():
    lambd = 0.1
    for i in range(1):
        data = _load_data()
        output = mp.kalman2d(data)
        mp.plot(data, output)
        lambd *= 2
Exemplo n.º 2
0
'''


def _load_data():
    lines = [line.rstrip('\n') for line in open("data.txt")]
    data = []
    for line in range(0, len(lines)):
        data.append(map(float, lines[line].split(' ')))
    return data


if __name__ == "__main__":

    # This is for part a of the MP. Comment this when you want to work on part b of the MP
    data = _load_data()
    output = mp.kalman2d(data)
    mp.plot(data, output)

    # This is for part b of the MP. Uncomment when you work on this part of the MP
    '''
    #Remove the block comment to work on part b of the the MP 

    # Setup the UI
    _setup_ui()

    # Start main logic thread
    thread = threading.Thread(target=_background_logic)
    thread.start()

    # Enter UI loop
    _ui_loop()