Rev 251 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 251 | Rev 255 | ||
---|---|---|---|
Line 108... | Line 108... | ||
108 | { |
108 | { |
109 | float sin_nick, cos_nick, sin_roll, cos_roll; |
109 | float sin_nick, cos_nick, sin_roll, cos_roll; |
110 | signed int x_corr, y_corr; |
110 | signed int x_corr, y_corr; |
111 | signed int heading; |
111 | signed int heading; |
Line 112... | Line 112... | ||
112 | 112 | ||
113 | //Berechung von sinus und cosinus |
113 | // Berechung von sinus und cosinus |
114 | sin_nick = sin_f(MM3.NickGrad); |
114 | sin_nick = sin_f(MM3.NickGrad); |
115 | cos_nick = cos_f(MM3.NickGrad); |
115 | cos_nick = cos_f(MM3.NickGrad); |
116 | sin_roll = sin_f(MM3.RollGrad); |
116 | sin_roll = sin_f(MM3.RollGrad); |
Line 117... | Line 117... | ||
117 | cos_roll = cos_f(MM3.RollGrad); |
117 | cos_roll = cos_f(MM3.RollGrad); |
118 | - | ||
119 | //Neigungskompensation |
118 | |
120 | //x_corr = (((sin_roll * MM3.y_axis) - (cos_roll * MM3.z_axis)) * sin_nick) + (cos_nick * MM3.x_axis); |
119 | // Neigungskompensation |
Line 121... | Line 120... | ||
121 | x_corr = (cos_nick * MM3.x_axis) + (sin_roll * MM3.y_axis* sin_nick) - (cos_roll * MM3.z_axis * sin_nick); |
120 | x_corr = (cos_nick * MM3.x_axis) + (((sin_roll * MM3.y_axis) - (cos_roll * MM3.z_axis)) * sin_nick); |
122 | y_corr = ((cos_roll * MM3.y_axis) + (sin_roll * MM3.z_axis)); |
121 | y_corr = ((cos_roll * MM3.y_axis) + (sin_roll * MM3.z_axis)); |
Line 123... | Line 122... | ||
123 | 122 | ||
124 | //Winkelberechnung |
123 | // Winkelberechnung |