mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
This patch breaks backward compatibility with AHRS solidly.
Move the configuration files for INS from AHRS* to INS*. Strip out unused fields in settings and merge calibration and settings since settings has basically no information.
This commit is contained in:
parent
37878ed4e8
commit
612d3336b4
@ -74,12 +74,12 @@ void reset_values();
|
||||
void calibrate_sensors(void);
|
||||
|
||||
/* Communication functions */
|
||||
void send_calibration(void);
|
||||
//void send_calibration(void);
|
||||
void send_attitude(void);
|
||||
void send_velocity(void);
|
||||
void send_position(void);
|
||||
void homelocation_callback(AhrsObjHandle obj);
|
||||
void calibration_callback(AhrsObjHandle obj);
|
||||
//void calibration_callback(AhrsObjHandle obj);
|
||||
void settings_callback(AhrsObjHandle obj);
|
||||
void affine_rotate(float scale[3][4], float rotation[3]);
|
||||
void calibration(float result[3], float scale[3][4], float arg[3]);
|
||||
@ -129,7 +129,7 @@ typedef enum { INS_IDLE, INS_DATA_READY, INS_PROCESSING } states;
|
||||
*/
|
||||
|
||||
uint32_t total_conversion_blocks;
|
||||
|
||||
static bool bias_corrected_raw;
|
||||
|
||||
float pressure, altitude;
|
||||
|
||||
@ -142,7 +142,7 @@ int main()
|
||||
{
|
||||
gps_data.quality = -1;
|
||||
static int8_t last_ahrs_algorithm;
|
||||
ahrs_algorithm = AHRSSETTINGS_ALGORITHM_SIMPLE;
|
||||
ahrs_algorithm = INSSETTINGS_ALGORITHM_SIMPLE;
|
||||
|
||||
reset_values();
|
||||
|
||||
@ -191,18 +191,15 @@ int main()
|
||||
|
||||
/* we didn't connect the callbacks before because we have to wait
|
||||
for all data to be up to date before doing anything*/
|
||||
AHRSCalibrationConnectCallback(calibration_callback);
|
||||
AHRSSettingsConnectCallback(settings_callback);
|
||||
InsSettingsConnectCallback(settings_callback);
|
||||
HomeLocationConnectCallback(homelocation_callback);
|
||||
FirmwareIAPObjConnectCallback(firmwareiapobj_callback);
|
||||
|
||||
calibration_callback(AHRSCalibrationHandle()); //force an update
|
||||
|
||||
/******************* Main EKF loop ****************************/
|
||||
while(1) {
|
||||
AhrsPoll();
|
||||
AhrsStatusData status;
|
||||
AhrsStatusGet(&status);
|
||||
InsStatusData status;
|
||||
InsStatusGet(&status);
|
||||
|
||||
// Alive signal
|
||||
if ((total_conversion_blocks++ % 100) == 0)
|
||||
@ -236,20 +233,20 @@ int main()
|
||||
time_val2 = PIOS_DELAY_GetRaw();
|
||||
|
||||
switch(ahrs_algorithm) {
|
||||
case AHRSSETTINGS_ALGORITHM_SIMPLE:
|
||||
case INSSETTINGS_ALGORITHM_SIMPLE:
|
||||
simple_update();
|
||||
break;
|
||||
case AHRSSETTINGS_ALGORITHM_INSGPS_OUTDOOR:
|
||||
case INSSETTINGS_ALGORITHM_INSGPS_OUTDOOR:
|
||||
ins_outdoor_update();
|
||||
break;
|
||||
case AHRSSETTINGS_ALGORITHM_INSGPS_INDOOR:
|
||||
case AHRSSETTINGS_ALGORITHM_INSGPS_INDOOR_NOMAG:
|
||||
case INSSETTINGS_ALGORITHM_INSGPS_INDOOR:
|
||||
case INSSETTINGS_ALGORITHM_INSGPS_INDOOR_NOMAG:
|
||||
ins_indoor_update();
|
||||
break;
|
||||
}
|
||||
|
||||
status.RunningTimePerCycle = PIOS_DELAY_DiffuS(time_val2);
|
||||
AhrsStatusSet(&status);
|
||||
InsStatusSet(&status);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -401,9 +398,9 @@ void get_accel_gyro_data()
|
||||
raw.gyros[1] = gyro_data.filtered.y * RAD_TO_DEG;
|
||||
raw.gyros[2] = gyro_data.filtered.z * RAD_TO_DEG;
|
||||
|
||||
AHRSSettingsData settings;
|
||||
AHRSSettingsGet(&settings);
|
||||
if (settings.BiasCorrectedRaw == AHRSSETTINGS_BIASCORRECTEDRAW_TRUE)
|
||||
InsSettingsData settings;
|
||||
InsSettingsGet(&settings);
|
||||
if (bias_corrected_raw)
|
||||
{
|
||||
raw.gyros[0] -= Nav.gyro_bias[0] * RAD_TO_DEG;
|
||||
raw.gyros[1] -= Nav.gyro_bias[1] * RAD_TO_DEG;
|
||||
@ -617,26 +614,22 @@ void reset_values()
|
||||
mag_data.calibration.variance[1] = 50;
|
||||
mag_data.calibration.variance[2] = 50;
|
||||
|
||||
ahrs_algorithm = AHRSSETTINGS_ALGORITHM_SIMPLE;
|
||||
ahrs_algorithm = INSSETTINGS_ALGORITHM_NONE;
|
||||
}
|
||||
|
||||
void send_attitude(void)
|
||||
{
|
||||
AttitudeActualData attitude;
|
||||
AHRSSettingsData settings;
|
||||
AHRSSettingsGet(&settings);
|
||||
|
||||
AttitudeActualGet(&attitude);
|
||||
attitude.q1 = attitude_data.quaternion.q1;
|
||||
attitude.q2 = attitude_data.quaternion.q2;
|
||||
attitude.q3 = attitude_data.quaternion.q3;
|
||||
attitude.q4 = attitude_data.quaternion.q4;
|
||||
float rpy[3];
|
||||
Quaternion2RPY(&attitude_data.quaternion.q1, rpy);
|
||||
attitude.Roll = rpy[0] + settings.RollBias;
|
||||
attitude.Pitch = rpy[1] + settings.PitchBias;
|
||||
attitude.Yaw = rpy[2] + settings.YawBias;
|
||||
if(attitude.Yaw > 360)
|
||||
attitude.Yaw -= 360;
|
||||
attitude.Roll = rpy[0];
|
||||
attitude.Pitch = rpy[1];
|
||||
attitude.Yaw = rpy[2];
|
||||
AttitudeActualSet(&attitude);
|
||||
}
|
||||
|
||||
@ -666,6 +659,7 @@ void send_position(void)
|
||||
PositionActualSet(&positionActual);
|
||||
}
|
||||
|
||||
/*
|
||||
void send_calibration(void)
|
||||
{
|
||||
AHRSCalibrationData cal;
|
||||
@ -680,12 +674,14 @@ void send_calibration(void)
|
||||
cal.measure_var = AHRSCALIBRATION_MEASURE_VAR_SET;
|
||||
AHRSCalibrationSet(&cal);
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief INS calibration callback
|
||||
*
|
||||
* Called when the OP board sets the calibration
|
||||
*/
|
||||
/*
|
||||
void calibration_callback(AhrsObjHandle obj)
|
||||
{
|
||||
AHRSCalibrationData cal;
|
||||
@ -732,13 +728,15 @@ void calibration_callback(AhrsObjHandle obj)
|
||||
INSSetPosVelVar(cal.pos_var, cal.vel_var);
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
void settings_callback(AhrsObjHandle obj)
|
||||
{
|
||||
AHRSSettingsData settings;
|
||||
AHRSSettingsGet(&settings);
|
||||
InsSettingsData settings;
|
||||
InsSettingsGet(&settings);
|
||||
|
||||
ahrs_algorithm = settings.Algorithm;
|
||||
bias_corrected_raw = settings.BiasCorrectedRaw == INSSETTINGS_BIASCORRECTEDRAW_TRUE;
|
||||
}
|
||||
|
||||
void homelocation_callback(AhrsObjHandle obj)
|
||||
|
@ -211,7 +211,7 @@ void ins_indoor_update()
|
||||
else
|
||||
sensors = HORIZ_SENSORS | VERT_SENSORS;
|
||||
|
||||
if(mag_data.updated && (ahrs_algorithm == AHRSSETTINGS_ALGORITHM_INSGPS_INDOOR)) {
|
||||
if(mag_data.updated && (ahrs_algorithm == INSSETTINGS_ALGORITHM_INSGPS_INDOOR)) {
|
||||
sensors |= MAG_SENSORS;
|
||||
mag_data.updated = false;
|
||||
}
|
||||
@ -247,10 +247,10 @@ void ins_init_algorithm()
|
||||
accels[1]=accel_data.filtered.y;
|
||||
accels[2]=accel_data.filtered.z;
|
||||
|
||||
using_mags = (ahrs_algorithm == AHRSSETTINGS_ALGORITHM_INSGPS_OUTDOOR) || (ahrs_algorithm == AHRSSETTINGS_ALGORITHM_INSGPS_INDOOR);
|
||||
using_mags = (ahrs_algorithm == INSSETTINGS_ALGORITHM_INSGPS_OUTDOOR) || (ahrs_algorithm == INSSETTINGS_ALGORITHM_INSGPS_INDOOR);
|
||||
using_mags &= (home.Be[0] != 0) || (home.Be[1] != 0) || (home.Be[2] != 0); /* only use mags when valid home location */
|
||||
|
||||
using_gps = (ahrs_algorithm == AHRSSETTINGS_ALGORITHM_INSGPS_OUTDOOR) && (gps_data.quality != 0);
|
||||
using_gps = (ahrs_algorithm == INSSETTINGS_ALGORITHM_INSGPS_OUTDOOR) && (gps_data.quality != 0);
|
||||
|
||||
/* Block till a data update */
|
||||
get_accel_gyro_data();
|
||||
|
@ -29,15 +29,14 @@
|
||||
|
||||
static AttitudeRawData AttitudeRaw;
|
||||
static AttitudeActualData AttitudeActual;
|
||||
static AHRSCalibrationData AHRSCalibration;
|
||||
static AhrsStatusData AhrsStatus;
|
||||
static BaroAltitudeData BaroAltitude;
|
||||
static GPSPositionData GPSPosition;
|
||||
static HomeLocationData HomeLocation;
|
||||
static InsStatusData InsStatus;
|
||||
static InsSettingsData InsSettings;
|
||||
static FirmwareIAPObjData FirmwareIAPObj;
|
||||
static PositionActualData PositionActual;
|
||||
static VelocityActualData VelocityActual;
|
||||
static HomeLocationData HomeLocation;
|
||||
static AHRSSettingsData AHRSSettings;
|
||||
static FirmwareIAPObjData FirmwareIAPObj;
|
||||
|
||||
AhrsSharedObject objectHandles[MAX_AHRS_OBJECTS];
|
||||
|
||||
@ -53,17 +52,16 @@ AhrsSharedObject objectHandles[MAX_AHRS_OBJECTS];
|
||||
|
||||
CREATEHANDLE(0, AttitudeRaw);
|
||||
CREATEHANDLE(1, AttitudeActual);
|
||||
CREATEHANDLE(2, AHRSCalibration);
|
||||
CREATEHANDLE(3, AhrsStatus);
|
||||
CREATEHANDLE(2, InsSettings);
|
||||
CREATEHANDLE(3, InsStatus);
|
||||
CREATEHANDLE(4, BaroAltitude);
|
||||
CREATEHANDLE(5, GPSPosition);
|
||||
CREATEHANDLE(6, PositionActual);
|
||||
CREATEHANDLE(7, VelocityActual);
|
||||
CREATEHANDLE(8, HomeLocation);
|
||||
CREATEHANDLE(9, AHRSSettings);
|
||||
CREATEHANDLE(10, FirmwareIAPObj);
|
||||
CREATEHANDLE(9, FirmwareIAPObj);
|
||||
|
||||
#if 11 != MAX_AHRS_OBJECTS //sanity check
|
||||
#if 10 != MAX_AHRS_OBJECTS //sanity check
|
||||
#error We did not create the correct number of xxxHandle() functions
|
||||
#endif
|
||||
|
||||
@ -96,14 +94,13 @@ void AhrsInitHandles(void)
|
||||
//the last has the lowest priority
|
||||
ADDHANDLE(idx++, AttitudeRaw);
|
||||
ADDHANDLE(idx++, AttitudeActual);
|
||||
ADDHANDLE(idx++, AHRSCalibration);
|
||||
ADDHANDLE(idx++, AhrsStatus);
|
||||
ADDHANDLE(idx++, InsSettings);
|
||||
ADDHANDLE(idx++, InsStatus);
|
||||
ADDHANDLE(idx++, BaroAltitude);
|
||||
ADDHANDLE(idx++, GPSPosition);
|
||||
ADDHANDLE(idx++, PositionActual);
|
||||
ADDHANDLE(idx++, VelocityActual);
|
||||
ADDHANDLE(idx++, HomeLocation);
|
||||
ADDHANDLE(idx++, AHRSSettings);
|
||||
ADDHANDLE(idx++, FirmwareIAPObj);
|
||||
if (idx != MAX_AHRS_OBJECTS) {
|
||||
PIOS_DEBUG_Assert(0);
|
||||
@ -112,11 +109,8 @@ void AhrsInitHandles(void)
|
||||
//When the AHRS writes to these the data does a round trip
|
||||
//AHRS->OP->AHRS due to these events
|
||||
#ifndef IN_AHRS
|
||||
AHRSSettingsConnectCallback(ObjectUpdatedCb);
|
||||
BaroAltitudeConnectCallback(ObjectUpdatedCb);
|
||||
GPSPositionConnectCallback(ObjectUpdatedCb);
|
||||
InsSettingsConnectCallback(ObjectUpdatedCb);
|
||||
HomeLocationConnectCallback(ObjectUpdatedCb);
|
||||
AHRSCalibrationConnectCallback(ObjectUpdatedCb);
|
||||
FirmwareIAPObjConnectCallback(ObjectUpdatedCb);
|
||||
#endif
|
||||
}
|
||||
|
@ -298,13 +298,11 @@ int32_t AhrsConnectCallBack(AhrsObjHandle obj, AhrsEventCallback cb)
|
||||
return (0);
|
||||
}
|
||||
|
||||
AhrsCommStatus AhrsGetStatus()
|
||||
void AhrsGetStatus(AhrsCommStatus * status)
|
||||
{
|
||||
AhrsCommStatus status;
|
||||
status.remote = rxPacket.status;
|
||||
status.local = txPacket.status;
|
||||
status.linkOk = linkOk;
|
||||
return (status);
|
||||
status->remote = rxPacket.status;
|
||||
status->local = txPacket.status;
|
||||
status->linkOk = linkOk;
|
||||
}
|
||||
|
||||
|
||||
|
@ -29,14 +29,13 @@
|
||||
|
||||
#include "attitudeactual.h"
|
||||
#include "attituderaw.h"
|
||||
#include "ahrsstatus.h"
|
||||
#include "baroaltitude.h"
|
||||
#include "gpsposition.h"
|
||||
#include "homelocation.h"
|
||||
#include "insstatus.h"
|
||||
#include "inssettings.h"
|
||||
#include "positionactual.h"
|
||||
#include "velocityactual.h"
|
||||
#include "homelocation.h"
|
||||
#include "ahrscalibration.h"
|
||||
#include "ahrssettings.h"
|
||||
#include "firmwareiapobj.h"
|
||||
|
||||
/** union that will fit any UAVObject.
|
||||
@ -45,20 +44,19 @@
|
||||
typedef union {
|
||||
AttitudeRawData AttitudeRaw;
|
||||
AttitudeActualData AttitudeActual;
|
||||
AHRSCalibrationData AHRSCalibration;
|
||||
AhrsStatusData AhrsStatus;
|
||||
InsStatusData AhrsStatus;
|
||||
BaroAltitudeData BaroAltitude;
|
||||
GPSPositionData GPSPosition;
|
||||
PositionActualData PositionActual;
|
||||
VelocityActualData VelocityActual;
|
||||
HomeLocationData HomeLocation;
|
||||
AHRSSettingsData AHRSSettings;
|
||||
InsSettingsData InsSettings;
|
||||
FirmwareIAPObjData FirmwareIAPObj;
|
||||
} __attribute__ ((packed)) AhrsSharedData;
|
||||
|
||||
/** The number of UAVObjects we will be dealing with.
|
||||
*/
|
||||
#define MAX_AHRS_OBJECTS 11
|
||||
#define MAX_AHRS_OBJECTS 10
|
||||
|
||||
/** Our own version of a UAVObject.
|
||||
*/
|
||||
|
@ -110,7 +110,7 @@ int32_t AhrsConnectCallBack(AhrsObjHandle obj, AhrsEventCallback cb);
|
||||
Returns: the status.
|
||||
Note: the remote status will only be valid if the link is up and running
|
||||
*/
|
||||
AhrsCommStatus AhrsGetStatus();
|
||||
void AhrsGetStatus(AhrsCommStatus * status);
|
||||
|
||||
#ifdef IN_AHRS //slave only
|
||||
/** Send the latest objects to the OP
|
||||
|
@ -52,11 +52,10 @@
|
||||
|
||||
#include "ahrs_comms.h"
|
||||
#include "ahrs_spi_comm.h"
|
||||
#include "ahrsstatus.h"
|
||||
#include "ahrscalibration.h"
|
||||
#include "insstatus.h"
|
||||
|
||||
// Private constants
|
||||
#define STACK_SIZE configMINIMAL_STACK_SIZE-128
|
||||
#define STACK_SIZE configMINIMAL_STACK_SIZE
|
||||
#define TASK_PRIORITY (tskIDLE_PRIORITY+4)
|
||||
|
||||
// Private types
|
||||
@ -87,9 +86,10 @@ int32_t AHRSCommsStart(void)
|
||||
*/
|
||||
int32_t AHRSCommsInitialize(void)
|
||||
{
|
||||
AhrsStatusInitialize();
|
||||
AHRSCalibrationInitialize();
|
||||
InsStatusInitialize();
|
||||
InsSettingsInitialize();
|
||||
AttitudeRawInitialize();
|
||||
AttitudeActualInitialize();
|
||||
VelocityActualInitialize();
|
||||
PositionActualInitialize();
|
||||
|
||||
@ -109,19 +109,17 @@ static void ahrscommsTask(void *parameters)
|
||||
// Main task loop
|
||||
while (1) {
|
||||
PIOS_WDG_UpdateFlag(PIOS_WDG_AHRS);
|
||||
|
||||
AHRSSettingsData settings;
|
||||
AHRSSettingsGet(&settings);
|
||||
AhrsCommStatus stat;
|
||||
|
||||
AhrsSendObjects();
|
||||
AhrsCommStatus stat = AhrsGetStatus();
|
||||
AhrsGetStatus(&stat);
|
||||
if (stat.linkOk) {
|
||||
AlarmsClear(SYSTEMALARMS_ALARM_AHRSCOMMS);
|
||||
} else {
|
||||
AlarmsSet(SYSTEMALARMS_ALARM_AHRSCOMMS, SYSTEMALARMS_ALARM_WARNING);
|
||||
}
|
||||
AhrsStatusData sData;
|
||||
AhrsStatusGet(&sData);
|
||||
InsStatusData sData;
|
||||
InsStatusGet(&sData);
|
||||
|
||||
sData.LinkRunning = stat.linkOk;
|
||||
sData.AhrsKickstarts = stat.remote.kickStarts;
|
||||
@ -132,9 +130,9 @@ static void ahrscommsTask(void *parameters)
|
||||
sData.OpRetries = stat.local.retries;
|
||||
sData.OpInvalidPackets = stat.local.invalidPacket;
|
||||
|
||||
AhrsStatusSet(&sData);
|
||||
InsStatusSet(&sData);
|
||||
/* Wait for the next update interval */
|
||||
vTaskDelayUntil(&lastSysTime, settings.UpdatePeriod / portTICK_RATE_MS);
|
||||
vTaskDelayUntil(&lastSysTime, 1 / portTICK_RATE_MS);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -28,9 +28,8 @@ UAVOBJSRCFILENAMES += accessorydesired
|
||||
UAVOBJSRCFILENAMES += actuatorcommand
|
||||
UAVOBJSRCFILENAMES += actuatordesired
|
||||
UAVOBJSRCFILENAMES += actuatorsettings
|
||||
UAVOBJSRCFILENAMES += ahrscalibration
|
||||
UAVOBJSRCFILENAMES += ahrssettings
|
||||
UAVOBJSRCFILENAMES += ahrsstatus
|
||||
UAVOBJSRCFILENAMES += inssettings
|
||||
UAVOBJSRCFILENAMES += insstatus
|
||||
UAVOBJSRCFILENAMES += attitudeactual
|
||||
UAVOBJSRCFILENAMES += attituderaw
|
||||
UAVOBJSRCFILENAMES += baroaltitude
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* This is the size of the stack for early init and for all FreeRTOS IRQs */
|
||||
_irq_stack_size = 0x400;
|
||||
_irq_stack_size = 0x800;
|
||||
|
||||
/* Check valid alignment for VTOR */
|
||||
ASSERT(ORIGIN(BL_FLASH) == ALIGN(ORIGIN(BL_FLASH), 0x80), "Start of memory region flash not aligned for startup vector table");
|
||||
|
@ -989,29 +989,6 @@
|
||||
</default>
|
||||
</ImportExportGadget>
|
||||
<LineardialGadget>
|
||||
<AHRS__PCT__20CPU>
|
||||
<configInfo>
|
||||
<locked>false</locked>
|
||||
<version>0.0.0</version>
|
||||
</configInfo>
|
||||
<data>
|
||||
<dFile>%%DATAPATH%%dials/default/lineardial-vertical.svg</dFile>
|
||||
<decimalPlaces>0</decimalPlaces>
|
||||
<factor>1</factor>
|
||||
<font>Andale Mono,12,-1,5,75,0,0,0,0,0</font>
|
||||
<greenMax>50</greenMax>
|
||||
<greenMin>0</greenMin>
|
||||
<maxValue>100</maxValue>
|
||||
<minValue>0</minValue>
|
||||
<redMax>100</redMax>
|
||||
<redMin>80</redMin>
|
||||
<sourceDataObject>AhrsStatus</sourceDataObject>
|
||||
<sourceObjectField>CPULoad</sourceObjectField>
|
||||
<useOpenGLFlag>false</useOpenGLFlag>
|
||||
<yellowMax>80</yellowMax>
|
||||
<yellowMin>50</yellowMin>
|
||||
</data>
|
||||
</AHRS__PCT__20CPU>
|
||||
<Accel__PCT__20Horizontal__PCT__20X>
|
||||
<configInfo>
|
||||
<locked>false</locked>
|
||||
|
@ -24,11 +24,10 @@ OTHER_FILES += UAVObjects.pluginspec
|
||||
|
||||
# Add in all of the synthetic/generated uavobject files
|
||||
HEADERS += $$UAVOBJECT_SYNTHETICS/accessorydesired.h \
|
||||
$$UAVOBJECT_SYNTHETICS/ahrsstatus.h \
|
||||
$$UAVOBJECT_SYNTHETICS/ahrscalibration.h \
|
||||
$$UAVOBJECT_SYNTHETICS/insstatus.h \
|
||||
$$UAVOBJECT_SYNTHETICS/baroaltitude.h \
|
||||
$$UAVOBJECT_SYNTHETICS/attitudeactual.h \
|
||||
$$UAVOBJECT_SYNTHETICS/ahrssettings.h \
|
||||
$$UAVOBJECT_SYNTHETICS/inssettings.h \
|
||||
$$UAVOBJECT_SYNTHETICS/gcstelemetrystats.h \
|
||||
$$UAVOBJECT_SYNTHETICS/attituderaw.h \
|
||||
$$UAVOBJECT_SYNTHETICS/camerastabsettings.h \
|
||||
@ -74,11 +73,10 @@ HEADERS += $$UAVOBJECT_SYNTHETICS/accessorydesired.h \
|
||||
$$UAVOBJECT_SYNTHETICS/cameradesired.h
|
||||
|
||||
SOURCES += $$UAVOBJECT_SYNTHETICS/accessorydesired.cpp \
|
||||
$$UAVOBJECT_SYNTHETICS/ahrsstatus.cpp \
|
||||
$$UAVOBJECT_SYNTHETICS/ahrscalibration.cpp \
|
||||
$$UAVOBJECT_SYNTHETICS/insstatus.cpp \
|
||||
$$UAVOBJECT_SYNTHETICS/baroaltitude.cpp \
|
||||
$$UAVOBJECT_SYNTHETICS/attitudeactual.cpp \
|
||||
$$UAVOBJECT_SYNTHETICS/ahrssettings.cpp \
|
||||
$$UAVOBJECT_SYNTHETICS/inssettings.cpp \
|
||||
$$UAVOBJECT_SYNTHETICS/gcstelemetrystats.cpp \
|
||||
$$UAVOBJECT_SYNTHETICS/attituderaw.cpp \
|
||||
$$UAVOBJECT_SYNTHETICS/camerastabsettings.cpp \
|
||||
|
@ -1,23 +0,0 @@
|
||||
<xml>
|
||||
<object name="AHRSCalibration" singleinstance="true" settings="true">
|
||||
<description>Contains the calibration settings for the @ref AHRSCommsModule</description>
|
||||
<field name="measure_var" units="" type="enum" elements="1" options="SET,MEASURE" defaultvalue="SET"/>
|
||||
<field name="accel_bias" units="m/s" type="float" elementnames="X,Y,Z" defaultvalue="-73.5,-73.5,73.5"/>
|
||||
<field name="accel_scale" units="(m/s)/lsb" type="float" elementnames="X,Y,Z" defaultvalue="0.0359,0.0359,0.0359"/>
|
||||
<field name="accel_ortho" units="scale" type="float" elementnames="XY,XZ,YZ" defaultvalue="0.0,0.0,0.0"/>
|
||||
<field name="accel_var" units="(m/s)^2" type="float" elementnames="X,Y,Z" defaultvalue="5e-4"/>
|
||||
<field name="gyro_bias" units="rad/s" type="float" elementnames="X,Y,Z" defaultvalue="28,-28,28"/>
|
||||
<field name="gyro_scale" units="(rad/s)/lsb" type="float" elementnames="X,Y,Z" defaultvalue="-0.017,0.017,-0.017"/>
|
||||
<field name="gyro_var" units="(rad/s)^2" type="float" elementnames="X,Y,Z" defaultvalue="1e-4"/>
|
||||
<field name="gyro_tempcompfactor" units="raw/raw" type="float" elementnames="X,Y,Z" defaultvalue="0"/>
|
||||
<field name="mag_bias" units="mGau" type="float" elementnames="X,Y,Z" defaultvalue="0"/>
|
||||
<field name="mag_scale" units="(mGau)/lsb" type="float" elementnames="X,Y,Z" defaultvalue="1"/>
|
||||
<field name="mag_var" units="mGau^2" type="float" elementnames="X,Y,Z" defaultvalue="50"/>
|
||||
<field name="vel_var" units="(m/s)^2" type="float" elements="1" defaultvalue="10"/>
|
||||
<field name="pos_var" units="m^2" type="float" elements="1" defaultvalue="0.04"/>
|
||||
<access gcs="readwrite" flight="readwrite"/>
|
||||
<telemetrygcs acked="true" updatemode="onchange" period="0"/>
|
||||
<telemetryflight acked="true" updatemode="onchange" period="0"/>
|
||||
<logging updatemode="never" period="0"/>
|
||||
</object>
|
||||
</xml>
|
@ -1,16 +0,0 @@
|
||||
<xml>
|
||||
<object name="AHRSSettings" singleinstance="true" settings="true">
|
||||
<description>Settings for the @ref AHRSCommsModule to control the algorithm and what is updated</description>
|
||||
<field name="Algorithm" units="" type="enum" elements="1" options="SIMPLE,INSGPS_INDOOR_NOMAG,INSGPS_INDOOR,INSGPS_OUTDOOR" defaultvalue="INSGPS_INDOOR_NOMAG"/>
|
||||
<field name="Downsampling" units="" type="uint8" elements="1" defaultvalue="20"/>
|
||||
<field name="UpdatePeriod" units="ms" type="uint8" elements="1" defaultvalue="1"/>
|
||||
<field name="BiasCorrectedRaw" units="" type="enum" elements="1" options="TRUE,FALSE" defaultvalue="TRUE"/>
|
||||
<field name="YawBias" units="" type="float" elements="1" defaultvalue="0"/>
|
||||
<field name="PitchBias" units="" type="float" elements="1" defaultvalue="0"/>
|
||||
<field name="RollBias" units="" type="float" elements="1" defaultvalue="0"/>
|
||||
<access gcs="readwrite" flight="readwrite"/>
|
||||
<telemetrygcs acked="true" updatemode="onchange" period="0"/>
|
||||
<telemetryflight acked="true" updatemode="onchange" period="0"/>
|
||||
<logging updatemode="never" period="0"/>
|
||||
</object>
|
||||
</xml>
|
25
shared/uavobjectdefinition/inssettings.xml
Normal file
25
shared/uavobjectdefinition/inssettings.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<xml>
|
||||
<object name="InsSettings" singleinstance="true" settings="true">
|
||||
<description>Settings for the INS to control the algorithm and what is updated</description>
|
||||
<field name="Algorithm" units="" type="enum" elements="1" options="NONE,SIMPLE,CALIBRATION,INSGPS_INDOOR_NOMAG,INSGPS_INDOOR,INSGPS_OUTDOOR" defaultvalue="INSGPS_INDOOR_NOMAG"/>
|
||||
<field name="BiasCorrectedRaw" units="" type="enum" elements="1" options="TRUE,FALSE" defaultvalue="TRUE"/>
|
||||
|
||||
<!-- Sensor noises -->
|
||||
<field name="accel_bias" units="m/s" type="float" elementnames="X,Y,Z" defaultvalue="0,0,0"/>
|
||||
<field name="accel_scale" units="gain" type="float" elementnames="X,Y,Z" defaultvalue="1,1,1"/>
|
||||
<field name="accel_var" units="(m/s)^2" type="float" elementnames="X,Y,Z" defaultvalue="5e-4"/>
|
||||
<field name="gyro_bias" units="deg/s" type="float" elementnames="X,Y,Z" defaultvalue="0,0,0"/>
|
||||
<field name="gyro_scale" units="gain" type="float" elementnames="X,Y,Z" defaultvalue="0,0,0"/>
|
||||
<field name="gyro_var" units="(deg/s)^2" type="float" elementnames="X,Y,Z" defaultvalue="1e-4"/>
|
||||
<field name="mag_bias" units="mGau" type="float" elementnames="X,Y,Z" defaultvalue="0,0,0"/>
|
||||
<field name="mag_scale" units="gain" type="float" elementnames="X,Y,Z" defaultvalue="1"/>
|
||||
<field name="mag_var" units="mGau^2" type="float" elementnames="X,Y,Z" defaultvalue="50"/>
|
||||
<field name="vel_var" units="(m/s)^2" type="float" elements="1" defaultvalue="10"/>
|
||||
<field name="pos_var" units="m^2" type="float" elements="1" defaultvalue="0.04"/>
|
||||
|
||||
<access gcs="readwrite" flight="readwrite"/>
|
||||
<telemetrygcs acked="true" updatemode="onchange" period="0"/>
|
||||
<telemetryflight acked="true" updatemode="onchange" period="0"/>
|
||||
<logging updatemode="never" period="0"/>
|
||||
</object>
|
||||
</xml>
|
@ -1,5 +1,5 @@
|
||||
<xml>
|
||||
<object name="AhrsStatus" singleinstance="true" settings="false">
|
||||
<object name="InsStatus" singleinstance="true" settings="false">
|
||||
<description>Status for the @ref AHRSCommsModule, including communication errors</description>
|
||||
<field name="SerialNumber" units="" type="uint8" elements="8"/>
|
||||
<field name="CPULoad" units="count" type="uint8" elements="1"/>
|
Loading…
Reference in New Issue
Block a user