1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-11 19:24:10 +01:00

GCS: Zero data structures, since this is not Java ;)

I was getting some weird initial random values from the sim.
This fixes that.


git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1667 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
cranphin 2010-09-16 22:32:49 +00:00 committed by cranphin
parent 303d2c19e1
commit 3d43f1cff1

View File

@ -201,6 +201,7 @@ void FGSimulator::processUpdate(QString& data)
// Update AltitudeActual object // Update AltitudeActual object
BaroAltitude::DataFields altActualData; BaroAltitude::DataFields altActualData;
memset(&altActualData, 0, sizeof(BaroAltitude::DataFields));
altActualData.Altitude = altitudeAGL; altActualData.Altitude = altitudeAGL;
altActualData.Temperature = temperature; altActualData.Temperature = temperature;
altActualData.Pressure = pressure; altActualData.Pressure = pressure;
@ -208,6 +209,7 @@ void FGSimulator::processUpdate(QString& data)
// Update attActual object // Update attActual object
AttitudeActual::DataFields attActualData; AttitudeActual::DataFields attActualData;
memset(&attActualData, 0, sizeof(AttitudeActual::DataFields));
attActualData.Roll = roll; attActualData.Roll = roll;
attActualData.Pitch = pitch; attActualData.Pitch = pitch;
attActualData.Yaw = yaw; attActualData.Yaw = yaw;
@ -219,6 +221,7 @@ void FGSimulator::processUpdate(QString& data)
// Update gps objects // Update gps objects
PositionActual::DataFields gpsData; PositionActual::DataFields gpsData;
memset(&gpsData, 0, sizeof(PositionActual::DataFields));
gpsData.Altitude = altitude; gpsData.Altitude = altitude;
gpsData.Heading = heading; gpsData.Heading = heading;
gpsData.Groundspeed = groundspeed; gpsData.Groundspeed = groundspeed;