Skip to main content

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​

ParameterValue
InterfaceUSB-C virtual COM port or DB9 UART
Baud rateConfigurable (refer to firmware documentation for available rates)
Data bits8
ParityNone
Stop bits1
Flow controlNone

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​

FieldUnitDescription
Timestamp_msmsSystem timestamp in milliseconds since power-on or epoch
B1x_nTnTMagnetic field, sensor 1, X axis
B1y_nTnTMagnetic field, sensor 1, Y axis
B1z_nTnTMagnetic field, sensor 1, Z axis
B1v_nTnTTotal field vector magnitude, sensor 1 (√(x²+y²+z²))
B2x_nTnTMagnetic field, sensor 2, X axis
B2y_nTnTMagnetic field, sensor 2, Y axis
B2z_nTnTMagnetic field, sensor 2, Z axis
B2v_nTnTTotal field vector magnitude, sensor 2
Lat_deg°GPS latitude, decimal degrees (WGS84)
Lon_deg°GPS longitude, decimal degrees (WGS84)
Alt_mmGPS altitude above mean sea level
SIV—Satellites in view
Fix—GPS fix type (0 = no fix, 2 = 2D, 3 = 3D)
HDOP_mmHorizontal dilution of precision
Gradiometer Use

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.

GPS Quality

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​

ParameterValue
Baud rate115200
Data bits8
ParityNone
Stop bits1
Flow controlNone

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.

note

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.