Rev 458 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 458 | Rev 491 | ||
---|---|---|---|
Line 174... | Line 174... | ||
174 | signed int heading_MM3(void) |
174 | signed int heading_MM3(void) |
175 | //############################################################################ |
175 | //############################################################################ |
176 | { |
176 | { |
177 | float sin_nick, cos_nick, sin_roll, cos_roll; |
177 | float sin_nick, cos_nick, sin_roll, cos_roll; |
178 | float x_corr, y_corr; |
178 | float x_corr, y_corr; |
179 | signed int x_axis,y_axis,z_axis, heading; |
179 | signed int x_axis,y_axis,z_axis,nicktilt,rolltilt,heading; |
180 | unsigned int div_faktor; |
180 | unsigned int div_faktor; |
Line 181... | Line 181... | ||
181 | 181 | ||
Line 182... | Line 182... | ||
182 | div_faktor = (uint16_t)EE_Parameter.UserParam1 * 8; |
182 | div_faktor = (uint16_t)EE_Parameter.UserParam1 * 8; |
183 | 183 | ||
184 | // Berechung von sinus und cosinus |
- | |
185 | MM3.NickGrad = (IntegralNick/div_faktor); |
184 | // Berechung von sinus und cosinus |
186 | //MM3.NickGrad = asin_i(MM3.NickGrad); |
185 | nicktilt = (IntegralNick/div_faktor); |
Line 187... | Line 186... | ||
187 | sin_nick = sin_f(MM3.NickGrad); |
186 | sin_nick = sin_f(nicktilt); |
188 | cos_nick = cos_f(MM3.NickGrad); |
- | |
189 | 187 | cos_nick = cos_f(nicktilt); |
|
190 | MM3.RollGrad = (IntegralRoll/div_faktor); |
188 | |
Line 191... | Line 189... | ||
191 | //MM3.RollGrad = asin_i(MM3.RollGrad); |
189 | rolltilt = (IntegralRoll/div_faktor); |
192 | sin_roll = sin_f(MM3.RollGrad); |
190 | sin_roll = sin_f(rolltilt); |
193 | cos_roll = cos_f(MM3.RollGrad); |
191 | cos_roll = cos_f(rolltilt); |
194 | 192 |