1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

removed surplus NEDposition uavobject

This commit is contained in:
Corvus Corax 2012-11-06 10:13:09 +01:00
parent 3c8ffa9773
commit 5981d9acd6
8 changed files with 20 additions and 41 deletions

View File

@ -63,7 +63,6 @@
#include "gyrosbias.h"
#include "homelocation.h"
#include "magnetometer.h"
#include "nedposition.h"
#include "positionactual.h"
#include "revocalibration.h"
#include "revosettings.h"
@ -128,7 +127,6 @@ int32_t AttitudeInitialize(void)
{
AttitudeActualInitialize();
AttitudeSettingsInitialize();
NEDPositionInitialize();
PositionActualInitialize();
VelocityActualInitialize();
RevoSettingsInitialize();
@ -455,13 +453,6 @@ static int32_t updateAttitudeComplementary(bool first_run)
GPSPositionGet(&gpsPosition);
getNED(&gpsPosition, NED);
NEDPositionData nedPosition;
NEDPositionGet(&nedPosition);
nedPosition.North = NED[0];
nedPosition.East = NED[1];
nedPosition.Down = NED[2];
NEDPositionSet(&nedPosition);
PositionActualData positionActual;
PositionActualGet(&positionActual);
positionActual.North = NED[0];
@ -776,14 +767,6 @@ static int32_t updateAttitudeINSGPS(bool first_run, bool outdoor_mode)
(1.0f - BARO_OFFSET_LOWPASS_ALPHA )
* ( -NED[2] - baroData.Altitude );
// Store this for inspecting offline
NEDPositionData nedPos;
NEDPositionGet(&nedPos);
nedPos.North = NED[0];
nedPos.East = NED[1];
nedPos.Down = NED[2];
NEDPositionSet(&nedPos);
} else if (!outdoor_mode) {
INSSetPosVelVar(1e2f, 1e2f);
vel[0] = vel[1] = vel[2] = 0;

View File

@ -60,7 +60,6 @@
#include "fixedwingpathfollowersettings.h"
#include "fixedwingpathfollowerstatus.h"
#include "homelocation.h"
#include "nedposition.h"
#include "stabilizationdesired.h"
#include "stabilizationsettings.h"
#include "systemsettings.h"

View File

@ -60,9 +60,9 @@
#include "pathstatus.h"
#include "gpsvelocity.h"
#include "gpsposition.h"
#include "homelocation.h"
#include "vtolpathfollowersettings.h"
#include "nedaccel.h"
#include "nedposition.h"
#include "stabilizationdesired.h"
#include "stabilizationsettings.h"
#include "systemsettings.h"
@ -75,6 +75,7 @@
#define STACK_SIZE_BYTES 1548
#define TASK_PRIORITY (tskIDLE_PRIORITY+2)
#define F_PI 3.14159265358979323846f
#define DEG2RAD (F_PI/180.0f)
// Private types
@ -348,11 +349,24 @@ void updateEndpointVelocity()
break;
case VTOLPATHFOLLOWERSETTINGS_POSITIONSOURCE_GPSPOS:
{
NEDPositionData nedPosition;
NEDPositionGet(&nedPosition);
northPos = nedPosition.North;
eastPos = nedPosition.East;
downPos = nedPosition.Down;
// this used to work with the NEDposition UAVObject
// however this UAVObject has been removed
GPSPositionData gpsPosition;
GPSPositionGet(&gpsPosition);
HomeLocationData homeLocation;
HomeLocationGet(&homeLocation);
float lat = homeLocation.Latitude / 10.0e6f * DEG2RAD;
float alt = homeLocation.Altitude;
float T[3] = { alt+6.378137E6f,
cosf(lat)*(alt+6.378137E6f),
-1.0f};
float NED[3] = {T[0] * ((gpsPosition.Latitude - homeLocation.Latitude) / 10.0e6f * DEG2RAD),
T[1] * ((gpsPosition.Longitude - homeLocation.Longitude) / 10.0e6f * DEG2RAD),
T[2] * ((gpsPosition.Altitude + gpsPosition.GeoidSeparation - homeLocation.Altitude))};
northPos = NED[0];
eastPos = NED[1];
downPos = NED[2];
}
break;
default:

View File

@ -63,7 +63,6 @@ UAVOBJSRCFILENAMES += manualcontrolsettings
UAVOBJSRCFILENAMES += mixersettings
UAVOBJSRCFILENAMES += mixerstatus
UAVOBJSRCFILENAMES += nedaccel
UAVOBJSRCFILENAMES += nedposition
UAVOBJSRCFILENAMES += objectpersistence
UAVOBJSRCFILENAMES += overosyncstats
UAVOBJSRCFILENAMES += overosyncsettings

View File

@ -63,7 +63,6 @@ UAVOBJSRCFILENAMES += manualcontrolsettings
UAVOBJSRCFILENAMES += mixersettings
UAVOBJSRCFILENAMES += mixerstatus
UAVOBJSRCFILENAMES += nedaccel
UAVOBJSRCFILENAMES += nedposition
UAVOBJSRCFILENAMES += objectpersistence
UAVOBJSRCFILENAMES += overosyncstats
UAVOBJSRCFILENAMES += overosyncsettings

View File

@ -61,7 +61,6 @@ UAVOBJSRCFILENAMES += manualcontrolsettings
UAVOBJSRCFILENAMES += mixersettings
UAVOBJSRCFILENAMES += mixerstatus
UAVOBJSRCFILENAMES += nedaccel
UAVOBJSRCFILENAMES += nedposition
UAVOBJSRCFILENAMES += objectpersistence
UAVOBJSRCFILENAMES += overosyncstats
UAVOBJSRCFILENAMES += pathaction

View File

@ -87,7 +87,6 @@ HEADERS += $$UAVOBJECT_SYNTHETICS/accessorydesired.h \
$$UAVOBJECT_SYNTHETICS/flightplancontrol.h \
$$UAVOBJECT_SYNTHETICS/watchdogstatus.h \
$$UAVOBJECT_SYNTHETICS/nedaccel.h \
$$UAVOBJECT_SYNTHETICS/nedposition.h \
$$UAVOBJECT_SYNTHETICS/sonaraltitude.h \
$$UAVOBJECT_SYNTHETICS/flightstatus.h \
$$UAVOBJECT_SYNTHETICS/hwsettings.h \
@ -167,7 +166,6 @@ SOURCES += $$UAVOBJECT_SYNTHETICS/accessorydesired.cpp \
$$UAVOBJECT_SYNTHETICS/flightplancontrol.cpp \
$$UAVOBJECT_SYNTHETICS/watchdogstatus.cpp \
$$UAVOBJECT_SYNTHETICS/nedaccel.cpp \
$$UAVOBJECT_SYNTHETICS/nedposition.cpp \
$$UAVOBJECT_SYNTHETICS/sonaraltitude.cpp \
$$UAVOBJECT_SYNTHETICS/uavobjectsinit.cpp \
$$UAVOBJECT_SYNTHETICS/flightstatus.cpp \

View File

@ -1,12 +0,0 @@
<xml>
<object name="NEDPosition" singleinstance="true" settings="false">
<description>Contains the current position relative to @ref HomeLocation</description>
<field name="North" units="m" type="float" elements="1"/>
<field name="East" units="m" type="float" elements="1"/>
<field name="Down" units="m" type="float" elements="1"/>
<access gcs="readwrite" flight="readwrite"/>
<telemetrygcs acked="false" updatemode="manual" period="0"/>
<telemetryflight acked="false" updatemode="periodic" period="1000"/>
<logging updatemode="periodic" period="1000"/>
</object>
</xml>