1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-11 19:24:10 +01:00
LibrePilot/flight/OpenPilot/UAVObjects/inc/ahrssettings.h
peabody124 6f1e7b4e41 AHRS: Add a configuration to export the sensor data either with or without INS
bias correction.  This is useful for stabilization to get rid of the gyro bias.
Making it an option is important for calibration.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2189 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-04 17:34:25 +00:00

108 lines
4.4 KiB
C

/**
******************************************************************************
* @addtogroup UAVObjects OpenPilot UAVObjects
* @{
* @addtogroup AHRSSettings AHRSSettings
* @brief Settings for the @ref AHRSCommsModule to control the algorithm and what is updated
*
* Autogenerated files and functions for AHRSSettings Object
* @{
*
* @file ahrssettings.h
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* @brief Implementation of the AHRSSettings object. This file has been
* automatically generated by the UAVObjectGenerator.
*
* @note Object definition file: ahrssettings.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 AHRSSETTINGS_H
#define AHRSSETTINGS_H
// Object constants
#define AHRSSETTINGS_OBJID 3741078856U
#define AHRSSETTINGS_NAME "AHRSSettings"
#define AHRSSETTINGS_METANAME "AHRSSettingsMeta"
#define AHRSSETTINGS_ISSINGLEINST 1
#define AHRSSETTINGS_ISSETTINGS 1
#define AHRSSETTINGS_NUMBYTES sizeof(AHRSSettingsData)
// Object access macros
/**
* @function AHRSSettingsGet(dataOut)
* @brief Populate a AHRSSettingsData object
* @param[out] dataOut
*/
#define AHRSSettingsGet(dataOut) UAVObjGetData(AHRSSettingsHandle(), dataOut)
#define AHRSSettingsSet(dataIn) UAVObjSetData(AHRSSettingsHandle(), dataIn)
#define AHRSSettingsInstGet(instId, dataOut) UAVObjGetInstanceData(AHRSSettingsHandle(), instId, dataOut)
#define AHRSSettingsInstSet(instId, dataIn) UAVObjSetInstanceData(AHRSSettingsHandle(), instId, dataIn)
#define AHRSSettingsConnectQueue(queue) UAVObjConnectQueue(AHRSSettingsHandle(), queue, EV_MASK_ALL_UPDATES)
#define AHRSSettingsConnectCallback(cb) UAVObjConnectCallback(AHRSSettingsHandle(), cb, EV_MASK_ALL_UPDATES)
#define AHRSSettingsCreateInstance() UAVObjCreateInstance(AHRSSettingsHandle())
#define AHRSSettingsRequestUpdate() UAVObjRequestUpdate(AHRSSettingsHandle())
#define AHRSSettingsRequestInstUpdate(instId) UAVObjRequestInstanceUpdate(AHRSSettingsHandle(), instId)
#define AHRSSettingsUpdated() UAVObjUpdated(AHRSSettingsHandle())
#define AHRSSettingsInstUpdated(instId) UAVObjUpdated(AHRSSettingsHandle(), instId)
#define AHRSSettingsGetMetadata(dataOut) UAVObjGetMetadata(AHRSSettingsHandle(), dataOut)
#define AHRSSettingsSetMetadata(dataIn) UAVObjSetMetadata(AHRSSettingsHandle(), dataIn)
#define AHRSSettingsReadOnly(dataIn) UAVObjReadOnly(AHRSSettingsHandle())
// Object data
typedef struct {
uint8_t Algorithm;
uint8_t Downsampling;
uint8_t UpdatePeriod;
uint8_t BiasCorrectedRaw;
float YawBias;
float PitchBias;
float RollBias;
} __attribute__((packed)) AHRSSettingsData;
// Field information
// Field Algorithm information
/* Enumeration options for field Algorithm */
typedef enum { AHRSSETTINGS_ALGORITHM_SIMPLE=0, AHRSSETTINGS_ALGORITHM_INSGPS_INDOOR_NOMAG=1, AHRSSETTINGS_ALGORITHM_INSGPS_INDOOR=2, AHRSSETTINGS_ALGORITHM_INSGPS_OUTDOOR=3 } AHRSSettingsAlgorithmOptions;
// Field Downsampling information
// Field UpdatePeriod information
// Field BiasCorrectedRaw information
/* Enumeration options for field BiasCorrectedRaw */
typedef enum { AHRSSETTINGS_BIASCORRECTEDRAW_TRUE=0, AHRSSETTINGS_BIASCORRECTEDRAW_FALSE=1 } AHRSSettingsBiasCorrectedRawOptions;
// Field YawBias information
// Field PitchBias information
// Field RollBias information
// Generic interface functions
int32_t AHRSSettingsInitialize();
UAVObjHandle AHRSSettingsHandle();
#endif // AHRSSETTINGS_H
/**
* @}
* @}
*/