Skip to content

file gnss.h

Types

Name
structgnss_data_t
Structure representing GNSS data.
enumgnss_nav_t
GNSS Navigation System Enumeration.

Types Documentation

enum gnss_nav_t

EnumeratorDescription
gnssNavSysNoneNo GNSS navigation system is available.
gnssNavSysGPSGPS (Global Positioning System) navigation system is available.
gnssNavSysGLONASSGLONASS (Global Navigation Satellite System) navigation system is available.

GNSS Navigation System Enumeration.

Note: This enumeration can be used to specify the navigation system used by a GNSS receiver.

This enumeration defines the supported GNSS navigation systems for a given location.

Source code

cpp
/*******************************************************************************
 * @file       gnss.h
 * @license    This file is part of the ImagineOn Coldwave eOS software package
 *             licensed under the ImagineOn software-licensing terms available
 *             under https://www.imagineon.de/de/info/licensing-terms
 * @copyright  Copyright (c) 2024. ImagineOn GmbH. www.imagineon.de.
 ******************************************************************************/

#ifndef _COLDWAVEOS_GNSS_H
#define _COLDWAVEOS_GNSS_H

#include <inttypes.h>
#include <driver.h>


#if defined (__cplusplus)
extern "C" {
#endif

typedef enum gnss_nav_t
{
    gnssNavSysNone,   
    gnssNavSysGPS,    
    gnssNavSysGLONASS 
} gnss_nav_t;

typedef struct gnss_data_t
{
    gnss_nav_t sys;   
    uint8_t num_sat;  
    uint32_t time;    
    float lat;        
    float lon;        
    float alt;        
    float speed;      
    float course;     
    float hdop;       
} gnss_data_t;

#ifndef EXCLUDE_FROM_DOCS
struct gnss_driver
{
    struct driver drv;
    int (*gnss_poll)(struct device *, gnss_data_t *data);
    int (*gnss_epo_update)(struct device *,
                           const char *http_host,
                           const char *file_path,
                           uint8_t load_days,
                           uint8_t threshold_days);
    unsigned int (*gnss_epo_enddate)(struct device *);
};
#endif

CW_DRIVER_FUNC
gnss_poll (int hdev, gnss_data_t *data)
CW_DRIVER_CALL(gnss, poll, hdev, data);

CW_DRIVER_FUNC
gnss_epo_update (int hdev,
                 const char *http_host,
                 const char *file_path,
                 uint8_t load_days,
                 uint8_t threshold_days)
CW_DRIVER_CALL(gnss, epo_update, hdev, http_host, file_path, load_days, threshold_days);

CW_DRIVER_FUNC
gnss_epo_enddate (int hdev)
CW_DRIVER_CALL_VOID(gnss, epo_enddate, hdev);


#if defined (__cplusplus)
}
#endif

#endif //_COLDWAVEOS_GNSS_H