IR_RollOfIrs and IR_PitchOfIrs

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

IR_RollOfIrs and IR_PitchOfIrs

Widyawardana Adiprawita
Dear All,

Sorry if this is a silly question,

I'm looking at the following code at the infrared.c

...........
void ir_update(void) {
#ifndef SIMUL
  int16_t x1_mean = buf_ir1.sum/buf_ir1.av_nb_sample;
  int16_t x2_mean = buf_ir2.sum/buf_ir2.av_nb_sample;
  ir_roll = IR_RollOfIrs(x1_mean, x2_mean) -
IR_ADC_ROLL_NEUTRAL;
  ir_pitch = IR_PitchOfIrs(x1_mean, x2_mean) -
IR_ADC_PITCH_NEUTRAL;
#else
  extern volatile int16_t simul_ir_roll,
simul_ir_pitch;
  ir_roll = simul_ir_roll - IR_ADC_ROLL_NEUTRAL;
  ir_pitch = simul_ir_pitch - IR_ADC_PITCH_NEUTRAL;  
#endif
}
..........

My problem is : where is the implementation of
IR_RollOfIrs and IR_PitchOfIrs ?

Thank You

-doni-


               
__________________________________________
Yahoo! DSL ? Something to write home about.
Just $16.99/mo. or less.
dsl.yahoo.com



_______________________________________________
Paparazzi-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/paparazzi-devel
Reply | Threaded
Open this post in threaded view
|

Re: IR_RollOfIrs and IR_PitchOfIrs

antoine.drouin
Hi Doni

This macro is in airframe.h ( for example /paparazzi3/var/Twin1/airframe.h )
It is generated from the parameters stored in the airframe config file (
for example paparazzi3/conf/airframes/twinstar4.xml ).
This is needed to adapt to the different hardware mouting possibilities
of the infrared sensor ( if its axis are aligned with aircraft or at 45
degres etc...)

A+

Poine

Widyawardana Adiprawita wrote:

>Dear All,
>
>Sorry if this is a silly question,
>
>I'm looking at the following code at the infrared.c
>
>...........
>void ir_update(void) {
>#ifndef SIMUL
>  int16_t x1_mean = buf_ir1.sum/buf_ir1.av_nb_sample;
>  int16_t x2_mean = buf_ir2.sum/buf_ir2.av_nb_sample;
>  ir_roll = IR_RollOfIrs(x1_mean, x2_mean) -
>IR_ADC_ROLL_NEUTRAL;
>  ir_pitch = IR_PitchOfIrs(x1_mean, x2_mean) -
>IR_ADC_PITCH_NEUTRAL;
>#else
>  extern volatile int16_t simul_ir_roll,
>simul_ir_pitch;
>  ir_roll = simul_ir_roll - IR_ADC_ROLL_NEUTRAL;
>  ir_pitch = simul_ir_pitch - IR_ADC_PITCH_NEUTRAL;  
>#endif
>}
>..........
>
>My problem is : where is the implementation of
>IR_RollOfIrs and IR_PitchOfIrs ?
>
>Thank You
>
>-doni-
>
>
>
>__________________________________________
>Yahoo! DSL ? Something to write home about.
>Just $16.99/mo. or less.
>dsl.yahoo.com
>
>
>
>_______________________________________________
>Paparazzi-devel mailing list
>[hidden email]
>http://lists.nongnu.org/mailman/listinfo/paparazzi-devel
>  
>



_______________________________________________
Paparazzi-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/paparazzi-devel