r1233 - gyro calibration repeat if copter moves
- jevermeister
- Posts: 708
- Joined: Wed Jul 20, 2011 8:56 am
- Contact:
r1233 - gyro calibration repeat if copter moves
Hi,
I think we should definetely put this feature into a define!
Many gyros do not like change of climate and will prevent you from flying if you take them out of the warm car/room into the cold and have this feature working.
This feature was implemented a few months ago and ditched because of this.
Maybe it is ok for a MPU but you will have serious problems with some ITG and WMP.
The temperature drift of gyros is the reason for this.
Can I have a feedback from different people with different gyros?
Nils
I think we should definetely put this feature into a define!
Many gyros do not like change of climate and will prevent you from flying if you take them out of the warm car/room into the cold and have this feature working.
This feature was implemented a few months ago and ditched because of this.
Maybe it is ok for a MPU but you will have serious problems with some ITG and WMP.
The temperature drift of gyros is the reason for this.
Can I have a feedback from different people with different gyros?
Nils
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: r1233 - gyro calibration repeat if copter moves
Back in the days of using the HK401Bs, it was a well know fact to allow the gyros to set and adjust to surrounding temperature. Personally I think people should revisit this technique verse adding more code to the firmware. Then one can also use the stick combination to recalibrate if needed.
Re: r1233 - gyro calibration repeat if copter moves
There are so many people who are totally unaware the gyro calibration stick combo exists, who continue moving the copter while powering it up (and thus ending up with non-zero gyro offsets), and then attempt to fly.
This is one of the reason I added moron threshold value to baseflight, which allows a certain deadband (to allow for sensor drift) while still discarding calibration if user is obviously a moron (i.e. spinning the board around while plugging in battery), but of course, the proper way would be to make users read manual/wiki (yea, RIGHT) to get educated on the issue.
This is one of the reason I added moron threshold value to baseflight, which allows a certain deadband (to allow for sensor drift) while still discarding calibration if user is obviously a moron (i.e. spinning the board around while plugging in battery), but of course, the proper way would be to make users read manual/wiki (yea, RIGHT) to get educated on the issue.
Re: r1233 - gyro calibration repeat if copter moves
I think this feature makes sense and should be left as it is.
I think the main point is to get the gyro calibrated properly. if you remove this change, then the user will be worse off, plus its not like the issue you described will go away if this change is backed out. not saying the issue you described does not exist, but probably should be addressed separately.
This feature saves me the trouble of doing manual gyro calibration everytime I plug in the battery. thanks for adding it.
-------------
Go Giants!
I think the main point is to get the gyro calibrated properly. if you remove this change, then the user will be worse off, plus its not like the issue you described will go away if this change is backed out. not saying the issue you described does not exist, but probably should be addressed separately.
This feature saves me the trouble of doing manual gyro calibration everytime I plug in the battery. thanks for adding it.
-------------
Go Giants!
- jevermeister
- Posts: 708
- Joined: Wed Jul 20, 2011 8:56 am
- Contact:
Re: r1233 - gyro calibration repeat if copter moves
then please put into a default activated define.this way I can deactivate it. imho, people who are unaware of the calibration at startup should crash their copter to learn it the hard way.
adding features like this without proper notice is not good kung fu btw.
nils
adding features like this without proper notice is not good kung fu btw.
nils
Re: r1233 - gyro calibration repeat if copter moves
We can't we set gyro calibration when arming?
Re: r1233 - gyro calibration repeat if copter moves
on gimbal equipped MWC multirotors
gimbal servos make all sort of rapid movement during first 3-4 seconds of battery being plugged in,
many times I had to unplug them to allow board to initialise properly before this mod,
so this surely helps, because no unplugging is needed more,
p.s. is there a way to disable servo movement in code for the first 20 seconds?
to delay initialisation of them or something...?
gimbal servos make all sort of rapid movement during first 3-4 seconds of battery being plugged in,
many times I had to unplug them to allow board to initialise properly before this mod,
so this surely helps, because no unplugging is needed more,
p.s. is there a way to disable servo movement in code for the first 20 seconds?
to delay initialisation of them or something...?
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: r1233 - gyro calibration repeat if copter moves
dr.tom wrote:on gimbal equipped MWC multirotors
gimbal servos make all sort of rapid movement during first 3-4 seconds of battery being plugged in,
many times I had to unplug them to allow board to initialise properly before this mod,
so this surely helps, because no unplugging is needed more,
p.s. is there a way to disable servo movement in code for the first 20 seconds?
to delay initialisation of them or something...?
On my Bicopters, I power the servos from a separate power source than the FC and power the the FC first. After the FC is powered up, you can do what you like.
Re: r1233 - gyro calibration repeat if copter moves
Dr Tom has a good point.
Suggest to add code to not move servos during init
I fly mainly tris and have the habit of holding copter still until init is finished. Should fix issue at source.
Suggest to add code to not move servos during init
I fly mainly tris and have the habit of holding copter still until init is finished. Should fix issue at source.
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: r1233 - gyro calibration repeat if copter moves
My experience has been, even with the absent of a signal, the servos will move regardless. Maybe the cheap analog servos I am using.
- jevermeister
- Posts: 708
- Joined: Wed Jul 20, 2011 8:56 am
- Contact:
Re: r1233 - gyro calibration repeat if copter moves
I always calibrate the gyros by combo before first start. my landing skid is vety wobbly so I have to wait for it to calm down.
I changed the code.the function is now enclosed by a define. everyone is now happy.
nils
I changed the code.the function is now enclosed by a define. everyone is now happy.
nils
-
- Posts: 1630
- Joined: Wed Jan 19, 2011 9:07 pm
Re: r1233 - gyro calibration repeat if copter moves
jevermeister wrote:Many gyros do not like change of climate and will prevent you from flying if you take them out of the warm car/room into the cold and have this feature working.
Gyro drift due to temperature change is a long term process (several minutes)
gyro calibration lasts only a couple of second.
this mod is not dependant with gyro drift
Re: r1233 - gyro calibration repeat if copter moves
jevermeister wrote:I always calibrate the gyros by combo before first start. my landing skid is vety wobbly so I have to wait for it to calm down.
I changed the code.the function is now enclosed by a define. everyone is now happy.
nils
you can still do that even with the fix, no?
imho, adding yet another define will only serve to confuse users even more.
I still don't see how adding the option to remove the fix helps.
if the gyro has temp issues, regardless if the feature is in there or not, a manual gyro calibration is needed.
its not like if the quad was perfectly still when the battery is plugged in, that not having this fix will make that gyro calibration any more valid than with the fix.
I'm not sure if you are able to follow my reasoning logic or not.
Anyone else care to chime in on this?
just my 2 cents.
-
- Posts: 1630
- Joined: Wed Jan 19, 2011 9:07 pm
Re: r1233 - gyro calibration repeat if copter moves
I fully agree.
This mod can only make things better.
no define is expected.
This mod can only make things better.
no define is expected.
doughboy wrote:jevermeister wrote:I always calibrate the gyros by combo before first start. my landing skid is vety wobbly so I have to wait for it to calm down.
I changed the code.the function is now enclosed by a define. everyone is now happy.
nils
you can still do that even with the fix, no?
imho, adding yet another define will only serve to confuse users even more.
I still don't see how adding the option to remove the fix helps.
if the gyro has temp issues, regardless if the feature is in there or not, a manual gyro calibration is needed.
its not like if the quad was perfectly still when the battery is plugged in, that not having this fix will make that gyro calibration any more valid than with the fix.
I'm not sure if you are able to follow my reasoning logic or not.
Anyone else care to chime in on this?
just my 2 cents.
- jevermeister
- Posts: 708
- Joined: Wed Jul 20, 2011 8:56 am
- Contact:
Re: r1233 - gyro calibration repeat if copter moves
then would someone please tell me how to fly my copter if the gyro is not calibrating because the calibrations starts over and over again?
ps.: I can follow your argumentation.I am not stupid. But I do not share it.
have you tested this feature in reality, like you should have, or is it just theory?
nils
ps.: I can follow your argumentation.I am not stupid. But I do not share it.
have you tested this feature in reality, like you should have, or is it just theory?
nils
Re: r1233 - gyro calibration repeat if copter moves
rebuilt the code again with the fix enabled and maybe reinitialize your eeprom just to make sure. the calibration should only take less than 1 second.
if you are seeing it continue forever (led does not go off), then something is wrong with your setup.
yes I have tested this thoroughly and I can shake the quad and it keeps on calibrating but stops as soon as I put it down.
what you described can happen if your tilt variable is not initialized to 0.
line 268
uint8_t axis, tilt=0;
I think you probably missed that change and incorrectly blaming it to temp issue. As Alex said, the two issues are mutually exclusive and as I said, temp issue should be addressed separately.
if you are seeing it continue forever (led does not go off), then something is wrong with your setup.
yes I have tested this thoroughly and I can shake the quad and it keeps on calibrating but stops as soon as I put it down.
what you described can happen if your tilt variable is not initialized to 0.
line 268
uint8_t axis, tilt=0;
I think you probably missed that change and incorrectly blaming it to temp issue. As Alex said, the two issues are mutually exclusive and as I said, temp issue should be addressed separately.
- jevermeister
- Posts: 708
- Joined: Wed Jul 20, 2011 8:56 am
- Contact:
Re: r1233 - gyro calibration repeat if copter moves
ok go on then.
feel free to revoke my last commit.
as I said I ested this feature a year ago.
I do not have an educational mandate.
nils
feel free to revoke my last commit.
as I said I ested this feature a year ago.
I do not have an educational mandate.
nils
Re: r1233 - gyro calibration repeat if copter moves
or if you verified your tilt is initialized to 0, then the other possible cause is
if(abs(gyroADC[axis] - previousGyroADC[axis]) > 8)
is always true. if this is really due to temp issue, adding a define to disable the fix does not really address the temp issue. the problem is still there.
nobody is arguing the temp issue does not exist. please evaluate this more objectively.
if(abs(gyroADC[axis] - previousGyroADC[axis]) > 8)
is always true. if this is really due to temp issue, adding a define to disable the fix does not really address the temp issue. the problem is still there.
nobody is arguing the temp issue does not exist. please evaluate this more objectively.
- jevermeister
- Posts: 708
- Joined: Wed Jul 20, 2011 8:56 am
- Contact:
Re: r1233 - gyro calibration repeat if copter moves
Hi,
btw.: Please provide us with the proper credits for this code:
http://code.google.com/p/afrodevices/so ... /sensors.c
and at least copy the comments (so true)
Nils
ps.: please take everythign as serious as possible! This is no irony at all, mutliwii is my life. If I do not succeeed here, I feel worthless. LOL
Nils
btw.: Please provide us with the proper credits for this code:
http://code.google.com/p/afrodevices/so ... /sensors.c
and at least copy the comments (so true)
Nils
ps.: please take everythign as serious as possible! This is no irony at all, mutliwii is my life. If I do not succeeed here, I feel worthless. LOL
Nils