31 double spin_decay = (1.0 / _spin_down) * delta_time_sec;
32 _spin_norm -= spin_decay;
38 double step = spin_decay + (1.0 / _spin_up) * _power_norm * delta_time_sec;
39 if ((_spin_norm + step) <= _power_norm)
48 else if (_spin_norm > 1.0)
55 _power_norm = power_norm;
67 _spin_norm = spin_norm;
79 _serviceable = serviceable;
89 _spin_down = spin_down;
virtual void set_spin_up(double spin_up)
Set the gyro's spin up time in seconds (from 0 to full spin).
virtual void set_spin_down(double spin_down)
Set the gyro's spin down time in seconds (from full spin to 0).
virtual void set_spin_norm(double spin_norm)
Set the gyro's current spin.
virtual void set_power_norm(double power_norm)
Set the power available to the gyro.
virtual void update(double delta_time_sec)
Update the gyro.
virtual bool is_serviceable() const
Test if the gyro is serviceable.
void reinit(void)
Reset the gyro.
virtual double get_spin_norm() const
Get the gyro's current spin.
virtual void set_serviceable(bool serviceable)
Set the gyro's serviceability.
virtual ~Gyro()
Destructor.