/** ****************************************************************************** * @addtogroup UAVObjects OpenPilot UAVObjects * @{ * @addtogroup HomeLocation HomeLocation * @brief HomeLocation setting which contains the constants to tranlate from longitutde and latitude to NED reference frame. Automatically set by @ref GPSModule after acquiring a 3D lock. Used by @ref AHRSCommsModule. * * Autogenerated files and functions for HomeLocation Object * @{ * * @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 3590360786U #define HOMELOCATION_NAME "HomeLocation" #define HOMELOCATION_METANAME "HomeLocationMeta" #define HOMELOCATION_ISSINGLEINST 1 #define HOMELOCATION_ISSETTINGS 1 #define HOMELOCATION_NUMBYTES sizeof(HomeLocationData) // Object access macros /** * @function HomeLocationGet(dataOut) * @brief Populate a HomeLocationData object * @param[out] dataOut */ #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) #define HomeLocationReadOnly(dataIn) UAVObjReadOnly(HomeLocationHandle()) // Object data typedef struct { uint8_t Set; int32_t Latitude; int32_t Longitude; float Altitude; int32_t ECEF[3]; float RNE[9]; float Be[3]; } __attribute__((packed)) HomeLocationData; // Field information // Field Set information /* Enumeration options for field Set */ typedef enum { HOMELOCATION_SET_FALSE=0, HOMELOCATION_SET_TRUE=1 } HomeLocationSetOptions; // 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 /** * @} * @} */