Edgehog Device SDK ESP32 v0.8.1
ESP32 device SDK for the Edgehog platform
Loading...
Searching...
No Matches
edgehog_geolocation.h
1/*
2 * This file is part of Edgehog.
3 *
4 * Copyright 2022 SECO Mind Srl
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 * SPDX-License-Identifier: Apache-2.0
19 */
20
21#ifndef EDGEHOG_GEOLOCATION_H
22#define EDGEHOG_GEOLOCATION_H
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28#include "edgehog_device.h"
29
33typedef struct
34{
35 const char *id; /* GPS receiver identifier */
36 double longitude; /* Sampled longitude value. */
37 double latitude; /* Sampled latitude value. */
38 double accuracy; /* Sampled accuracy of the latitude and longitude properties. */
39 double altitude; /* Sampled altitude value. */
40 double altitude_accuracy; /* Sampled accuracy of the altitude property. */
41 double heading; /*Sampled value of the direction towards which the device is facing. */
42 double speed; /*Sampled value representing the velocity of the device.*/
44
52void edgehog_geolocation_publish(edgehog_device_handle_t edgehog_device);
53
64void edgehog_geolocation_update(
65 edgehog_device_handle_t edgehog_device, edgehog_geolocation_data_t *update);
66#endif // EDGEHOG_GEOLOCATION_H
Edgehog device SDK API.
Edgehog geolocation Data struct.
Definition edgehog_geolocation.h:34