1 // gyro.hxx - simple model of a spinning gyro.
3 #ifndef __INSTRUMENTATION_GYRO_HXX
4 #define __INSTRUMENTATION_GYRO_HXX 1
7 * Simple model of a spinning gyro.
9 * The gyro decelerates gradually if no power is available to keep it
10 * spinning, and spins up quickly when power becomes available.
34 * @param delta_time_sec The elapsed time since the last update.
35 * @param power_norm The power available to drive the gyro, from
38 virtual void update (double delta_time_sec);
42 * Set the power available to the gyro.
44 * @param power_norm The amount of power (vacuum or electrical)
45 * available to keep the gyro spinning, from 0.0 (none) to
48 virtual void set_power_norm (double power_norm);
52 * Get the gyro's current spin.
54 * @return The spin from 0.0 (not spinning) to 1.0 (full speed).
56 virtual double get_spin_norm () const;
60 * Set the gyro's current spin.
62 * @spin_norm The spin from 0.0 (not spinning) to 1.0 (full speed).
64 virtual void set_spin_norm (double spin_norm);
68 * Test if the gyro is serviceable.
70 * @return true if the gyro is serviceable, false otherwise.
72 virtual bool is_serviceable () const;
76 * Set the gyro's serviceability.
78 * @param serviceable true if the gyro is functional, false otherwise.
80 virtual void set_serviceable (bool serviceable);
91 #endif // __INSTRUMENTATION_GYRO_HXX