@k2ironman Below is some references for you,
- pip install openimu
- sample code
import time
import threading
from aceinna.tools import Detector
def handle_receive_continous_data(packet_type, data):
# the position data will be in packet_type equals 'pos'
print(packet_type, data)
def on_find_device(device):
# prepare to use
device.setup(None)
# listen the output data
device.on('continous', handle_receive_continous_data)
def prepare():
detector = Detector(
device_type='OpenRTK',
com_port='{DEVICE COM}',
baudrate=460800)
detector.find(on_find_device)
if __name__ == '__main__':
threading.Thread(target=prepare).start()
while True:
time.sleep(10)
For more advance usage, please take a look of the source code.