mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
c22804e90a
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@684 ebee16cc-31ac-478f-84a7-5cbb03baadba
93 lines
3.5 KiB
C
93 lines
3.5 KiB
C
/**
|
|
******************************************************************************
|
|
*
|
|
* @file gpsobject.h
|
|
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
|
* @brief Implementation of the GpsObject object. This file has been
|
|
* automatically generated by the UAVObjectGenerator.
|
|
*
|
|
* @note Object definition file: gpsobject.xml.
|
|
* This is an automatically generated file.
|
|
* DO NOT modify manually.
|
|
*
|
|
* @see The GNU Public License (GPL) Version 3
|
|
*
|
|
*****************************************************************************/
|
|
/*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
* for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
*/
|
|
|
|
#ifndef GPSOBJECT_H
|
|
#define GPSOBJECT_H
|
|
|
|
// Object constants
|
|
#define GPSOBJECT_OBJID 3887395742U
|
|
#define GPSOBJECT_NAME "GpsObject"
|
|
#define GPSOBJECT_METANAME "GpsObjectMeta"
|
|
#define GPSOBJECT_ISSINGLEINST 1
|
|
#define GPSOBJECT_ISSETTINGS 0
|
|
#define GPSOBJECT_NUMBYTES sizeof(GpsObjectData)
|
|
|
|
// Object access macros
|
|
#define GpsObjectGet(dataOut) UAVObjGetData(GpsObjectHandle(), dataOut)
|
|
#define GpsObjectSet(dataIn) UAVObjSetData(GpsObjectHandle(), dataIn)
|
|
#define GpsObjectInstGet(instId, dataOut) UAVObjGetInstanceData(GpsObjectHandle(), instId, dataOut)
|
|
#define GpsObjectInstSet(instId, dataIn) UAVObjSetInstanceData(GpsObjectHandle(), instId, dataIn)
|
|
#define GpsObjectConnectQueue(queue) UAVObjConnectQueue(GpsObjectHandle(), queue, EV_MASK_ALL_UPDATES)
|
|
#define GpsObjectConnectCallback(cb) UAVObjConnectCallback(GpsObjectHandle(), cb, EV_MASK_ALL_UPDATES)
|
|
#define GpsObjectCreateInstance() UAVObjCreateInstance(GpsObjectHandle())
|
|
#define GpsObjectRequestUpdate() UAVObjRequestUpdate(GpsObjectHandle())
|
|
#define GpsObjectRequestInstUpdate(instId) UAVObjRequestInstanceUpdate(GpsObjectHandle(), instId)
|
|
#define GpsObjectUpdated() UAVObjUpdated(GpsObjectHandle())
|
|
#define GpsObjectInstUpdated(instId) UAVObjUpdated(GpsObjectHandle(), instId)
|
|
#define GpsObjectGetMetadata(dataOut) UAVObjGetMetadata(GpsObjectHandle(), dataOut)
|
|
#define GpsObjectSetMetadata(dataIn) UAVObjSetMetadata(GpsObjectHandle(), dataIn)
|
|
|
|
// Object data
|
|
typedef struct {
|
|
float Latitude;
|
|
float Longitude;
|
|
float Altitude;
|
|
float Heading;
|
|
float GroundSpeed;
|
|
int8_t Satellites;
|
|
uint16_t Updates;
|
|
uint16_t Failures;
|
|
float PDOP;
|
|
float HDOP;
|
|
float VDOP;
|
|
|
|
} __attribute__((packed)) GpsObjectData;
|
|
|
|
// Field information
|
|
// Field Latitude information
|
|
// Field Longitude information
|
|
// Field Altitude information
|
|
// Field Heading information
|
|
// Field GroundSpeed information
|
|
// Field Satellites information
|
|
// Field Updates information
|
|
// Field Failures information
|
|
// Field PDOP information
|
|
// Field HDOP information
|
|
// Field VDOP information
|
|
|
|
|
|
// Generic interface functions
|
|
int32_t GpsObjectInitialize();
|
|
UAVObjHandle GpsObjectHandle();
|
|
|
|
#endif // GPSOBJECT_H
|