Firmware SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
bc_sam_m8q

Driver for u-blox SAM-M8Q GPS/Galileo/Glonass navigation module. More...

Data Structures

struct  bc_sam_m8q_driver_t
 SAM-M8Q driver. More...
 
struct  bc_sam_m8q_time_t
 Time data structure. More...
 
struct  bc_sam_m8q_position_t
 Position data structure. More...
 
struct  bc_sam_m8q_altitude_t
 Altitude data structure. More...
 
struct  bc_sam_m8q_quality_t
 Quality data structure. More...
 
struct  bc_sam_m8q_accuracy_t
 Accuracy data structure. More...
 

Typedefs

typedef struct bc_sam_m8q_t bc_sam_m8q_t
 SAM-M8Q instance.
 

Enumerations

enum  bc_sam_m8q_event_t {
  BC_SAM_M8Q_EVENT_ERROR = 0,
  BC_SAM_M8Q_EVENT_START = 1,
  BC_SAM_M8Q_EVENT_UPDATE = 2,
  BC_SAM_M8Q_EVENT_STOP = 3
}
 Callback events. More...
 

Functions

void bc_sam_m8q_init (bc_sam_m8q_t *self, bc_i2c_channel_t channel, uint8_t i2c_address, const bc_sam_m8q_driver_t *driver)
 Initialize SAM-M8Q module driver. More...
 
void bc_sam_m8q_set_event_handler (bc_sam_m8q_t *self, bc_sam_m8q_event_handler_t event_handler, void *event_param)
 Set callback function. More...
 
void bc_sam_m8q_start (bc_sam_m8q_t *self)
 Start navigation module. More...
 
void bc_sam_m8q_stop (bc_sam_m8q_t *self)
 Stop navigation module. More...
 
void bc_sam_m8q_invalidate (bc_sam_m8q_t *self)
 Invalidate navigation data.
 
bool bc_sam_m8q_get_time (bc_sam_m8q_t *self, bc_sam_m8q_time_t *time)
 Get time. More...
 
bool bc_sam_m8q_get_position (bc_sam_m8q_t *self, bc_sam_m8q_position_t *position)
 Get position. More...
 
bool bc_sam_m8q_get_altitude (bc_sam_m8q_t *self, bc_sam_m8q_altitude_t *altitude)
 Get altitude. More...
 
bool bc_sam_m8q_get_quality (bc_sam_m8q_t *self, bc_sam_m8q_quality_t *quality)
 Get quality. More...
 
bool bc_sam_m8q_get_accuracy (bc_sam_m8q_t *self, bc_sam_m8q_accuracy_t *accuracy)
 Get accuracy. More...
 

Variables

bool(* bc_sam_m8q_driver_t::on )(bc_sam_m8q_t *self)
 Callback for power on.
 
bool(* bc_sam_m8q_driver_t::off )(bc_sam_m8q_t *self)
 Callback for power off.
 
int bc_sam_m8q_time_t::year
 Year.
 
int bc_sam_m8q_time_t::month
 Month.
 
int bc_sam_m8q_time_t::day
 Day.
 
int bc_sam_m8q_time_t::hours
 Hours.
 
int bc_sam_m8q_time_t::minutes
 Minutes.
 
int bc_sam_m8q_time_t::seconds
 Seconds.
 
float bc_sam_m8q_position_t::latitude
 Latitude.
 
float bc_sam_m8q_position_t::longitude
 Longitude.
 
float bc_sam_m8q_altitude_t::altitude
 Altitude.
 
char bc_sam_m8q_altitude_t::units
 Units of altitude.
 
int bc_sam_m8q_quality_t::fix_quality
 Fix quality.
 
int bc_sam_m8q_quality_t::satellites_tracked
 Number of satellites tracked.
 
float bc_sam_m8q_accuracy_t::horizontal
 Horizontal accuracy estimate.
 
float bc_sam_m8q_accuracy_t::vertical
 Vertical accuracy estimate.
 

Detailed Description

