Subversion Repositories FlightCtrl

Rev

Rev 628 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 628 Rev 629
Line 49... Line 49...
49
// +  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
49
// +  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
50
// +  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN// +  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
50
// +  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN// +  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
51
// +  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
51
// +  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
52
// +  POSSIBILITY OF SUCH DAMAGE. 
52
// +  POSSIBILITY OF SUCH DAMAGE. 
53
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
53
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
54
// Aenderungen von Peter Muehlenbrock ("Salvo") Stand 6.10.2007
54
// Aenderungen von Peter Muehlenbrock ("Salvo") Stand 9.11.2008
55
/*
55
/*
56
Driftkompensation fuer Gyros verbessert
56
Driftkompensation fuer Gyros verbessert
57
Linearsensor mit fixem Neutralwert
57
Linearsensor optional mit fixem Neutralwert
58
Ersatzkompass abgeleitet aus Magnetkompass und Giergyro fuer nahezu neigungsunabhaengige Kompassfunktion
58
Ersatzkompass abgeleitet aus Magnetkompass und Giergyro fuer nahezu neigungsunabhaengige Kompassfunktion
59
*/
59
*/
Line 60... Line 60...
60
 
60
 
61
#include "main.h"
61
#include "main.h"
Line 99... Line 99...
99
int GyroKomp_Value; //  Der ermittelte Kompasswert aus Gyro und Magnetkompass
99
int GyroKomp_Value; //  Der ermittelte Kompasswert aus Gyro und Magnetkompass
100
short int cnt_stickgier_zero =0;
100
short int cnt_stickgier_zero =0;
101
int gyrogier_kompass;
101
int gyrogier_kompass;
102
//Salvo End
102
//Salvo End
Line 103... Line 103...
103
 
103
 
104
 //Salvo 2.1.2008 Debugvariablen
104
 //Salvo 2.1.2008 Allgemeine Debugvariablen
105
int debug_gp_0,debug_gp_1,debug_gp_2,debug_gp_3,debug_gp_4,debug_gp_5,debug_gp_6,debug_gp_7; //Allgemeine Debugvariablen
105
int debug_gp_0,debug_gp_1,debug_gp_2,debug_gp_3,debug_gp_4,debug_gp_5,debug_gp_6,debug_gp_7;
Line 106... Line 106...
106
//Salvo End
106
//Salvo End
107
 
107
 
108
float GyroFaktor;
108
float GyroFaktor;
Line 386... Line 386...
386
        if(MotorTest[0]) Motor_Vorne = MotorTest[0];
386
        if(MotorTest[0]) Motor_Vorne = MotorTest[0];
387
        if(MotorTest[1]) Motor_Hinten = MotorTest[1];
387
        if(MotorTest[1]) Motor_Hinten = MotorTest[1];
388
        if(MotorTest[2]) Motor_Links = MotorTest[2];
388
        if(MotorTest[2]) Motor_Links = MotorTest[2];
389
        if(MotorTest[3]) Motor_Rechts = MotorTest[3];
389
        if(MotorTest[3]) Motor_Rechts = MotorTest[3];
390
        }
390
        }
391
/*
391
 
392
    DebugOut.Analog[12] = Motor_Vorne;
392
    DebugOut.Analog[12] = Motor_Vorne;
393
    DebugOut.Analog[13] = Motor_Hinten;
393
    DebugOut.Analog[13] = Motor_Hinten;
394
    DebugOut.Analog[14] = Motor_Links;
394
    DebugOut.Analog[14] = Motor_Links;
395
    DebugOut.Analog[15] = Motor_Rechts;  
395
    DebugOut.Analog[15] = Motor_Rechts;  
396
*/
396
 
397
    //Start I2C Interrupt Mode
397
    //Start I2C Interrupt Mode
398
    twi_state = 0;
398
    twi_state = 0;
399
    motor = 0;
399
    motor = 0;
400
    i2c_start();
400
    i2c_start();
401
}
401
}
Line 1207... Line 1207...
1207
        DebugOut.Analog[27] =  gps_rel_act_position.utm_north;
1207
        DebugOut.Analog[27] =  gps_rel_act_position.utm_north;
1208
        DebugOut.Analog[28] =  gps_rel_act_position.utm_alt;
1208
        DebugOut.Analog[28] =  gps_rel_act_position.utm_alt;
1209
        DebugOut.Analog[29] =  gps_state + (gps_sub_state*10)+(50*gps_cmd);
1209
        DebugOut.Analog[29] =  gps_state + (gps_sub_state*10)+(50*gps_cmd);
1210
        DebugOut.Analog[30] =  debug_gp_0;
1210
        DebugOut.Analog[30] =  debug_gp_0;
1211
        DebugOut.Analog[31] =  debug_gp_1;
1211
        DebugOut.Analog[31] =  debug_gp_1;
1212
        DebugOut.Analog[12] = debug_gp_2;
1212
/*      DebugOut.Analog[12] = debug_gp_2;
1213
    DebugOut.Analog[13] = debug_gp_3;
1213
    DebugOut.Analog[13] = debug_gp_3;
1214
    DebugOut.Analog[14] = debug_gp_4;
1214
    DebugOut.Analog[14] = debug_gp_4;
1215
    DebugOut.Analog[15] = debug_gp_5;
1215
    DebugOut.Analog[15] = debug_gp_5;
1216
 
1216
*/
1217
//      DebugOut.Analog[30] =  dist_flown;
1217
//      DebugOut.Analog[30] =  dist_flown;
1218
//      DebugOut.Analog[31] =  (int) dist_2home;
1218
//      DebugOut.Analog[31] =  (int) dist_2home;
1219
//      DebugOut.Analog[31] =  (int) GPS_hdng_abs_2trgt;
1219
//      DebugOut.Analog[31] =  (int) GPS_hdng_abs_2trgt;
1220
//      DebugOut.Analog[31] =  (int) GyroGier_Comp;
1220
//      DebugOut.Analog[31] =  (int) GyroGier_Comp;
1221
/*
1221
/*