paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] Warning possible bug in "ins_arduimu.c"


From: David Conger
Subject: Re: [Paparazzi-devel] Warning possible bug in "ins_arduimu.c"
Date: Fri, 18 Feb 2011 10:31:57 -0800

I'm curious about that boot process in the ArduIMU. It takes me a few seconds 
to connect the battery, place it inside the airframe before I can hold it 
level. What is the best procedure for this initialization? Immediately hold it 
level for xx seconds? I wish there was a delay that could be setup like wait 10 
seconds then start the initialization. Or a reset that can be sent to the 
ArduIMU from the GCS to make it reset. 
-David
On Feb 18, 2011, at 9:15 AM, address@hidden wrote:

> 
> I think you are right, and it seems to be the same in the ins_osam_ugear code.
> the proper way to do it is probably in the init() function:
> ins_roll_neutral = RadOfDeg(INS_ROLL_NEUTRAL_DEFAULT);
> 
> and in the update functions use the estimator.h macros:
> 
> EstimatorSetAtt(phi, psi, theta) or EstimatorSetPhiPsi(phi, psi)
> depending on whether you want to use the ins_psi or not.
> 
> One thing about the ArduIMU though is the boot/calibration sequence 
> initializes it to level anyway making setting offsets in the airframe file 
> questionable.
> 
> /Steve
> 
> 
> On Fri, 18 Feb 2011 17:04:22 +0200, Chris <address@hidden> wrote:
>> Hi.
>> Today i gad another flight but as i tried to tune in the ArduIMU i
>> found that the
>> pitch and roll neutral default correction angles are in radians not degrees.
>> 
>> In the airframe file it says:
>> <section name="INS" prefix="INS_">
>> <define name="ROLL_NEUTRAL_DEFAULT" value="0" unit="deg"/>
>> <define name="PITCH_NEUTRAL_DEFAULT" value="3" unit="deg"/>
>> </section>
>> The units i think are not degrees but radians because in "ins_arduimu.c:
>> 
>> void ardu_update_state_ins( void ) {
>> 
>>    estimator_phi  = ArduIMU_data[0]*0.01745329252 - ins_roll_neutral;
>>    estimator_theta  = ArduIMU_data[1]*0.01745329252 - ins_pitch_neutral;
>>    float psi = ArduIMU_data[2]*0.01745329252;
>> 
>>    RunOnceEvery(50, DOWNLINK_SEND_AHRS_EULER(DefaultChannel,
>> &estimator_phi, &estimator_theta, &psi));
>> }
>> 
>> Inside the "ins_arduimu.c" file the imu itself sends the pitch and
>> roll angles in degrees,
>> then the code converts them to radians by multiplying them with 0.01745
>> and finally it adds the neutrals which looks like they must be radians.
>> I think the above code should read:
>> void ardu_update_state_ins( void ) {
>> 
>>    estimator_phi  = ArduIMU_data[0]*0.01745329252 -
>> RadOfDeg(ins_roll_neutral);
>>    estimator_theta  = ArduIMU_data[1]*0.01745329252 -
>> RadOfDeg(ins_pitch_neutral);
>>    float psi = ArduIMU_data[2]*0.01745329252;
>> 
>>    RunOnceEvery(50, DOWNLINK_SEND_AHRS_EULER(DefaultChannel,
>> &estimator_phi, &estimator_theta, &psi));
>> }
>> 
>> Any ideas?
>> Chris
>> 
>> 
>> 
>> _______________________________________________
>> Paparazzi-devel mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/paparazzi-devel
> 
> 
> _______________________________________________
> Paparazzi-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/paparazzi-devel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]