Driver for u-blox SAM-M8Q GPS/Galileo/Glonass navigation module.

Enumeration Type Documentation

Callback events.

Enumerator
BC_SAM_M8Q_EVENT_ERROR 

Error event.

BC_SAM_M8Q_EVENT_START 

Start event.

BC_SAM_M8Q_EVENT_UPDATE 

Update event.

BC_SAM_M8Q_EVENT_STOP 

Stop event.

Definition at line 13 of file bc_sam_m8q.h.

Function Documentation

bool bc_sam_m8q_get_accuracy ( bc_sam_m8q_t self,
bc_sam_m8q_accuracy_t accuracy 
)

Get accuracy.

Parameters
[in]selfInstance
[out]accuracyAccuracy data structure
Returns
true On success
false On failure

Definition at line 124 of file bc_sam_m8q.c.

Referenced by bc_module_gps_get_accuracy().

Here is the caller graph for this function:

bool bc_sam_m8q_get_altitude ( bc_sam_m8q_t self,
bc_sam_m8q_altitude_t altitude 
)

Get altitude.

Parameters
[in]selfInstance
[out]altitudeAltitude data structure
Returns
true On success
false On failure

Definition at line 94 of file bc_sam_m8q.c.

Referenced by bc_module_gps_get_altitude().

Here is the caller graph for this function:

bool bc_sam_m8q_get_position ( bc_sam_m8q_t self,
bc_sam_m8q_position_t position 
)

Get position.

Parameters
[in]selfInstance
[out]positionPosition data structure
Returns
true On success
false On failure

Definition at line 79 of file bc_sam_m8q.c.

Referenced by bc_module_gps_get_position().

Here is the caller graph for this function:

bool bc_sam_m8q_get_quality ( bc_sam_m8q_t self,
bc_sam_m8q_quality_t quality 
)

Get quality.

Parameters
[in]selfInstance
[out]qualityQuality data structure
Returns
true On success
false On failure

Definition at line 109 of file bc_sam_m8q.c.

Referenced by bc_module_gps_get_quality().

Here is the caller graph for this function:

bool bc_sam_m8q_get_time ( bc_sam_m8q_t self,
bc_sam_m8q_time_t time 
)

Get time.

Parameters
[in]selfInstance
[out]timeTime data structure
Returns
true On success
false On failure

Definition at line 60 of file bc_sam_m8q.c.

Referenced by bc_module_gps_get_time().

Here is the caller graph for this function:

void bc_sam_m8q_init ( bc_sam_m8q_t self,
bc_i2c_channel_t  channel,
uint8_t  i2c_address,
const bc_sam_m8q_driver_t driver 
)

Initialize SAM-M8Q module driver.

Parameters
[in]selfInstance
[in]i2c_channelI2C channel
[in]i2c_addressI2C device address
[in]driverOptional driver (can be NULL)

Definition at line 13 of file bc_sam_m8q.c.

Referenced by bc_module_gps_init().

Here is the call graph for this function:

Here is the caller graph for this function:

void bc_sam_m8q_set_event_handler ( bc_sam_m8q_t self,
bc_sam_m8q_event_handler_t  event_handler,
void *  event_param 
)

Set callback function.

Parameters
[in]selfInstance
[in]event_handlerFunction address
[in]event_paramOptional event parameter (can be NULL)

Definition at line 26 of file bc_sam_m8q.c.

Referenced by bc_module_gps_init().

Here is the caller graph for this function:

void bc_sam_m8q_start ( bc_sam_m8q_t self)

Start navigation module.

Parameters
[in]selfInstance

Definition at line 32 of file bc_sam_m8q.c.

Referenced by bc_module_gps_start().

Here is the call graph for this function:

Here is the caller graph for this function:

void bc_sam_m8q_stop ( bc_sam_m8q_t self)

Stop navigation module.

Parameters
[in]selfInstance

Definition at line 43 of file bc_sam_m8q.c.

Referenced by bc_module_gps_stop().

Here is the call graph for this function:

Here is the caller graph for this function: