GPS Device
Loading...
Searching...
No Matches
datalog.h File Reference

Data log module public API. More...

#include "err.h"
#include "configuration.h"
Include dependency graph for datalog.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  DATALOG_CFG_ts
 Configuration structure for initializing a data log handle. More...

Typedefs

typedef struct datalog_handle_s DATALOG_HANDLE_ts
 Opaque handle representing a data log instance.

Enumerations

enum  DATALOG_TIME_te {
  DATALOG_TIME_1S = 1 , DATALOG_TIME_2S = 2 , DATALOG_TIME_3S = 3 , DATALOG_TIME_4S = 4 ,
  DATALOG_TIME_5S = 5 , DATALOG_TIME_10S = 10 , DATALOG_TIME_20S = 20 , DATALOG_TIME_30S = 30 ,
  DATALOG_TIME_40S = 40 , DATALOG_TIME_50S = 50 , DATALOG_TIME_60S = 60
}
 Logging interval in seconds between consecutive log entries. More...

Functions

ERR_te datalog_init_subsys (void)
 Initializes the data log subsystem.
ERR_te datalog_deinit_subsys (void)
 Deinitializes the data log subsystem.
ERR_te datalog_start_subsys (void)
 Starts the data log subsystem.
ERR_te datalog_stop_subsys (void)
 Stops the data log subsystem.
ERR_te datalog_init_handle (DATALOG_CFG_ts const *datalog_cfg, DATALOG_HANDLE_ts **datalog_handle_o)
 Initializes and registers a data log handle.
ERR_te datalog_deinit_handle (DATALOG_HANDLE_ts const *datalog_handle)
 Deinitializes a data log handle.
ERR_te datalog_run_handle (DATALOG_HANDLE_ts *datalog_handle)
 Writes a GPS data entry to the log file if the logging interval has elapsed.

Detailed Description

Data log module public API.

Author
github.com/Baksi675

This module implements periodic GPS data logging to a FAT filesystem (via FatFs) on an SD card. Each log entry records time, latitude, longitude, orthometric height, movement speed, and movement direction as retrieved from the NEO-6 GPS module.

Typical usage:

Version
0.1
Date
2026-02-15

Definition in file datalog.h.