[ODE] ODE 1.0 gyroscopic terms

Morgan McGuire morgan3d at yahoo.com
Tue Apr 4 19:59:16 MST 2006


> > Do you have a patch?
> 
> In config.h:
> 
> /* Disable gyroscopic effects for greater stability */
> #define NO_GYROSCOPIC
> 
> In quickstep.cpp, circa line 578, wrap the following code
> 
> #		ifndef NO_GYROSCOPIC
> 		// compute rotational force
> 		//dMULTIPLY0_331 (tmp,I+i*12,body[i]->avel);
> 		dMULTIPLY0_331 (tmp,I,body[i]->avel);
> 		dCROSS (body[i]->tacc,-=,body[i]->avel,tmp);
> #		endif
>  
> 
> In step.cpp, circa line 288:
> 
> #	ifndef NO_GYROSCOPIC
>     // compute rotational force
>     dMULTIPLY0_331 (tmp,I+i*12,body[i]->avel);
>     dCROSS (body[i]->tacc,-=,body[i]->avel,tmp);
> #	endif
> 
> In step.cpp, circa line 1037:
> 
> #	ifndef NO_GYROSCOPIC
>     // compute rotational force
>     dMULTIPLY0_331 (tmp,I+i*12,body[i]->avel);
>     dCROSS (body[i]->tacc,-=,body[i]->avel,tmp);
> #	endif
> 
> 
> In stepfast.cpp, circa line 818:
> 
> #	                ifndef NO_GYROSCOPIC
> 
> 			// compute rotational force
> 			dMULTIPLY0_331 (tmp, globalI + b * 12, body->avel);
> 			dCROSS (body->tacc, -=, body->avel, tmp);
> #			endif
> 
> > Also, what would the prefered default be?
> > Would most people want the gyroscopic term included or excluded?
> 
> I recommend commenting out #define NO_GYROSCOPIC (i.e., leaving the default
> the
> same as the current ODE) in order to not affect existing applications, at
> least
> for this release.  However, I think that most people would find they want to
> turn it on.
> 
> Other users have reported that disabling this term (defining NO_GYROSCOPIC)
> does not appear to noticably affect "good" results but does reduce some
> instability.  This is consistent with my observations.  The motivation for
> this
> patch is to eliminate a term that tends to introduce energy into the system
> due
> to accumulated roundoff.
> 
> -m
> 
> 



More information about the ODE mailing list