Serial and CSV Formats
This page documents the serial communication settings and data formats used by the FGA Logger and FG-3C sensor.
FGA Logger
Serial Settings
| Parameter | Value |
|---|---|
| Interface | USB-C virtual COM port or DB9 UART |
| Baud rate | Configurable (refer to firmware documentation for available rates) |
| Data bits | 8 |
| Parity | None |
| Stop bits | 1 |
| Flow control | None |
Connect the FGA Logger via USB-C to your PC. It will appear as a virtual COM port (Windows: COMx, Linux/macOS: /dev/ttyUSBx or /dev/tty.usbserial-x).
CSV Format
The FGA Logger outputs data in comma-separated values (CSV) format, both on the serial interface and in the SD card log files. Each row represents one measurement sample.
Header Line
Timestamp_ms,B1x_nT,B1y_nT,B1z_nT,B1v_nT,B2x_nT,B2y_nT,B2z_nT,B2v_nT,Lat_deg,Lon_deg,Alt_m,SIV,Fix,HDOP_m
Example Data Row
1710500123456,24312.5,-1823.1,44521.8,50234.6,24318.2,-1819.4,44518.3,50231.1,46.051980,14.506280,312.4,8,3,1.2
Field Descriptions
| Field | Unit | Description |
|---|---|---|
Timestamp_ms | ms | System timestamp in milliseconds since power-on or epoch |
B1x_nT | nT | Magnetic field, sensor 1, X axis |
B1y_nT | nT | Magnetic field, sensor 1, Y axis |
B1z_nT | nT | Magnetic field, sensor 1, Z axis |
B1v_nT | nT | Total field vector magnitude, sensor 1 (√(x²+y²+z²)) |
B2x_nT | nT | Magnetic field, sensor 2, X axis |
B2y_nT | nT | Magnetic field, sensor 2, Y axis |
B2z_nT | nT | Magnetic field, sensor 2, Z axis |
B2v_nT | nT | Total field vector magnitude, sensor 2 |
Lat_deg | ° | GPS latitude, decimal degrees (WGS84) |
Lon_deg | ° | GPS longitude, decimal degrees (WGS84) |
Alt_m | m | GPS altitude above mean sea level |
SIV | — | Satellites in view |
Fix | — | GPS fix type (0 = no fix, 2 = 2D, 3 = 3D) |
HDOP_m | m | Horizontal dilution of precision |
In single-sensor configurations, the B2 fields (B2x_nT, B2y_nT, B2z_nT, B2v_nT) will be zero or not populated. In gradiometer configurations, both B1 and B2 are active, and the gradient can be computed as B1 − B2 per axis.
Use Fix and HDOP_m to filter out low-quality GPS rows. A Fix of 3 and HDOP_m below 2.0 indicates a reliable GPS position.
FG-3C Serial Output
Settings
| Parameter | Value |
|---|---|
| Baud rate | 115200 |
| Data bits | 8 |
| Parity | None |
| Stop bits | 1 |
| Flow control | None |
UART Mode
In UART mode, the FG-3C transmits the measured magnetic field as ASCII text in nT via Pin 4 (TX). Connect Pin 4 to the RX of your MCU or to a USB-UART bridge.
Example Output
24315.2
24318.6
24311.9
24320.4
Each line is one measurement sample. The value is the field magnitude along the sensor's sensitive axis in nanotesla.
Output rate and exact format (fixed decimal places, signed vs. unsigned) may vary with firmware version. Refer to the FG-3C datasheet for full specifications.