Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 156 → Rev 157

/branches/salvo_gps/GPS.c
13,7 → 13,7
Peter Muehlenbrock
Auswertung der Daten vom GPS im ublox Format
Regelung fuer GPS noch nicht implementiert
Stand 14.9.2007
Stand 15.9.2007
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*/
#include "main.h"
65,11 → 65,14
// Initialisierung
void GPS_Neutral(void)
{
ublox_msg_state = UBLOX_IDLE;
actual_pos.status = 0;
actual_speed.status = 0;
actual_status.status = 0;
gps_home_position.status= 0; // Noch keine gueltige Home Position
ublox_msg_state = UBLOX_IDLE;
actual_pos.status = 0;
actual_speed.status = 0;
actual_status.status = 0;
gps_home_position.status = 0; // Noch keine gueltige Home Position
gps_act_position.status = 0;
gps_rel_act_position.status = 0;
 
}
 
// Home Position sichern falls Daten verfuegbar sind.
80,12 → 83,10
if (n == 0) // Gueltige und aktuelle Daten ?
{
// Neue GPS Daten liegen vor
// beeptime = 500; // Piepsen um korrekte Home Position anzuzeigen
// gps_act_position.status = 0;
gps_home_position.utm_east = gps_act_position.utm_east;
gps_home_position.utm_north = gps_act_position.utm_north;
gps_home_position.utm_alt = gps_act_position.utm_alt;
gps_home_position.status = 1; // Home Position gueltig
gps_home_position.utm_east = gps_act_position.utm_east;
gps_home_position.utm_north = gps_act_position.utm_north;
gps_home_position.utm_alt = gps_act_position.utm_alt;
gps_home_position.status = 1; // Home Position gueltig
}
}
 
/branches/salvo_gps/analog.c
63,7 → 63,6
Mess_Integral_Gier += wert;// / 16;
Mess_Integral_Gier2 += wert;
GyroKomp_Int += wert;
GyroKomp_Int2 += wert;
kanal = 1;
ZaehlMessungen++;
break;
/branches/salvo_gps/fc.c
182,7 → 182,6
beeptime = 50;
//Salvo 2.9.2007 Ersatzkompass
GyroKomp_Int = 0;
GyroKomp_Int2 = 0;
// Salvo End
}
 
514,7 → 513,7
{
unsigned char setting;
if(++delay_neutral > 200) // nicht sofort
{
{
GRN_OFF;
SetNeutral();
MotorenEin = 0;
532,11 → 531,17
ReadParameterSet(GetActiveParamSetNumber(), (unsigned char *) &EE_Parameter.Kanalbelegung[0], STRUCT_PARAM_LAENGE);
Piep(GetActiveParamSetNumber());
if((EE_Parameter.GlobalConfig & CFG_HOEHENREGELUNG)) // Höhenregelung aktiviert?
{
if((MessLuftdruck > 950) || (MessLuftdruck < 750)) SucheLuftruckOffset();
}
}
GPS_Save_Home();
{
if((MessLuftdruck > 950) || (MessLuftdruck < 750)) SucheLuftruckOffset();
}
GPS_Save_Home(); //Daten sind jetzt hoffentlich verfuegbar
if (gps_home_position.status > 0 )
{
Delay_ms(500); //akustisch verkuenden dass GPS Home Daten da sind
beeptime = 1000;
Delay_ms(500);
}
}
}
else delay_neutral = 0;
}
/branches/salvo_gps/fc.h
37,11 → 37,11
extern volatile int AdNeutralNick,AdNeutralRoll,AdNeutralGier, Mittelwert_AccNick, Mittelwert_AccRoll;
extern volatile int NeutralAccX, NeutralAccY,Mittelwert_AccHoch;
extern volatile float NeutralAccZ;
 
//Salvo 2.9.2007 Ersatzkompass
extern volatile long GyroKomp_Int,GyroKomp_Int2;
extern volatile long GyroKomp_Int;
extern volatile int GyroKomp_Inc_Grad;
extern volatile int GyroKomp_Value; // Der ermittelte Kompasswert aus Gyro und Magnetkompass
 
// Salvo End
 
void MotorRegler(void);
/branches/salvo_gps/timer0.c
61,7 → 61,7
if((cntKompass) && (cntKompass < 4000))
{
// Salvo Kompassoffset 30.8.2007 ***********
Kompass_Value_Old = KompassValue;
Kompass_Value_Old = KompassValue;
KompassValue = cntKompass -KOMPASS_OFFSET;
 
if (KompassValue < 0)