mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-04 12:24:11 +01:00
89 lines
3.6 KiB
C
89 lines
3.6 KiB
C
|
/**
|
||
|
******************************************************************************
|
||
|
*
|
||
|
* @file homelocation.h
|
||
|
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||
|
* @brief Implementation of the HomeLocation object. This file has been
|
||
|
* automatically generated by the UAVObjectGenerator.
|
||
|
*
|
||
|
* @note Object definition file: homelocation.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 HOMELOCATION_H
|
||
|
#define HOMELOCATION_H
|
||
|
|
||
|
// Object constants
|
||
|
#define HOMELOCATION_OBJID 933172238U
|
||
|
#define HOMELOCATION_NAME "HomeLocation"
|
||
|
#define HOMELOCATION_METANAME "HomeLocationMeta"
|
||
|
#define HOMELOCATION_ISSINGLEINST 1
|
||
|
#define HOMELOCATION_ISSETTINGS 0
|
||
|
#define HOMELOCATION_NUMBYTES sizeof(HomeLocationData)
|
||
|
|
||
|
// Object access macros
|
||
|
#define HomeLocationGet(dataOut) UAVObjGetData(HomeLocationHandle(), dataOut)
|
||
|
#define HomeLocationSet(dataIn) UAVObjSetData(HomeLocationHandle(), dataIn)
|
||
|
#define HomeLocationInstGet(instId, dataOut) UAVObjGetInstanceData(HomeLocationHandle(), instId, dataOut)
|
||
|
#define HomeLocationInstSet(instId, dataIn) UAVObjSetInstanceData(HomeLocationHandle(), instId, dataIn)
|
||
|
#define HomeLocationConnectQueue(queue) UAVObjConnectQueue(HomeLocationHandle(), queue, EV_MASK_ALL_UPDATES)
|
||
|
#define HomeLocationConnectCallback(cb) UAVObjConnectCallback(HomeLocationHandle(), cb, EV_MASK_ALL_UPDATES)
|
||
|
#define HomeLocationCreateInstance() UAVObjCreateInstance(HomeLocationHandle())
|
||
|
#define HomeLocationRequestUpdate() UAVObjRequestUpdate(HomeLocationHandle())
|
||
|
#define HomeLocationRequestInstUpdate(instId) UAVObjRequestInstanceUpdate(HomeLocationHandle(), instId)
|
||
|
#define HomeLocationUpdated() UAVObjUpdated(HomeLocationHandle())
|
||
|
#define HomeLocationInstUpdated(instId) UAVObjUpdated(HomeLocationHandle(), instId)
|
||
|
#define HomeLocationGetMetadata(dataOut) UAVObjGetMetadata(HomeLocationHandle(), dataOut)
|
||
|
#define HomeLocationSetMetadata(dataIn) UAVObjSetMetadata(HomeLocationHandle(), dataIn)
|
||
|
|
||
|
// Object data
|
||
|
typedef struct {
|
||
|
int32_t Latitude;
|
||
|
int32_t Longitude;
|
||
|
float Altitude;
|
||
|
float ECEF[3];
|
||
|
float RNE[9];
|
||
|
float Be[3];
|
||
|
|
||
|
} __attribute__((packed)) HomeLocationData;
|
||
|
|
||
|
// Field information
|
||
|
// Field Latitude information
|
||
|
// Field Longitude information
|
||
|
// Field Altitude information
|
||
|
// Field ECEF information
|
||
|
/* Number of elements for field ECEF */
|
||
|
#define HOMELOCATION_ECEF_NUMELEM 3
|
||
|
// Field RNE information
|
||
|
/* Number of elements for field RNE */
|
||
|
#define HOMELOCATION_RNE_NUMELEM 9
|
||
|
// Field Be information
|
||
|
/* Number of elements for field Be */
|
||
|
#define HOMELOCATION_BE_NUMELEM 3
|
||
|
|
||
|
|
||
|
// Generic interface functions
|
||
|
int32_t HomeLocationInitialize();
|
||
|
UAVObjHandle HomeLocationHandle();
|
||
|
|
||
|
#endif // HOMELOCATION_H
|