FlightGear next
Gyro Class Reference

Simple model of a spinning gyro. More...

#include <gyro.hxx>

Public Member Functions

 Gyro ()
 Constructor.
 
virtual ~Gyro ()
 Destructor.
 
void reinit (void)
 Reset the gyro.
 
virtual void update (double delta_time_sec)
 Update the gyro.
 
virtual void set_power_norm (double power_norm)
 Set the power available to the gyro.
 
virtual double get_spin_norm () const
 Get the gyro's current spin.
 
virtual void set_spin_norm (double spin_norm)
 Set the gyro's current spin.
 
virtual bool is_serviceable () const
 Test if the gyro is serviceable.
 
virtual void set_serviceable (bool serviceable)
 Set the gyro's serviceability.
 
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).
 

Detailed Description

Simple model of a spinning gyro.

The gyro decelerates gradually if no power is available to keep it spinning, and spins up quickly when power becomes available.

Definition at line 11 of file gyro.hxx.

Constructor & Destructor Documentation

◆ Gyro()

Gyro::Gyro ( )

Constructor.

Definition at line 8 of file gyro.cxx.

◆ ~Gyro()

Gyro::~Gyro ( )
virtual

Destructor.

Definition at line 15 of file gyro.cxx.

Member Function Documentation

◆ get_spin_norm()

double Gyro::get_spin_norm ( ) const
virtual

Get the gyro's current spin.

Returns
The spin from 0.0 (not spinning) to 1.0 (full speed).

Definition at line 59 of file gyro.cxx.

◆ is_serviceable()

bool Gyro::is_serviceable ( ) const
virtual

Test if the gyro is serviceable.

Returns
true if the gyro is serviceable, false otherwise.

Definition at line 71 of file gyro.cxx.

◆ reinit()

void Gyro::reinit ( void )

Reset the gyro.

Definition at line 19 of file gyro.cxx.

◆ set_power_norm()

void Gyro::set_power_norm ( double power_norm)
virtual

Set the power available to the gyro.

Parameters
power_normThe amount of power (vacuum or electrical) available to keep the gyro spinning, from 0.0 (none) to 1.0 (full power)

Definition at line 53 of file gyro.cxx.

◆ set_serviceable()

void Gyro::set_serviceable ( bool serviceable)
virtual

Set the gyro's serviceability.

Parameters
serviceabletrue if the gyro is functional, false otherwise.

Definition at line 77 of file gyro.cxx.

◆ set_spin_down()

void Gyro::set_spin_down ( double spin_down)
virtual

Set the gyro's spin down time in seconds (from full spin to 0).

@spin_down secs

Definition at line 87 of file gyro.cxx.

◆ set_spin_norm()

void Gyro::set_spin_norm ( double spin_norm)
virtual

Set the gyro's current spin.

@spin_norm The spin from 0.0 (not spinning) to 1.0 (full speed).

Definition at line 65 of file gyro.cxx.

◆ set_spin_up()

void Gyro::set_spin_up ( double spin_up)
virtual

Set the gyro's spin up time in seconds (from 0 to full spin).

@spin_up secs

Definition at line 82 of file gyro.cxx.

◆ update()

void Gyro::update ( double delta_time_sec)
virtual

Update the gyro.

Parameters
delta_time_secThe elapsed time since the last update.
power_normThe power available to drive the gyro, from 0.0 to 1.0.

Definition at line 28 of file gyro.cxx.


The documentation for this class was generated from the following files: