1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-02 10:24:11 +01:00
LibrePilot/flight/OpenPilot/UAVObjects/inc/homelocation.h
peabody124 0c30101f54 AHRS: Made an object setting to allow the downsampling rate to be changed on the
fly (EKF rate up to a limit).  Also, now the algorithm selects if you are
indoor or outdoor as well as if you use a mag indoor (if you do set the z
variance higher than it calibrates to).

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1841 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-02 03:10:01 +00:00

112 lines
4.4 KiB
C

/**
******************************************************************************
* @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
/**
* @}
* @}
*/