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.
31 * @param delta_time_sec The elapsed time since the last update.
32 * @param power_norm The power available to drive the gyro, from
35 virtual void update (double delta_time_sec);
39 * Set the power available to the gyro.
41 * @param power_norm The amount of power (vacuum or electrical)
42 * available to keep the gyro spinning, from 0.0 (none) to
45 virtual void set_power_norm (double power_norm);
49 * Get the gyro's current spin.
51 * @return The spin from 0.0 (not spinning) to 1.0 (full speed).
53 virtual double get_spin_norm () const;
57 * Set the gyro's current spin.
59 * @spin_norm The spin from 0.0 (not spinning) to 1.0 (full speed).
61 virtual void set_spin_norm (double spin_norm);
65 * Test if the gyro is serviceable.
67 * @return true if the gyro is serviceable, false otherwise.
69 virtual bool is_serviceable () const;
73 * Set the gyro's serviceability.
75 * @param serviceable true if the gyro is functional, false otherwise.
77 virtual void set_serviceable (bool serviceable);
88 #endif // __INSTRUMENTATION_GYRO_HXX