Teseo Location demo for GPSProvider using ST GNSS driver.

Dependencies:   GPS_Provider X_NUCLEO_GNSS1A1

Getting Started with X-NUCLEO-GNSS1A1

This example demonstrates how to use the X-NUCLEO-GNSS1A1 component with one of the STM32 Nucleo-64 platforms and how real time GNSS data received by the Teseo-LIV3F device can be displayed through a serial connection and a serial terminal on a PC. Furthermore the user can run commands enabling three advanced features:

  • Geofencing
  • Odometer
  • Data Logging

Setup

/media/uploads/apalmieri/nucleo-x-nucleo.jpg

Once the antenna has been connected to the SMA female connector of the X-NUCLEO-GNSS1A1 plugged on top of the STM32 Nucleo, a serial connection should be set up between the STM32 Nucleo and the PC with the following parameters:

  • baud rate: 115200
  • data: 8 bit
  • parity: none
  • stop: 1bit
  • flow control: none
  • New-line (Tx/Rx): CR

Serial connection parameters

/media/uploads/apalmieri/serial_setup.png /media/uploads/apalmieri/serial_setup1.png

The user can select among different options to:

  • get in a human readable format information related to the acquired GNSS position (or the satellites in view, the active satellites, and so on)
  • enable feature (geofencing, odometer, data logging)
  • configure a geofence circle
  • require geofence status
  • start/stop feature (odometer, data logging)

Application menu

/media/uploads/apalmieri/teseo_app.png

Committer:
apalmieri
Date:
Thu Jan 14 09:33:08 2021 +0000
Revision:
4:b67349d44157
Parent:
0:7b0a5a01caec
Get TeseoLocation program aligned with mbed-os-6.6.0

Who changed what in which revision?

UserRevisionLine numberNew contents of line
apalmieri 0:7b0a5a01caec 1 /**
apalmieri 0:7b0a5a01caec 2 ******************************************************************************
apalmieri 0:7b0a5a01caec 3 * @file GPSGeofence.h
apalmieri 0:7b0a5a01caec 4 * @author AST/CL
apalmieri 0:7b0a5a01caec 5 * @version V1.1.0
apalmieri 0:7b0a5a01caec 6 * @date Oct, 2017
apalmieri 0:7b0a5a01caec 7 * @brief .
apalmieri 0:7b0a5a01caec 8 ******************************************************************************
apalmieri 0:7b0a5a01caec 9 * @attention
apalmieri 0:7b0a5a01caec 10 *
apalmieri 0:7b0a5a01caec 11 * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
apalmieri 0:7b0a5a01caec 12 *
apalmieri 0:7b0a5a01caec 13 * Redistribution and use in source and binary forms, with or without modification,
apalmieri 0:7b0a5a01caec 14 * are permitted provided that the following conditions are met:
apalmieri 0:7b0a5a01caec 15 * 1. Redistributions of source code must retain the above copyright notice,
apalmieri 0:7b0a5a01caec 16 * this list of conditions and the following disclaimer.
apalmieri 0:7b0a5a01caec 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
apalmieri 0:7b0a5a01caec 18 * this list of conditions and the following disclaimer in the documentation
apalmieri 0:7b0a5a01caec 19 * and/or other materials provided with the distribution.
apalmieri 0:7b0a5a01caec 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
apalmieri 0:7b0a5a01caec 21 * may be used to endorse or promote products derived from this software
apalmieri 0:7b0a5a01caec 22 * without specific prior written permission.
apalmieri 0:7b0a5a01caec 23 *
apalmieri 0:7b0a5a01caec 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
apalmieri 0:7b0a5a01caec 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
apalmieri 0:7b0a5a01caec 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
apalmieri 0:7b0a5a01caec 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
apalmieri 0:7b0a5a01caec 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
apalmieri 0:7b0a5a01caec 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
apalmieri 0:7b0a5a01caec 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
apalmieri 0:7b0a5a01caec 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
apalmieri 0:7b0a5a01caec 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
apalmieri 0:7b0a5a01caec 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
apalmieri 0:7b0a5a01caec 34 *
apalmieri 0:7b0a5a01caec 35 ******************************************************************************
apalmieri 0:7b0a5a01caec 36 */
apalmieri 0:7b0a5a01caec 37
apalmieri 0:7b0a5a01caec 38 #ifndef __GPS_GEOFENCE_CFG_DATA_H__
apalmieri 0:7b0a5a01caec 39 #define __GPS_GEOFENCE_CFG_DATA_H__
apalmieri 0:7b0a5a01caec 40
apalmieri 0:7b0a5a01caec 41 typedef enum GeofenceId {
apalmieri 0:7b0a5a01caec 42 LecceId,
apalmieri 0:7b0a5a01caec 43 CataniaId
apalmieri 0:7b0a5a01caec 44 } eGeofenceId;
apalmieri 0:7b0a5a01caec 45
apalmieri 0:7b0a5a01caec 46 GPSGeofence::GeofenceCircle_t STLecce = {
apalmieri 0:7b0a5a01caec 47 .id = 5,
apalmieri 0:7b0a5a01caec 48 .enabled = 1,
apalmieri 0:7b0a5a01caec 49 .tolerance = 1,
apalmieri 0:7b0a5a01caec 50 .lat = 40.336055,
apalmieri 0:7b0a5a01caec 51 .lon = 18.120611,
apalmieri 0:7b0a5a01caec 52 .radius = 200
apalmieri 0:7b0a5a01caec 53 };
apalmieri 0:7b0a5a01caec 54
apalmieri 0:7b0a5a01caec 55 GPSGeofence::GeofenceCircle_t Catania = {
apalmieri 0:7b0a5a01caec 56 .id = 6,
apalmieri 0:7b0a5a01caec 57 .enabled = 1,
apalmieri 0:7b0a5a01caec 58 .tolerance = 1,
apalmieri 0:7b0a5a01caec 59 .lat = 37.4908266,
apalmieri 0:7b0a5a01caec 60 .lon = 15.0073063,
apalmieri 0:7b0a5a01caec 61 .radius = 200
apalmieri 0:7b0a5a01caec 62 };
apalmieri 0:7b0a5a01caec 63
apalmieri 0:7b0a5a01caec 64 #endif /* __GPS_GEOFENCE_CFG_DATA_H__ */