v2.0.0
Loading...
Searching...
No Matches
polhemus_connection.h File Reference

Polhemus digitizer connection abstraction. More...

#include "../utils_global.h"
#include "fastrak_parser.h"
#include <QObject>
#include <QQuaternion>
#include <QSerialPort>
#include <QSerialPortInfo>
#include <QString>
#include <QStringList>
#include <QTimer>
#include <QVector3D>
Include dependency graph for polhemus_connection.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  UTILSLIB::PolhemusSerialConfig
 Settings used to open a real Polhemus serial connection. More...
class  UTILSLIB::PolhemusConnection
 Polhemus digitizer connection (mock + serial-port backends). More...

Namespaces

namespace  UTILSLIB
 Shared utilities (I/O helpers, spectral analysis, layout management, warp algorithms).

Detailed Description

Polhemus digitizer connection abstraction.

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors

Author
Christoph Dinh chris.nosp@m.toph.nosp@m..dinh.nosp@m.@mne.nosp@m.-cpp..nosp@m.org
Since
2.2.1
Date
May 2026
      Two backends share one signal interface:

      1. **Mock** — emits a scripted sweep over a 10 cm sphere
         every @c kMockTickIntervalMs. Always available so apps
         and tests run on machines without a real digitizer.

      2. **Fastrak / FastSCAN** — opens a `QSerialPort`, sends
         the continuous-output command, and decodes the ASCII
         record stream via @ref FastrakParser.

      Backend selection is implicit: an empty @c portName picks
      mock; a non-empty name picks the hardware backend.
      @ref autoDetectPortName scans @ref availablePorts for a
      likely Fastrak (FTDI USB-serial) and returns it, so the UI
      can offer a one-click "connect" without asking the user to
      type a device path.

Definition in file polhemus_connection.h.