Public Member Functions | Public Attributes | Private Attributes | List of all members
wiimote.wiistate.WIIReading Class Reference
Inheritance diagram for wiimote.wiistate.WIIReading:
Inheritance graph
[legend]

Public Member Functions

def __add__ (self, other)
 
def __div__ (self, other)
 
def __getitem__ (self, key)
 
def __init__ (self, xyz, theTime=None)
 
def __repr__ (self)
 
def __sub__ (self, other)
 
def scale (self, scaleFactor)
 
def tuple (self)
 

Public Attributes

 time
 

Private Attributes

 _measurement
 

Detailed Description

Instances hold one 3-D reading.

Methods:
  [X], [Y], [Z] to obtain respective axis paramters.
  tuple() to obtain x/y/z as a NumPy array.
  +,-,/ to add or subtract readings from each other
      as one vector operation (pairwise for each dimension).

Definition at line 376 of file wiistate.py.

Constructor & Destructor Documentation

◆ __init__()

def wiimote.wiistate.WIIReading.__init__ (   self,
  xyz,
  theTime = None 
)
Create a (possibly) time stamped WII Reading.

Parameter xyz is an array of x,y,z coordinates of the
reading. WIIReading instances can be added, subtracted, and
divided into each other. The operations are pairwise over
x, y, and z. A numpy array of x,y,z is available by
calling tuple(). The time stamp is available via time().

Definition at line 390 of file wiistate.py.

Member Function Documentation

◆ __add__()

def wiimote.wiistate.WIIReading.__add__ (   self,
  other 
)
Adding two readings returns a numpy tuple with readings added pairwise.

Definition at line 421 of file wiistate.py.

◆ __div__()

def wiimote.wiistate.WIIReading.__div__ (   self,
  other 
)
Dividing two readings returns a numpy tuple with components divided pairwise.

Definition at line 431 of file wiistate.py.

◆ __getitem__()

def wiimote.wiistate.WIIReading.__getitem__ (   self,
  key 
)

Definition at line 403 of file wiistate.py.

◆ __repr__()

def wiimote.wiistate.WIIReading.__repr__ (   self)

Definition at line 414 of file wiistate.py.

◆ __sub__()

def wiimote.wiistate.WIIReading.__sub__ (   self,
  other 
)
Subtracting two readings returns a numpy tuple with components subtracted pairwise.

Definition at line 426 of file wiistate.py.

◆ scale()

def wiimote.wiistate.WIIReading.scale (   self,
  scaleFactor 
)
Return a numpy tuple that with X, Y, Z scaled by the given factor.

Definition at line 436 of file wiistate.py.

◆ tuple()

def wiimote.wiistate.WIIReading.tuple (   self)

Definition at line 418 of file wiistate.py.

Member Data Documentation

◆ _measurement

wiimote.wiistate.WIIReading._measurement
private

Definition at line 401 of file wiistate.py.

◆ time

wiimote.wiistate.WIIReading.time

Definition at line 400 of file wiistate.py.


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


wiimote
Author(s): Andreas Paepcke, Melonee Wise, Mark Horn
autogenerated on Thu Dec 5 2024 03:18:13