Metrics
union ATTRIBUTE_LIST_ELEMENT
#include "Attribute.H"
Public Interface
-
-
-
-
-
-
Public Data
DYNAMIC_ITEM* DynamicItem;
-
OBJECT_ATTRIBUTE* ObjectAttribute;
-
class ATTRIBUTE_MESSAGE_INFO
#include "ObjectProxyMessage.H"
Public Interface
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class BASE_ATTRIBUTE
#include "Attribute.H"
Class:BASE_ATTRIBUTE.
Summary: BASE_ATTRIBUTE is the class out of which all attribute classes are derived.
Description: *_ATTRIBUTE are the objects within your SIMOBJ which have the ability to be monitored by other classes through object proxies. These objects are inherently roll backable. You should never use this class directly but should use the derived classes such as INT_ATTRIBUTE, DYNAMIC_ATTRIBUTE, STRING_ATTRIBUTE and so on.
In general, you should treat attribute object just like * you would treat any STATE_* members. They are fully * roll-backable and have the added feature of being * publishable. The two main derived types of the * BASE_ATTRIBUTE class are STATIC_*_ATTRIBUTE and DYNAMIC_*_ATTRIBUTE. STATIC_*_ATTRIBUTE are attributes * that have a single non-time dependent value. DYNAMIC_*_ATTRIBUTE types have values at different * points in time. You can query a STATIC version by simply * asking for its value. For a DYNAMIC type you have to * supply it a time at which you want to know the value.
Examples: The best present examples of the use of these attribute types is in demos/BmdSim. Many of the sim objects in this demo use attribute classes in order to broadcast information. In particular, the RanMot class uses a DYNAMIC_ATTRIBUTE in order to change motion from one great circle to another at given points in time. In the file S_RanMot.C, you can see in the initmotion() method how position (the DYNAMIC_POSITION_ATTRIBUTE) is modified.
Public Interface
-
Method: BASE_ATTRIBUTE()
Summary: Default BASE_ATTRIBUTE constructor.
Description:
Return: a new BASE_ATTRIBUTE
-
Method: ~BASE_ATTRIBUTE()
Summary: BASE_ATTRIBUTE destructor
Description:
Return: none
-
Method: Copy(BASE_ATTRIBUTE *)
Summary: Copies the attribute information from the passed in parameter
onto this.
Description:
Return: void
-
- Method: EmptyMessage Summary: removes updated object proxy info from a message Description: When we receive an update of object proxy info, it comes in a char string that was filled by FillMessage. We extract the appropriate info and update our values. Return: void.
-
- In: buffer containing updated attributes.
-
Method: FillMessage
Summary: packs a message with Object Proxy data
Description: char * is a buffer that is assumed to contain enough
room for the entire info that needs to be sent. This
info is then extracted at the destination using the
EmptyMessage method call.
Return: void
-
- InOut: Buffer to be filled with data.
-
Method: GetArrayIndex()
Summary: Returns the array index
Description:
Return: Returns the array index
-
Method: GetAttributeIndex()
Summary: Returns the attribute index
Description:
Return: Returns the attribute index
-
Method: GetDepth
Summary: Determines the depth in terms of object proxies
Description:
Return: returns the depth in terms of object proxies
-
Method: GetInObjectProxy()
Summary: Returns the InObjectProxy
Description:
Return: Returns the InObjectProxy
-
- Method: GetMessageSize() Summary: Returns the size of the object proxy message size Description: returns the size of the Object Proxy Message size. This is used for packing an object proxy into a message for transmision. For example, a ATTRIBUTE_INT is actually significantly larger than the data that needs to be transmitted (a single int) Return: size of object to be transmitted.
-
- Method: GetSize() Summary: Pure virtual function that returns the size of the attribute Description: Each derived attribute type must implement this method so that that type can be queried as to it's size. The reason this is important is that we may need to send this type to another node and, therefore, need to know it's size so that we can pack the message. Return: the size of the attribute on which this method is called.
-
- Method: GetType() Summary: Pure virtual function that returns the type of attribute Description: Each derived attribute type must implement this method so that that type can be queried as to it's enumerated type.all of these types are enumerated at the top of this header file Return: the type of attribute on which this method is called.
-
virtual char* PackLevelInfo( |
const char* Buff
,
int NlevelInfo
) ; |
- Method: PackLevelInfo Summary: packs level info to be sent to another node Description: packs up the level info buffer that is used for sending updates out to other nodes. It gives the info needed for finding the right object proxy to modify for the attribute Return: pointer to the ProxyLevelInfo with the char * Buff passed in.
- Buff
- InOut: buffer to be packed and sent.
- NlevelInfo
- In: In: Level of the info.
-
-
-
- Method: ScheduleUpdate Summary: Schedules the update of an attribute Description: This is the guts method that actually reflects the update of an attribute type. Many attributes such as INT_ATTRIBUTE can be modified through operator overloading. This overloaded function usually calls ScheduleUpdate to announce the updated values to the other objects and their object proxies through an UpdateAttribute event. This is not a user level function. Return: void.
-
-
-
- InOut: Element to be added/removed from the attribute.
-
Method: SetArrayIndex(int)
Summary: Sets the array index
Description:
Return: void
- i
- In: ArrayIndex is set to this value.
-
Method: SetAttributeIndex(int)
Summary: Sets the attribute index
Description:
Return: void
- i
- In: AttributeIndex is set to this value.
-
Method: SetInObjectProxy(OBJECT_PROXY*)
Summary: Sets the InObjectProxy to the passed value o
Description:
Return:
- o
- In: InObjectProxy is set to this value.
-
- Arrays of children are bad, but we do not have time to change this program to get rid of that problem, so this function is the solution. This function should be defined by all descendents which are in arrays in some part of the program. To delete the array of children call this function on the first element (element index 0).
-
Method: outstream(ostream&)
Summary: prints 0 to the outstream. I don't know if this is still needed
Description:
Return: void
- out
- In: Stream to which we will print.
-
virtual void outstream( |
ostream& out
,
int
) ; |
- Method: outstream(ostream&, int) Summary: Pure virtual for printing an attribute to a stream Description: Each attribute must be printable to a stream. The first parameter is the stream to which we want to print while the second parameter is a "level" of verbosness for which we should print. Return: void.
- out
- In: Stream to which we should print.
-
- In: Verbocity for the printing.
class BASE_DYNAMIC_ATTRIBUTE : public LIST_ATTRIBUTE
#include "Attribute.H"
Class: BASE_DYNAMIC_ATTRIBUTE.
Summary: This is the type from which all dynamic types are derived.
Description: You may have already seen hints of the dynamic type from the list type. A dynamic type is a type which, rather than having a single static value, may have different values at different points in time. For an example, you may have an object that moves on a fixed path such as an elliptical orbit. This path could be represented using an equation of motion which would be a type derived from the BASE_DYNAMIC_ATTRIBUTE type. There are several equations of motion included with SPEEDES along with many other dynamic types.
Examples: There are several uses of the BASE_DYNAMIC_ATTRIBUTE in the classes following the BASE_DYNAMIC_ATTRIBUTE. These include the the DYNAMIC_FLOAT_ATTRIBUTE, DYNAMIC_POSITION_ATTRIBUTE, and the DYNAMIC_LOGICAL_ATTRIBUTE.
Public Interface
-
Method: BASE_DYNAMIC_ATTRIBUTE
Summary: Default constructor of a BASE_DYNAMIC_ATTRIBUTE
Description: The default constructor does nothing other than
instansiate it's members.
Return: a new BASE_DYNAMIC_ATTRIBUTE
-
Method: ~BASE_DYNAMIC_ATTRIBUTE
Summary: Destructor of a BASE_DYNAMIC_ATTRIBUTE
Description: The destructor goes through the list of items, pops
them off and deletes them.
Return: void
-
- Method: operator += (DYNAMIC_ITEM*) Summary: Adds another DYNAMIC_ITEM to the list Description: This schedules an update for all of the object proxies and then pushes the passed in DYANIC_ITEM onto the bottom of the list. It then returns the item. You should make sure to pass this function something that was returned from FreeDynamicAttributes->new_object Return: Adds another DYNAMIC_ITEM to the list.
- v
- In: Item to be added to the list.
-
Method: operator -=(void *)
Summary: Remove an item from the list
Description: Removes an item from the list, schedules an update
for the object proxies and then pushes this item
back on the free list.
Return: void
- v
- In: Item to be removed from the list.
-
Method: Copy(BASE_ATTRIBUTE*)
Summary: Copies the passed in BASE_ATTRIBUTE over this object
Description: This casts the passed in attribute to an object
attribute, memcpy's it over our attribute, and
clones it's object proxy.
Return:
- a
- In: Object to be copied over this.
-
Method: EmptyMessage
Summary: Extracts the DYNAMIC_ITEM list from the buffer and
inserts it into our item.
Description: Once we have been told about a
BASE_DYNAMIC_ATTRIBUTE type, we can extract it using
this call.
Return: void
- buff
- In: Buffer containg dynamic items.
-
- Method: FillMessage Summary: Fills the buffer with the list of dynamic items Description: After you find out how much message is required to send this attribute from one node to another, you can construct that buffer and provide it here. The second argument is the index of this attribute. Return: void.
- buff
- InOut: Buffer to contain the message.
-
- Method: FindDynamicItem(double) Summary: Returns the DYNAMIC_ITEM first valid for the given time. Description: Since the BASE_DYNAMIC_ATTRIBUTE class inherits from the LIST_ATTRIBUTE type, it has a list which can store a variety of DYNAMIC_ATTRIBUTEs. Each of these attributes has a start time and an end time. These are the times for which a dynamic item is considered to be valid and this returns the one that is valid for the passed in time. If there is no item in the list that is valid for the passed in time, an error message is printed and NULL is returned. Be careful to pass in a double value! Otherwise, this method could get confused with the method FindDynamicItem(int) which performs a different service. Return: DYNAMIC_ITEM valid for that time or NULL if it does not exist.
- t
- In: Time for which you want to find the valid DYNAMIC_ITEM.
-
- Method: FindDynamicItem(int) Summary: Finds the item with the given id. Description: Just as you can search on time in the list in the BASE_DYNAMIC_ATTRIBUTE class, you can also search on the integer id of the items in that list. This returns the item matching the passed in ID or, if that item is not in the list, prints an error message and returns NULL. Return: DYNAMIC_ITEM matching the passed ID or NULL if it does not exist.
- i
- In: ID of the item you want to find in the list.
-
- Method: GetEndTime() Summary: Returns the last time for which any item in the list is valid Description: If you want to find the latest that anything in the list may be valid, this is the method to use. Return: Returns the last time for which any item in the list is valid.
-
- Method: GetMessageSize Summary: Returns the size of message required to contain this type Description: If a BASE_DYNAMIC_ATTRIBUTE needs to be sent to another node, this routine returns the size of message required to contain this particular instance Return: Returns the size of message required to contain this type.
-
Method: GetSize()
Summary: Returns the size of this class
Description: Returns the size of this class
Return: Returns the size of this class
-
- Method: GetStartTime() Summary: Returns the first time for which any item in the list is valid Description: If you want to find the earliest time that anything in the list may be valid, this is the method to use. Return: Returns the first time for which any item in the list is valid.
-
- Method: GetTimeInterval(double &startTime, double &endTime) Summary: Returns the start time and end time for the dynamic attribute Description: Finds the start and end times for the dynamic attribute. Return: start and end times.
-
void GetTimeInterval( |
double time
,
double& startTime
,
double& endTime
) ; |
- Method: GetTimeInterval(double time, double &startTime, double &endTime) Summary: Returns the start time and end time for the segment in the dynamic attribute Description: Finds the segment in the dynamic attribute that is bounded by the time argument passed in and then returns the start and end times of the segment. Return: start and end times for the segment.
-
- Method: GetType Summary: Returns the type of this class: -1 since it should never be used Description: Returns the type of this class. Since this class should only be used to build other classes it returns the value -1. Return: Returns the type of this class: -1 since it should never be used.
-
virtual void outstream( |
ostream& out
,
int level
) ; |
- Method: outstream(ostream &,int) Summary: Prints the class to the passed in stream Description: Since the BASE_DYNAMIC_ATTRIBUTE type is a list of DYNAMIC_ITEM types, it goes to each item in the list and prints the triplet [type,start_time,end_time]. The second argument tells how many items to print per line. Return: void.
#include "CircularOrbit.H"
Public Interface
-
-
-
virtual void operator()( |
double t
,
int PT
,
double X [ 3 ]
) ; |
-
-
virtual void operator()( |
double
,
int
,
double [ 3 ]
,
double [ 3 ]
) ; |
-
-
virtual void operator()( |
double
,
int
,
double [ 3 ]
,
double [ 3 ]
,
double [ 3 ]
) ; |
-
-
-
-
-
-
void init( |
double I
,
double A
,
double Altitude
,
double P
,
double Time
) ; |
-
class C_DOUBLE
#include "matrix_equation.H"
...... Precision checking definitions.
Public Interface
Public Data
BIG_FLOAT* ptr;
-
BIG_FLOAT value;
-
#include "ObjectProxyMessage.H"
class DYNAMIC_COMPLEX_EXPONENTIAL : public DYNAMIC_FLOAT_ITEM
#include "DynamicObjects.H"
Class: DYNAMIC_COMPLEX_EXPONENTIAL.
Summary: This is a dynamic position type in one variable. The specific type is an complex exponential.
Description: This yeilds an equation of motion in one dimension that follows the path of a complex exponential. A complex exponential is of the form:
Y = a*e^(i*Omega(t-t0)).
Where a is an amplitude, omega is a parameter, t0 is the initial time, t is the value at which we are evaluating, and i and e are the standard matheamtical constants square root(-1) and 2.718281828...
An interesting result of this is that.
A*e^(i*Omega(t-t0)) = a(cos(Omega(t-t0)) +isin(Omega(t-t0))).
So, if RealFlag is set through the method SetRealFlag(), we return the real portion of the equation a*cos(Omega(t-t0)) and, otherwise, we return the imaginary portion a*sin(Omega(t-t0).
A mathematical curiosity that arises from these equations is knows as Euler's formula: e^(i*pi)-1=0. This equation is significant since it involves the 5 most important numbers in all of mathematics in a single short equation.
Examples:
Public Interface
-
- Method: DYNAMIC_COMPLEX_EXPONENTIAL Summary: Default constructor for a DYNAMIC_COMPLEX_EXPONENTIAL Description: The default constructor sets the RealFlag to 1, amplitude to 0, the angle parameter to 0, and the offset (t0) to 0 Return: a new DYNAMIC_COMPLEX_EXPONENTIAL.
-
- Method: operator()(double) Summary: returns the value of the equation at the passed in time Description: If the real flag is set, this returns a(cos(omega(t-t0))) and returns a(sin(omega(t-t0))) otherwise. Return: returns the value of the equation at the passed in time.
- t
- In: Time at which to evaluate the equation.
-
virtual double operator()( |
double t
,
double& V
) ; |
- Method: operator ()(double, double &) Summary: returns the value of the equation at the passed in time Description: If the real flag is set, this returns a(cos(omega(t-t0))) and returns a(sin(omega(t-t0))) otherwise. The second parameter is then filled with the value of the first derivative (the velocity) in the apropriate real or imaginary mode Return: returns the value of the equation at the passed in time.
- t
- In: Time at which to evaluate the equation.
- V
- Out: Value of the derivative.
-
virtual double operator()( |
double t
,
double& V
,
double& A
) ; |
- Method: operator ()(double, double &, double &) Summary: returns the value of the equation at the passed in time Description: If the real flag is set, this returns a(cos(omega(t-t0))) and returns a(sin(omega(t-t0))) otherwise. The second and third parameters are then filled with the value of the first dand second derivative (the velocity and acceleration) in the apropriate real or imaginary mode Return: returns the value of the equation at the passed in time.
- t
- In: Time at which to evaluate the equation.
- V
- Out: Value of the derivative.
- A
- Out: Value of the second derivative.
-
Method: GetAmplitude()
Summary: returns the amplitude
Description: returns the amplitude
Return: returns the amplitude
-
- Method:GetFrequency() Summary: Returns the frequency of the function Description: Returns the frequency of the function Return: Returns the frequency of the function.
-
- Method: GetOmega() Summary: Returns the value of the angle parameter Description: Returns the value of the angle parameter Return: Returns the value of the angle parameter.
-
- Method: GetPeriod() Summary: Returns the period of the function Description: Returns the period of the function Return: Returns the period of the function.
-
- Method: GetRealFlag() Summary: Returns the state of the real flag Description: Returns the state of the real flag Return: Returns the state of the real flag (1==real, 0==imaginary).
-
- Method: GetTimeOffset() Summary: Returns the value of the time offset. Description: Returns the value of the time offset. Return: Returns the value of the time offset.
-
- Method: GetType() Summary: Returns the type of this DYNAMIC_ITEM Description: Returns the type of this DYNAMIC_ITEM Return: Returns the type of this DYNAMIC_ITEM.
-
void Set( |
double a
,
double o
,
double t
) ; |
- Method: Set(double, double, double) Summary: Initializes the amplitude, angle parameter, and offset Description: Initializes the amplitude, angle parameter, and offset Return: void.
- a
- In: The new amplitude for this equation.
- o
- In: The new angle paramter (Omega) for this equation.
- t
- In: The new offset (t0) for this equation.
-
- Method: SetAmplitude(double) Summary: Sets the amplitude to the passed in value Description: Sets the amplitude to the passed in value Return: void.
- a
- In: New value for the amplitude.
-
Method: SetFrequency(double)
Summary: Sets the angle parameter to match the passed in frequency
Description:
Return:
- f
- In: Desired frequency.
-
Method: SetImag()
Summary: Sets the realflag to 0
Description: When the real flag is unset, only the imgainary portion
of the result is returned
Return: void
-
Method: SetOmega(double)
Summary: Sets the value of the angle parameter
Description: Sets the value of the angle parameter
Return: void
- o
- In: New value for Omega.
-
Method: SetPeriod(double)
Summary: Sets the angle parameter to match the passed in period
Description: Sets the angle parameter to match the passed in
Return: void
- t
- In: Desired period.
-
Method: SetReal()
Summary: Sets the real flag to 1
Description: When the real flag is set, only the real portion of the
result is returned
Return: void
-
- Method: SetTimeOffset(double) Summary: Sets the value for the time offset. Description: Sets the value for the time offset. Return: void.
- t
- In: New value of the time offset.
#include "DynamicObjects.H"
Class: DYNAMIC_EXPONENTIAL.
Summary: A univariate exponential equation of motion.
Description: This yields an equation of motion in one dimension that follows the path of an exponential. The exact equation that is uses is y=a*e^(L*(t-StartTime)) where a, L, and StartTime are constants and e is the number 2.718281828.... A is the amplitude, L is just a constant multiplier of the variable (it can be thought of as a horizontal stretch/shrinking of the graph), and t0 is a phase shift (horizontal shift) of the function.
Examples:
Public Interface
-
- Method: DYNAMIC_EXPONENTIAL() Summary: Default constructor of a DYNAMIC_EXPONENTIAL Description: The default constructor sets the amplitude to 0 and the multiplier to 1. The amplitude being 0 essentially means that this is now the zero function Return: returns a new DYNAMIC_EXPONENTIAL equation.
-
- Method: operator () (double) Summary: Returns the value of the equation at the given time Description: Returns the value of the equation at the given time Return: Returns the value of the equation at the given time.
- t
- In: Time at which the value of the function is desired.
-
virtual double operator()( |
double t
,
double& V
) ; |
- Method: operator () (double, double &) Summary: Returns the value of the equation at the given time Description: In addition to the value of the function, the second parameter is filled in with the value of the first derivative (the velocity) of the function. Return: Returns the value of the equation at the given time.
- t
- In: Time at which the value of the function is desired.
- V
- Out: Value of the derivative.
-
virtual double operator()( |
double t
,
double& V
,
double& A
) ; |
- Method: operator () (double, double &, double &) Summary: Returns the value of the equation at the given time Description: In addition to the value of the function, the second parameter is filled in with the value of the first derivative (the velocity) of the function and the third parameter is filled in with the second derivative (the acceleration) of the function Return: Returns the value of the equation at the given time.
- t
- In: Time at which the value of the function is desired.
- V
- Out: Value of the derivative.
- A
- Out: Value of the second derivative.
-
- Method: GetAmplitude() Summary: Returns the current value for the amplitude Description: Returns the current value for the amplitude Return: Returns the current value for the amplitude.
-
- Method: GetLambda() Summary: Returns the current value of Lambda (the constant multiplier) Description: Returns the current value of Lambda (the constant multiplier) Return: Returns the current value of Lambda (the constant multiplier).
-
- Method: GetTimeConstant() Summary: Returns the value of t for which the equation returns Amplitude Description: If you want to find out when the graph crosses the horizonal line y=Amplitude, call this method. Return: Returns the value of t for which the equation returns Amplitude.
-
- Method: GetType() Summary: Returns a char * string of the type of this item Description: Returns a char * string of the type of this item Return: Returns a char * string of the type of this item.
-
- Method: SetAmplitude(double) Summary: Sets the amplitude to the passed in value Description: Sets the amplitude to the passed in value Return: Sets the amplitude to the passed in value.
- a
- In: desired value for the amplitude.
-
- Method: SetLambda(double) Summary: Sets the value of the constant multiplier Description: Sets the value of the constant multiplier. Values >1 shrink the graph horizontally, values between 0 and 1 expand the graph horizontally. Values less than 0 have the same effect as their positive counterparts with the additional affect of flipping the graph about the y axis Return: Sets the value of the constant multiplier.
- l
- In: Desired value for the constant multiplier.
-
Method: SetTimeConstant()
Summary: Sets lambda so that the value of the equation at the
passed in time is the amplitude
Description: If you want to make sure that the graph passes
through the point (t, Amplitude), pass in the
desired value of t here.
Return: void
#include "Attribute.H"
Class: DYNAMIC_FLOAT_ATTRIBUTE.
Summary: A time dependant attribute double/float type.
Description: If you want to have a double or float type that has dynamic value (values that change over time), then this is the correct type to use. Unlike the STATIC_FLOAT_ATTRIBUTE, it is not a drop in replacement for a normal double or float. That is because the accessors for dynamic types require that you provide a time at which you want the value.
Examples: None of the demo code currently has examples of the use of this type.
Public Interface
-
- Method: DYNAMIC_FLOAT_ATTRIBUTE() Summary: Default constructor for a DYNAMIC_FLOAT_ATTRIBUTE Description: The default constructor simply instantiates the members which means that the list of values is empty Return:
-
- Method: operator () (double) Summary: Returns the value of this attribute at the passed in time. Description: When you want to find the value of any dynamic type, you need to provide SPEEDES with the time at which you want the value. This attribute return the value -INFINITY if you request a value for which there is not a valid time. Be warned that this is a valid number and you need to check if it makes sense in your situation. We hope to remedy this in the future by adding a global variable that can be checked for an error condition if -INFINITY is returned. Return: the value of the variable at the passed in time or -INFINITY if the time is invalid.
- t
- In: The time for which you want the value of this dynamic float.
-
Method: operator () (double, double &)
Summary: DO NOT USE
Description: DO NOT USE
Return: -1
-
double operator()( |
double t
,
double& V
,
double& A
) ; |
Method: operator () (double, double &, double &)
Summary: DO NOT USE
Description: DO NOT USE
Return: -1
-
- Method: GetSize() Summary: Returns the size of a DYNAMIC_FLOAT_ATTRIBUTE Description: Returns the size of a DYNAMIC_FLOAT_ATTRIBUTE Return: Returns the size of a DYNAMIC_FLOAT_ATTRIBUTE.
-
- Method: GetType() Summary: Returns the type of this attribute: DYNAMIC_FLOAT_ATTRIBUTE_TYPE Description: Each type is enumerated so we can properly find them and the enumeration can be found at the top of Attribute.H. Return: Returns the type of this attribute: DYNAMIC_FLOAT_ATTRIBUTE_TYPE.
-
- Method: GetValue(double) Summary: Returns the value of this attribute at the passed in time. Description: When you want to find the value of any dynamic type, you need to provide SPEEDES with the time at which you want the value. This attribute return the value -INFINITY if you request a value for which there is not a valid time. Be warned that this is a valid number and you need to check if it makes sense in your situation. We hope to remedy this in the future by adding a global variable that can be checked for an error condition if -INFINITY is returned. Return: the value of the variable at the passed in time or -INFINITY if the time is invalid.
- t
- In: The time for which you want the value of this dynamic float.
class DYNAMIC_FLOAT_CONSTANT : public DYNAMIC_FLOAT_ITEM
#include "DynamicObjects.H"
Class: DYNAMIC_FLOAT_CONSTANT.
Summary: A dynamic float value.
Description: This could be very useful for functions that are constant over periods of time (such as a step function). This could be imitated using other functions but the best way is just to use a DYNAMIC_FLOAT_CONSTANT.
Examples:
Public Interface
-
Method: DYNAMIC_FLOAT_CONSTANT()
Summary: Default constructor for a DYNAMIC_FLOAT_CONSTANT
Description: Default constructor sets the value of the constant to 0
Return: a new DYNAMIC_FLOAT_CONSTANT
-
- Method: operator () (double) Summary: Returns the value of the constant Description: Returns the value of the constant Return: Returns the value of the constant.
-
Method: operator () (double, double&)
Summary:Returns the value of the constant
Description: The first derivative is 0 so the second parameter is
set to 0
Return: Returns the value of the constant
-
-
- V
- Out: Set to 0.
-
virtual double operator()( |
double
,
double& V
,
double& A
) ; |
- Method: operator () (double, double&, double&) Summary: Returns the value of the constant Description: The first and second derivatives are 0 so the second and third parameters are set to 0 Return: Returns the value of the constant.
-
-
- V
- Out: Set to 0.
- A
- Out: Set to 0.
-
- Method: GetType() Summary: Returns a char * string of the type of this item Description: Returns a char * string of the type of this item Return: Returns a char * string of the type of this item.
-
Method: Set(double)
Summary: Sets the value of the constant to the passed in value
Description: Sets the value of the constant to the passed in value
Return: void
- v
- In: Desired value for the constant.
class DYNAMIC_FLOAT_ITEM : public DYNAMIC_ITEM
#include "DynamicItem.H"
Class: DYNAMIC_FLOAT_ITEM.
Summary: Intermediary class used in the development of the DYNAMIC_FLOAT_CONSTANT class.
Description: Intermediary class used in the development of the DYNAMIC_FLOAT_CONSTANT class. This class is never directly used and only derived versions of this class are used by SPEEDES.
Examples:DYNAMIC_FLOAT_CONSTANT class in DynamicObjects.H.
Public Interface
-
Method: operator () (double)
Summary: Should not be called
Description: Should be overridden to return value.
Return: double
-
virtual double operator()( |
double
,
double&
) = 0; |
- Method: operator () (double, double &) Summary: Should not be called Description: Should be overridden to return value. Return: double.
-
virtual double operator()( |
double
,
double&
,
double&
) = 0; |
- Method: operator () (double, double &, double &) Summary: Should not be called Description: Should be overridden to return value. Return: -1.
#include "Attribute.H"
Class: DYNAMIC_INT_ATTRIBUTE.
Summary: A time dependant attribute integer type.
Description: If you want to have an integer type that has dynamic value (values that change over time), then this is the correct type to use. Unlike the STATIC_INT_ATTRIBUTE, it is not a drop in replacement for a normal integer. That is because the accessors for dynamic types require that you provide a time at which you want the value.
Examples: None of the demo code currently has examples of the use of this type.
Public Interface
-
Method: DYNAMIC_INT_ATTRIBUTE()
Summary: Default constructor for a DYNAMIC_INT_ATTRIBUTE
Description: The default constructor simply instantiates the
member variables which means that the list of values
is empty.
Return: a new DYNAMIC_INT_ATTRIBUTE
-
- Method: operator () (double) Summary: Returns the value of this attribute at the passed in time. Description: When you want to find the value of any dynamic type, you need to provide SPEEDES with the time at which you want the value. This attribute return the value -1 if you request a value for which there is not a valid time. Be warned that this is a valid number and you need to check if it makes sense in your situation. We hope to remedy this in the future by adding a global variable that can be checked for an error condition if -1 is returned. Return: the value of the variable at the passed in time or -1 if the time is invalid.
- t
- In: The time for which you want the value of this dynamic integer.
-
- Method: operator () (double, int &) Summary: Returns the value of this attribute at the passed in time. Description: This operator is identical to that of operator () (double) except that the second parameter is set to 0. Return: the value of the variable at the passed in time or -1 if the time is invalid.
- t
- In: The time for which you want the value of this dynamic integer.
- V
- Out: Value is set to zero.
-
int operator()( |
double t
,
dynamic integer. int& V
,
int& A
) ; |
- Method: operator () (double, int &, int &) Summary: Returns the value of this attribute at the passed in time. Description: This operator is identical to that of operator () (double) except that the second and third parameters are set to 0. Return: the value of the variable at the passed in time or -1 if the time is invalid.
- t
- In: The time for which you want the value of this dynamic integer.
- V
- Out: Value is set to zero.
- A
- Out: Value is set to zero.
-
- Method: GetSize() Summary: Returns the size of a DYNAMIC_INT_ATTRIBUTE Description: Returns the size of a DYNAMIC_INT_ATTRIBUTE Return: Returns the size of a DYNAMIC_INT_ATTRIBUTE.
-
- Method: GetType() Summary: Returns the type of this attribute: DYNAMIC_INT_ATTRIBUTE_TYPE Description: Each type is enumerated so we can properly find them and the enumeration can be found at the top of Attribute.H. Return: Returns the type of this attribute: DYNAMIC_INT_ATTRIBUTE_TYPE.
-
- Method: GetValue(double) Summary: Returns the value of this attribute at the passed in time. Description: When you want to find the value of any dynamic type, you need to provide SPEEDES with the time at which you want the value. This attribute return the value -1 if you request a value for which there is not a valid time. Be warned that this is a valid number and you need to check if it makes sense in your situation. We hope to remedy this in the future by adding a global variable that can be checked for an error condition if -1 is returned. Return: the value of the variable at the passed in time or -1 if the time is invalid.
- t
- In: The time for which you want the value of this dynamic integer.
class DYNAMIC_INT_CONSTANT : public DYNAMIC_INT_ITEM
#include "DynamicObjects.H"
Class: DYNAMIC_INT_CONSTANT.
Summary: A dynamic integer value.
Description: If you have integer values that you know are going to change over time and you know those values and times in advance, this provides the perfect data type for storing those values.
Examples:
Public Interface
-
- Method: DYNAMIC_INT_CONSTANT() Summary: Default constructor for a DYNAMIC_INT_CONSTANT Description: Default constructor sets the value to 0. Return:
-
Method: operator = (int)
Summary: overloaded assignment operator that simply assigns a value
Description: The equals operator has been overloaded so that you can
treat this type just like a normal integer.
Return: the new value
- v
- In: New value for the DYNAMIC_INT_CONSTANT.
-
Method: operator () (double)
Summary: Normally used to return value at a specific time but
this is a constant.
Description: Normally, one can ask for the value of a DYNAMIC_
at a specific point in time. Since a
DYNAMIC_INT_CONSTANT is constant, this simply
returns the value.
Return: The value of the DYNAMIC_INT_CONSTANT
-
- Method: GetType() Summary: Returns a char * string of the type of this item Description: Returns a char * string of the type of this item Return: Returns a char * string of the type of this item.
-
Method: Set()
Summary: Assigns the DYNAMIC_INT_CONSTANT a new value
Description: If you don't like overator overloading, you can use the
Set method rather than just assignment
Return: void
- v
- In: New value for the DYNAMIC_INT_CONSTANT.
class DYNAMIC_INT_ITEM : public DYNAMIC_ITEM
#include "DynamicItem.H"
Class: DYNAMIC_INT_ITEM.
Summary: DYNAMIC_INT_ITEM is an intermediate class used to define a dynamic integer attribute.
Description: DYNAMIC_INT_ITEM is an intermediate class used to define a dynamic integer attribute.
Examples: DYNAMIC_INT_ITEM is used as a base class for the DYNAMIC_INT_CONSTANT class defined in DynamicObjects.H.
Public Interface
-
Method: operater () (double)
Summary: Should not be called.
Description: Should be overridden to return value.
Return: int
class DYNAMIC_ITEM : public C_ITEM
#include "DynamicItem.H"
Class: DYNAMIC_ITEM.
Summary: The base type of types that are stored in DYNAMIC_ATTRIBUTEs.
Description: A Dynamic attribute is essentially a list of DYNAMIC_ITEM's and children of this class. For some of these objects, it will be obvious how they work. For others, such as the DYNAMIC_POSITION_ITEM, things are a bit more involved. You are free to develop your own classes and then create DYNAMIC_ATTRIBUTEs for those classes. Just make sure they work the way you expect them to work!.
Note that even the direct descendents of this type are not used directly by SPEEDES. We further derive classes (some described in DynamicObjects.H which are many of the classes that are actually used to build the DYNAMIC_ATTRIBUTEs. These classes are the DYNAMIC_FLOAT_CONSTANT, DYNAMIC_LOGICAL_CONSTANT and the DYNAMIC_LOGICAL_CONSTANT along with many specific types of dynamic motions.
Examples: DYNAMIC_ITEM is used in the following classes such as DYNAMIC_INT_ATTRIBUTE and DYNAMIC_POSITION_ITEM.
Public Interface
-
- Method: DYNAMIC_ITEM Summary: default constructor for a DYNAMIC_ITEM Description: The default constructor initializes the start time and end timeto -1.0e20 (number commonly used as INFINITY in SPEEDES), sets the CountId to Counter, and increments Counter. Counter is a static member that keeps track of each DYNAMIC_ITEM that is created and how many of these items there are. Return: A new DYNAMIC_ITEM.
-
- Method: GetCountId() Summary: returns the value of the CountId for this object Description: The value of the CountID is used within the object proxies for updating values. Each object has a unique ID (assuming there are less than MAX_INT DYNAMIC_ITMEs) and this allows us to know which item needs to be removed from the list in the DYNAMIC_ATTRIBUTE class Return: The value of the CountId for this item.
-
- Method: GetEndTime() Summary: Returns the time at which this item stops being valid Description: Each dynamic item is valid for a given amount of time. If you think of an item such as the inventory of a company, the number of items in their inventory changes and each value is valid only for a given interval of time (although this value may repeat). This method returns the end time for the interval in which the attribute is valid. Return: The time at which this item stops being valid.
-
- Method: GetSize() Summary: Returns the size of a DYNAMIC_ITEM Description: Since these types and their derived classes are generally used in object proxies, We need to be able to find their size so that we can send them from one node to another as an update for the other proxy. Return: size of a DYNAMIC_ITEM.
-
- Method: GetStartTime() Summary: Returns the time this attribute becomes valid Description: Each dynamic item is valid for a given amount of time. If you think of an item such as the inventory of a company, the number of items in their inventory changes and each value is valid only for a given interval of time (although this value may repeat). This method returns the start time for the interval in which the attribute is valid. Return: The time at which this item becomes valid.
-
- Method: GetType() Summary: Returns a char * corresponding to the type of this item Description: Returns a char * corresponding to the type of this item. This string needs to be unique for each class so a good choice is the name of the class. Return: Returns a char * corresponding to the type of this item.
-
- Method: GoodTime(double) Summary: Returns 1 if passed in time is valid for this item. O otherwise Description: Each dynamic item is valid for a given amount of time. If you think of an item such as the inventory of a company, the number of items in their inventory changes and each value is valid only for a given interval of time (although this value may repeat). This method is used to check if a given item is valid for a given point in time. Return: Returns 1 if passed in time is valid for this item. O otherwise.
-
- Method: SetEndTime(double) Summary: Sets the end time for this dynamic item Description: Each dynamic item is valid for a given amount of time. If you think of an item such as the inventory of a company, the number of items in their inventory changes and each value is valid only for a given interval of time (although this value may repeat). This method sets the end time for the interval in which the attribute is valid. Return: void.
- e
- In: Time for which this item stops being valid.
-
- Method: SetStartTime(double) Summary: Sets the start time for a dynamic item. Description: Each dynamic item is valid for a given amount of time. If you think of an item such as the inventory of a company, the number of items in their inventory changes and each value is valid only for a given interval of time (although this value may repeat). This method sets the initial time for the interval in which the attribute is valid. Return: void.
- s
- In: Time for which this item becomes valid.
#include "Attribute.H"
Class: DYNAMIC_LOGICAL_ATTRIBUTE.
Summary: A time dependant attribute integer type.
Description: If you want to have an boolean type that has dynamic value (values that change over time), then this is the correct type to use. Unlike the STATIC_LOGICAL_ATTRIBUTE, it is not a drop in replacement for a normal boolean. That is because the accessors for dynamic types require that you provide a time at which you want the value.
Examples: None of the demo code currently has examples of the use of this type.
Public Interface
-
Method: DYNAMIC_LOGICAL_ATTRIBUTE()
Summary: Default constructor for a DYNAMIC_LOGICAL_ATTRIBUTE
Description: The default constructor simply instantiates the
member variables which means that the list of values
is empty.
Return: a new DYNAMIC_LOGICAL_ATTRIBUTE
-
- Method: GetValue(double) Summary: Returns the value of this attribute at the passed in time. Description: When you want to find the value of any dynamic type, you need to provide SPEEDES with the time at which you want the value. This attribute return the value -1 if you request a value for which there is not a valid time. Be warned that this is a valid number and you need to check if it makes sense in your situation. We hope to remedy this in the future by adding a global variable that can be checked for an error condition if -1 is returned. Return: the value of the variable at the passed in time or -1 if the time is invalid.
- t
- In: The time for which you want the value of this dynamic integer.
-
- Method: operator () (double, int &) Summary: Returns the value of this attribute at the passed in time. Description: This operator is identical to that of operator () (double) except that the second parameter is set to 0. Return: the value of the variable at the passed in time or -1 if the time is invalid.
- t
- In: The time for which you want the value of this dynamic integer.
- V
- Out: Value is set to zero.
-
- Method: operator () (double, int &, int &) Summary: Returns the value of this attribute at the passed in time. Description: This operator is identical to that of operator () (double) except that the second and third parameters are set to 0. Return: the value of the variable at the passed in time or -1 if the time is invalid.
- t
- In: The time for which you want the value of this dynamic integer.
- V
- Out: Value is set to zero.
- A
- Out: Value is set to zero.
-
- Method: GetSize() Summary: Returns the size of a DYNAMIC_LOGICAL_ATTRIBUTE Description: Returns the size of a DYNAMIC_LOGICAL_ATTRIBUTE Return: Returns the size of a DYNAMIC_LOGICAL_ATTRIBUTE.
-
- Method: GetType() Summary: Returns the type of this attribute: DYNAMIC_LOGICAL_ATTRIBUTE_TYPE Description: Each type is enumerated so we can properly find them and the enumeration can be found at the top of Attribute.H. Return: Returns the type of this attribute: DYNAMIC_LOGICAL_ATTRIBUTE_TYPE.
-
-
#include "DynamicObjects.H"
Class: DYNAMIC_LOGICAL_CONSTANT.
Summary: A dynamically changing logical constant.
Description: If you know your object will have predetermined values of true or false, you could put all of them in a big list and then use this to hold each of their values.
Examples:
Public Interface
-
Method: DYNAMIC_LOGICAL_CONSTANT()
Summary: default constructor
Description: The default constructor initializes the value to 0 (FALSE)
Return: a new DYNAMIC_LOGICAL_CONSTANT
-
- Method: operator = (int) Summary: overloaded assignment assigns a new value Description: This makes a DYNAMIC_LOGICAL_CONSTANT act just like a logical for assignment since you can just assign it an integer value Return: The new value of the DYNAMIC_LOGICAL_CONSTANT.
- v
- In: New value for the DYNAMIC_LOGICAL_CONSTANT.
-
Method: operator () (double)
Summary: Normally used to return value at a specific time but
this is a constant.
Description: Normally, one can ask for the value of a DYNAMIC_
at a specific point in time. Since a
DYNAMIC_LOGICAL_CONSTANT is constant, this simply
returns the value.
Return: The value of the DYNAMIC_LOGICAL_CONSTANT
-
- Method: GetType() Summary: Returns a char * string of the type of this item Description: Returns a char * string of the type of this item Return: Returns a char * string of the type of this item.
-
Method: Set(int)
Summary: Assigns a new value to this DYNAMIC_LOGICAL_CONSTANT
Description: If you don't like operator overloading (using the =
operator, you can use this method to assign a new
value.
Return: void
- v
- In: New value for the DYNAMIC_LOGICAL_CONSTANT.
class DYNAMIC_LOGICAL_ITEM : public DYNAMIC_ITEM
#include "DynamicItem.H"
Class: DYNAMIC_LOGICAL_ITEM.
Summary: The DYNAMIC_LOGICAL_ITEM type is an intermediary class for the DYNAMIC_LOGICAL_CONSTANT.
Description: The DYNAMIC_LOGICAL_ITEM type is an intermediary class for the DYNAMIC_LOGICAL_CONSTANT.
Examples: DYNAMIC_LOGICAL_CONSTANT in DynamicObjects.H.
Public Interface
-
Method: operator() (double)
Summary: Used to return hte value of the logical at a point in time
Description: Should not be called.
Return: -1
#include "Attribute.H"
DYNAMIC_OBJECT_ATTRIBUTE.
Public Interface
-
Method: DYNAMIC_OBJECT_ATTRIBUTE()
Summary: Default constructor for a DYNAMIC_OBJECT_ATTRIBUTE
Description: The default constructor simply instantiates the
member variables which means that the list of values
is empty.
Return: a new DYNAMIC_OBJECT_ATTRIBUTE
-
- Method: operator () (double) Summary: Returns the value of this attribute at the passed in time. Description: When you want to find the value of any dynamic type, you need to provide SPEEDES with the time at which you want the value. This attribute return the value NULL if you request a value for which there is not a valid time. Return: the value of the variable at the passed in time or NULL if the time is invalid.
-
- Method: GetSize() Summary: Returns the size of a DYNAMIC_OBJECT_ATTRIBUTE Description: Returns the size of a DYNAMIC_OBJECT_ATTRIBUTE Return: Returns the size of a DYNAMIC_OBJECT_ATTRIBUTE.
-
- Method: GetType() Summary: Returns the type of this attribute: DYNAMIC_OBJECT_ATTRIBUTE_TYPE Description: Each type is enumerated so we can properly find them and the enumeration can be found at the top of Attribute.H. Return: Returns the type of this attribute: DYNAMIC_OBJECT_ATTRIBUTE_TYPE.
-
- Method: GetValue(double) Summary: Returns the value of this attribute at the passed in time. Description: When you want to find the value of any dynamic type, you need to provide SPEEDES with the time at which you want the value. This attribute return the value NULL if you request a value for which there is not a valid time. Return: the value of the variable at the passed in time or NULL if the time is invalid.
class DYNAMIC_POLY_1 : public DYNAMIC_POLY_N
#include "DynamicObjects.H"
Class: DYNAMIC_POLY_1.
Summary: A dynamic motion type that is a line.
Description: This give a dynamic motion type that consists of simply a straight line. You just use the AddPoints() method to add at least two points and then a best fit to the given data will be computed for you.
Examples:
Public Interface
-
- Method: GetCoeff() Summary: Returns the coefficients of the polynomial Description: Returns the coefficients of the polynomial Return: Returns the coefficients of the polynomial.
-
- Method: GetDim() Summary: Returns the degree of the polynomial Description: Returns the degree of the polynomial Return: Returns the degree of the polynomial.
-
- Method: GetType() Summary: Returns a char * string of the type of this item Description: Returns a char * string of the type of this item Return: Returns a char * string of the type of this item.
class DYNAMIC_POLY_10 : public DYNAMIC_POLY_N
#include "DynamicObjects.H"
Class: DYNAMIC_POLY_10.
Summary:Dynamic motion of type tenth polynomial.
Description: This give a dynamic motion type that consists of simply a tenth degree polynomial. You just use the AddPoints() method to add at least eleven points and then a best fit to the given data will be computed for you.
Examples:
Public Interface
-
- Method: GetCoeff() Summary: Returns the coefficients of the polynomial Description: Returns the coefficients of the polynomial Return: Returns the coefficients of the polynomial.
-
- Method: GetDim() Summary: Returns the degree of the polynomial Description: Returns the degree of the polynomial Return: Returns the degree of the polynomial.
-
- Method: GetType() Summary: Returns a char * string of the type of this item Description: Returns a char * string of the type of this item Return: Returns a char * string of the type of this item.
class DYNAMIC_POLY_2 : public DYNAMIC_POLY_N
#include "DynamicObjects.H"
Class: DYNAMIC_POLY_2.
Summary: Dynamic motion of type quadratic polynomial.
Description: This give a dynamic motion type that consists of simply a quadratic (a parabola). You just use the AddPoints() method to add at least three points and then a best fit to the given data will be computed for you.
Examples:
Public Interface
-
- Method: GetCoeff() Summary: Returns the coefficients of the polynomial Description: Returns the coefficients of the polynomial Return: Returns the coefficients of the polynomial.
-
- Method: GetDim() Summary: Returns the degree of the polynomial Description: Returns the degree of the polynomial Return: Returns the degree of the polynomial.
-
- Method: GetType() Summary: Returns a char * string of the type of this item Description: Returns a char * string of the type of this item Return: Returns a char * string of the type of this item.
class DYNAMIC_POLY_3 : public DYNAMIC_POLY_N
#include "DynamicObjects.H"
Class: DYNAMIC_POLY_3.
Summary: Dynamic motion of type cubic polynomial.
Description: This give a dynamic motion type that consists of simply a cubic polynomial. You just use the AddPoints() method to add at least four points and then a best fit to the given data will be computed for you.
Examples:
Public Interface
-
- Method: GetCoeff() Summary: Returns the coefficients of the polynomial Description: Returns the coefficients of the polynomial Return: Returns the coefficients of the polynomial.
-
- Method: GetDim() Summary: Returns the degree of the polynomial Description: Returns the degree of the polynomial Return: Returns the degree of the polynomial.
-
- Method: GetType() Summary: Returns a char * string of the type of this item Description: Returns a char * string of the type of this item Return: Returns a char * string of the type of this item.
class DYNAMIC_POLY_4 : public DYNAMIC_POLY_N
#include "DynamicObjects.H"
Class: DYNAMIC_POLY_4.
Summary: A dynamic motion type that is a quadratic polynomial.
Description: This give a dynamic motion type that consists of simply a quadratic polynomial. You just use the AddPoints() method to add at least five points and then a best fit to the given data will be computed for you.
Examples:
Public Interface
-
- Method: GetCoeff() Summary: Returns the coefficients of the polynomial Description: Returns the coefficients of the polynomial Return: Returns the coefficients of the polynomial.
-
- Method: GetDim() Summary: Returns the degree of the polynomial Description: Returns the degree of the polynomial Return: Returns the degree of the polynomial.
-
- Method: GetType() Summary: Returns a char * string of the type of this item Description: Returns a char * string of the type of this item Return: Returns a char * string of the type of this item.
class DYNAMIC_POLY_5 : public DYNAMIC_POLY_N
#include "DynamicObjects.H"
Class: DYNAMIC_POLY_5.
Summary: A dynamic motion type that is a 5th order polynomial.
Description: This give a dynamic motion type that consists of simply a fifth order polynomial. You just use the AddPoints() method to add at least six points and then a best fit to the given data will be computed for you.
Examples:
Public Interface
-
- Method: GetCoeff() Summary: Returns the coefficients of the polynomial Description: Returns the coefficients of the polynomial Return: Returns the coefficients of the polynomial.
-
- Method: GetDim() Summary: Returns the degree of the polynomial Description: Returns the degree of the polynomial Return: Returns the degree of the polynomial.
class DYNAMIC_POLY_6 : public DYNAMIC_POLY_N
#include "DynamicObjects.H"
Class: DYNAMIC_POLY_6.
Summary:A dynamic motion type that is a 6th order polynomial.
Description: This give a dynamic motion type that consists of simply a sixth degree polynomial. You just use the AddPoints() method to add at least seven points and then a best fit to the given data will be computed for you.
Examples:
Public Interface
-
- Method: GetCoeff() Summary: Returns the coefficients of the polynomial Description: Returns the coefficients of the polynomial Return: Returns the coefficients of the polynomial.
-
- Method: GetDim() Summary: Returns the degree of the polynomial Description: Returns the degree of the polynomial Return: Returns the degree of the polynomial.
-
- Method: GetType() Summary: Returns a char * string of the type of this item Description: Returns a char * string of the type of this item Return: Returns a char * string of the type of this item.
class DYNAMIC_POLY_7 : public DYNAMIC_POLY_N
#include "DynamicObjects.H"
Class: DYNAMIC_POLY_7.
Summary: Dynamic motion of type seventh order polynomial.
Description: This give a dynamic motion type that consists of simply a seventh order polynomial. You just use the AddPoints() method to add at least eight points and then a best fit to the given data will be computed for you.
Examples:
Public Interface
-
- Method: GetCoeff() Summary: Returns the coefficients of the polynomial Description: Returns the coefficients of the polynomial Return: Returns the coefficients of the polynomial.
-
- Method: GetDim() Summary: Returns the degree of the polynomial Description: Returns the degree of the polynomial Return: Returns the degree of the polynomial.
-
- Method: GetType() Summary: Returns a char * string of the type of this item Description: Returns a char * string of the type of this item Return: Returns a char * string of the type of this item.
class DYNAMIC_POLY_8 : public DYNAMIC_POLY_N
#include "DynamicObjects.H"
Class: DYNAMIC_POLY_8.
Summary: Dynamic motion of type eighth degree polynomial.
Description: This give a dynamic motion type that consists of simply a eighth degree polynomial. You just use the AddPoints() method to add at least nine points and then a best fit to the given data will be computed for you.
Examples:
Public Interface
-
- Method: GetCoeff() Summary: Returns the coefficients of the polynomial Description: Returns the coefficients of the polynomial Return: Returns the coefficients of the polynomial.
-
- Method: GetDim() Summary: Returns the degree of the polynomial Description: Returns the degree of the polynomial Return: Returns the degree of the polynomial.
-
- Method: GetType() Summary: Returns a char * string of the type of this item Description: Returns a char * string of the type of this item Return: Returns a char * string of the type of this item.
class DYNAMIC_POLY_9 : public DYNAMIC_POLY_N
#include "DynamicObjects.H"
Class: DYNAMIC_POLY_9.
Summary: Dynamic motion of type ninth degree polynomial.
Description: This give a dynamic motion type that consists of simply a ninth degree polynomial. You just use the AddPoints() method to add at least ten points and then a best fit to the given data will be computed for you.
Examples:
Public Interface
-
- Method: GetCoeff() Summary: Returns the coefficients of the polynomial Description: Returns the coefficients of the polynomial Return: Returns the coefficients of the polynomial.
-
- Method: GetDim() Summary: Returns the degree of the polynomial Description: Returns the degree of the polynomial Return: Returns the degree of the polynomial.
-
- Method: GetType() Summary: Returns a char * string of the type of this item Description: Returns a char * string of the type of this item Return: Returns a char * string of the type of this item.
#include "DynamicObjects.H"
Class: DYNAMIC_POLY_N.
Summary: An n-degree one dimensional polynomial that best fits the given points.
Description: If you provide more than n points, this class will construct the best fit polynomial through those points. You are allowed to specify sigma-squared (the standard deviation squared) for each of the points to specify how close you want the fit to match those points.
While every possible precaution is taken, you should be warned that the system of equations that must be solved can be notoriously ill conditioned for larger values of n (greater than 8 or 9). Every precaution is taken to try and solve this system as best as is possible but it still can give incorrect values.
Also, high degree polynomials often have wild occilations, even when your data appears to be smooth. For this reason, rather than using a high degree (greater than 6) polynomial, it maybe wiser to use a spline.
Examples:
Public Interface
-
- Method: DYNAMIC_POLY_N() Summary: Default constructor for an n-dimensional polynomial Description: Default constructor for an n-dimensional polynomial. The work array A and the work vector B are set to NULL. These work areas are used to find the best fit polynomial to the given points. Return: a new DYNAMIC_POLY_N.
-
- Method: operator (double) Summary: Evaluates the polynomial at t where coefficients are given by c Description: A polynomial is uniquely determined by it's coefficients. These coefficients are given in the array c (in decreasing order of exponent) and the degree is passed in the variable n. The polynomial is computed for the interval [0, EndTime-StartTime] so we need to offset where we evaluate the polynomial to the t-StartTime. We then use Horner's rule to evaluate the polynomial efficiently. Return: value of the polynomial at t.
-
virtual double operator()( |
double t
,
double& V
) ; |
- Method: operator (double, double&) Summary: Evaluates the polynomial at t where coefficients are given by c Description: A polynomial is uniquely determined by it's coefficients. These coefficients are given in the array c (in decreasing order of exponent) and the degree is passed in the variable n. The polynomial is computed for the interval [0, EndTime-StartTime] so we need to offset where we evaluate the polynomial to the t-StartTime. We then use Horner's rule to evaluate the polynomial efficiently. We also evaluate the first derivative of this polynomial and return that in the parameter V. The derivative is also evaluated using a variant of Horner's rule. Return: value of the polynomial at t.
-
virtual double operator()( |
double t
,
double& V
,
double& A_output_arg
) ; |
- Method: operator (double, double&, double &) Summary: Evaluates the polynomial at t where coefficients are given by c Description: A polynomial is uniquely determined by it's coefficients. These coefficients are given in the array c (in decreasing order of exponent) and the degree is passed in the variable n. The polynomial is computed for the interval [0, EndTime-StartTime] so we need to offset where we evaluate the polynomial to the t-StartTime. We then use Horner's rule to evaluate the polynomial efficiently. We also evaluate the first and second derivatives of this polynomial and return that in the parameters V and A_out. The first and second second derivatives also evaluated using a variant of Horner's rule. Return: value of the polynomial at t.
-
void AddPoints( |
double ts
,
double te
,
double t
,
double v
,
double err2
,
...
) ; |
- Method: AddPoints() Summary: Add points for which you wish to fit the equation.
Description: AddPoints can take any number of arguments that is 2 plus a multiple of 3. For example, if you wanted the line that went through the points (0, 1) and (2, 7) from t=0 through 3 you would first use the child class DYNAMIC_POLY_1 and then would call.
AddPoints(0, 3, 0, 1, 17, 2, 7, 17, END_POLY);
Notice the extra numbers '17' that I have in the equation. Those are supposed to be the standard deviation (squared) allowed for each point in the line fit. Since we are giving the exact number of points required to fit a line, these values are ignored.
Suppose I wanted to find the best fit quadratic to the points (1, 2), (3, 7) (4, 12), and (8, 6) from t=0 to t=13. I also want the line to be a better fit for the first, third and, fourth numbers than for the second. In this case, I would use the child class DYNAMIC_POLY_2 and would call the method.
AddPoints(0, 13,
1, 2, .1,
3, 7, 10,
4, 12, .1,
8, 6, .1,
END_POLY)
Since the sigma squared is smaller in the first, third, and fourth points, the line will fit those points better while it will be a worse fit for the scond point.
Three important points of note. First, you must always terminate the argument list with END_POLY. This is the signal to the computer that you have entered your last point. Second, sigma squared (err2) must never be 0 or negative. 0 will result in either NaN's or a core dump and negative numbers can result in garbage results.
Return: void.
- ts
- In: Start time for the polynomial.
- te
- In: End time for the polynomial.
- t
- In: Time value.
- v
- In: Position at that time.
- err2
- In: sigma squared for that position.
-
- In: Further (t,v,err2) triplets.
-
double Evaluate( |
BIG_FLOAT* c
,
double t
,
int n
) ; |
- Method: Evaluate(BIG_FLOAT*, double, int) Summary: Evaluates at t, the nth degree polynomial whose coefficients are given by c.
Description: A polynomial is uniquely determined by it's coefficients. These coefficients are given in the array c (in decreasing order of exponent) and the degree is passed in the variable n. The polynomial is computed for the interval [0, EndTime-StartTime] so we need to offset where we evaluate the polynomial to the t-StartTime. We then use Horner's rule to evaluate the polynomial efficiently. Return: The value of the polynomial, evaluated at t.
- c
- In: Coefficients of polynomial in decreasing order of exponent.
- t
- In: Point at which to evaluate the polynmial.
- n
- In: degree of the polynomial.
-
double Evaluate( |
BIG_FLOAT* c
,
double t
,
int n
,
double& V
) ; |
- Method: Evaluate(BIG_FLOAT*, double, int, double &) Summary: Evaluates at t, the nth degree polynomial whose coefficients are given by c Description: A polynomial is uniquely determined by it's coefficients. These coefficients are given in the array c (in decreasing order of exponent) and the degree is passed in the variable n. The polynomial is computed for the interval [0, EndTime-StartTime] so we need to offset where we evaluate the polynomial to the t-StartTime. We then use Horner's rule to evaluate the polynomial efficiently. We also evaluate the first derivative of this polynomial and return that in the parameter V. The derivative is also evaluated using a variant of Horner's rule. Return:
- c
- In: Coefficients of polynomial in decreasing order of exponent.
- t
- In: Point at which to evaluate the polynmial.
- n
- In: degree of the polynomial.
- V
- Out: Value of the first derivative.
-
double Evaluate( |
BIG_FLOAT* c
,
double t
,
int n
,
double& V
,
double& A_out
) ; |
- Method: Evaluate(BIG_FLOAT*, double, int, double &, double &) Summary: Evaluates at t, the nth degree polynomial whose coefficients are given by c Description: A polynomial is uniquely determined by it's coefficients. These coefficients are given in the array c (in decreasing order of exponent) and the degree is passed in the variable n. The polynomial is computed for the interval [0, EndTime-StartTime] so we need to offset where we evaluate the polynomial to the t-StartTime. We then use Horner's rule to evaluate the polynomial efficiently. We also evaluate the first and second derivatives of this polynomial and return that in the parameters V and A_out. The first and second second derivatives also evaluated using a variant of Horner's rule. Return: value of the polynomial at t.
- c
- In: Coefficients of polynomial in decreasing order of exponent.
- t
- In: Point at which to evaluate the polynmi.
- n
- In: degree of the polynomial.
- V
- Out: Value of the first derivative.
- A_out
- Out: Value of the second derivative.
-
- Method: GetCoeff() Summary: Returns the coefficients of the polynomial Description: Returns the coefficients of the polynomial Return: Returns the coefficients of the polynomial.
-
- Method: GetDim() Summary: Returns the degree of the polynomial Description: Returns the degree of the polynomial Return: Returns the degree of the polynomial.
-
- Method: GetType() Summary: Returns a char * string of the type of this item Description: Returns a char * string of the type of this item Return: Returns a char * string of the type of this item.
-
Method: MakePoly()
Summary: Generates the polynomial for the points you entered.
Description: Generates the polynomial for the points you
entered. If too few points have been added to
generate the polynomial you desire, an error message
is printed.
Return: void
-
Method: Reset()
Summary: Frees the work areas and removes all points that were added.
Description: Frees the work areas and removes all points that
were added. This does not undo the polynomial that
you have created but allows you to recreate it with
new points.
Return: void
#include "Attribute.H"
Class: DYNAMIC_POSITION_ATTRIBUTE.
Summary: A time dependant attribute position type.
Description: Position attributes have many additional features that are different from other ATTRIBUTE types. Essentially, position attributes are equations of motion over given periods of time. If you think of a plane flying from Colorado Springs to SanDiego. It could have several different equations of motion for this trip. There would be an equation both for takeoff and landing as well as several equations corresponding to course changes throughout the route.
At each point in the trip, a DYNAMIC_POSITION_ATTRIBUTE allows you to find the position (in one of three coordinate systems), the velocity, and the acceleration all at a specific point in time. These values are then computed through the equations of motion that you have provided or used (SPEEDES provides several motion types). This results in a significant savings in the amount of data that must be passed. It also distributes the work of computing positions since different objects on different nodes may be interested in the position at different times.
Examples: None of the demo code currently has examples of the use of this type.
Public Interface
-
-
-
void operator()( |
double t
,
int PT
,
double x [ 3 ]
) ; |
Method: operator () (double, int, double[3]);
Summary: Computes the position for the given time and coordinate system
Description:
Return: void
- t
- In: Time at which the position should be computed.
- PT
- In: Coordinate system in which to evaluate the postion. Options are: EARTH: Latitude, Longitude, Altitude ECR: X, Y, Z in a rotating earth coordinate system ECI: X, Y, Z in an inertial coordinate system.
-
- Out: Vector to be filled with the position.
-
void operator()( |
double t
,
int PT
,
double x [ 3 ]
,
double v [ 3 ]
) ; |
Method: operator () (double, int, double[3], double[3]);
Summary: Computes the position and velocity for the given time
and coordinate system
Description:
Return: void
- t
- In: Time at which the position should be computed.
- PT
- In: Coordinate system in which to evaluate the postion. Options are: EARTH: Latitude, Longitude, Altitude ECR: X, Y, Z in a rotating earth coordinate system ECI: X, Y, Z in an inertial coordinate system.
-
- Out: Vector to be filled with the position.
-
- Out: Vector to be filled with the velocity.
-
void operator()( |
double t
,
int PT
,
double x [ 3 ]
,
double v [ 3 ]
,
double a [ 3 ]
) ; |
Method: operator () (double, int, double[3], double[3], double[3])
Summary: Computes the position, velocity, and acceleration for
the given time and coordinate system
Description:
Return: void
- t
- In: Time at which the position should be computed.
- PT
- In: Coordinate system in which to evaluate the postion. Options are: EARTH: Latitude, Longitude, Altitude ECR: X, Y, Z in a rotating earth coordinate system ECI: X, Y, Z in an inertial coordinate system.
-
- Out: Vector to be filled with the position.
-
- Out: Vector to be filled with the velocity.
-
- Out: Vector to be filled with the acceleration.
-
- Method: CheckMotion() Summary: Checks the motion for realistic derivative values. Description: Once you have defined a new motion type, it is important that this motion type provide realistic values for the first two derivatives: Velocity and Acceleration. It does this by approximating the first two derivatives with a finite difference method and then checks to see if the computed values match the approximated values to within a reasonable tolerance level. If the error is too large, the status code returned is incremented and an error message with the error is printed.
The motion is only checked over individual segments. It is not checked to make sure that the transition from one motion segment to another segment is continuous to any degree.
Return: 1 for every inconsistency it finds.
-
- Method: CheckTime() Summary: Checks the motion for continuous time. Description: Once you have defined a dynamic position attribute, it is important that it provides a position for every time between it's start time and it's end time. If it is not continuous, it prints an error message and returns a non-zero status. It does not check to make sure that the velocity and acceleration are continuous. Return: 1 for every gap in the continuity.
-
- Method: GetSize() Summary: Returns the size of a DYNAMIC_POSITION_ATTRIBUTE Description: Returns the size of a DYNAMIC_POSITION_ATTRIBUTE Return: Returns the size of a DYNAMIC_POSITION_ATTRIBUTE.
-
Method: GetType()
Summary: Returns the type of this attribute:
DYNAMIC_POSITION_ATTRIBUTE_TYPE
Description: Each type is enumerated so we can properly find them and
the enumeration can be found at the top of Attribute.H.
Return: Returns the type of this attribute:
DYNAMIC_POSITION_ATTRIBUTE_TYPE
-
void GetValue( |
double t
,
int PT
,
double x [ 3 ]
) ; |
-
class DYNAMIC_POSITION_ITEM : public DYNAMIC_ITEM
#include "DynamicItem.H"
Class: DYNAMIC_POSITION_ITEM.
Summary: DYNAMIC_POSITION_ITEM's are essentially equations of motion.
Description: DYNAMIC_POSITION_ITEM is used as an intermediate type for the various equations of motions provided by SPEEDES. Each dynamic position type can return its position in any of EARTH, ECR, or ECI coordinates when requested.
Examples: Several examples of the use of this type can be found in POLY_N_POTION within PolyyMotion.H, RHUMB_LINE in RhumbLine.H and SPLINE6_MOTION in Spline6Motion.H. Naturally, there are also examples in ObjctProxy.C and in Attribute.[CH].
Public Interface
-
Method: DYNAMIC_POSITION_ITEM()
Summary: Default constructor of a DYNAMIC_POSITION_ITEM
Description: The default constructor sets the Position type to -1
(an invalid value)
Return: a new DYNAMIC_POSITION_ITEM
-
virtual void operator()( |
double
,
int
,
double [ 3 ]
) = 0; |
- Method: operator () (double, int, double[3]) Summary: should not be used. Description: over ridden to evaluate positions Return: void.
-
virtual void operator()( |
double
,
int
,
double [ 3 ]
,
double [ 3 ]
) = 0; |
- Method: operator () (double, int, double[3], double[3]) Summary: should not be used Description: over ridden to evaluate positions Return: void.
-
virtual void operator()( |
double
,
int
,
double [ 3 ]
,
double [ 3 ]
,
double [ 3 ]
) = 0; |
Method: operator () (double, int, double[3], double[3], double[3])
Summary: should not be used
Description: over ridden to evaluate positions
Return: void
-
- Method: CheckMotion() Summary: Checks the motion for invalid derivatives at the start, middle, and end. Description: Since SPEEDES often uses the derivatives (velocity, and acceleration) to compute nearest approach as well as first contact with a moving object, it is important that the derivative values are valid. This method will use finite differences to check if the derivative values are within reasonable tolerances. If they are not, it prints an error message and returns a non-zero value. It is important to use this method when you are first developing a new motion type. Return: 1 if velocity is bad at StartTime, 2 of acceleration is bad at StartTime, 3 if both acceleration and velocity are bad at StartTime 10 if velocity is bad at the middle, 20 of acceleration is bad at the middle, 30 if both acceleration and velocity are bad at the middle : 100 if velocity is bad at End, 200 of acceleration is bad at EndTime, 300 if both acceleration and velocity are bad at EndTime 0 if the derivatives are good. Any sum of the above.
-
- Method: CheckMotion(double) Summary: Uses finite differences to check the derivatives at a point. Description: Since SPEEDES often uses the derivatives (velocity, and acceleration) to compute nearest approach as well as first contact with a moving object, it is important that the derivative values are valid. This method will use finite differences to check if the derivative values are within reasonable tolerances. If they are not, it prints an error message and returns a non-zero value. It is important to use this method when you are first developing a new motion type. Return: 1 if velocity is bad, 2 of acceleration is bad, 3 if both acceleration and velocity are bad 0 if the derivatives are good.
-
Method: SetEARTH()
Summary: Sets the coordinate system to EARTH
Description: This sets the default method for returning a
position to using EARTH (lat, long, alt)
coordinates.
Return: void
-
Method: SetECI()
Summary: Sets the coordinate system to ECI
Description: This sets the default method for returning a
position to using EARTH (X, Y, Z in a non rotating
earth) coordinates.
Return: void
-
Method: SetECR()
Summary: Sets the coordinate system to ECR
Description: This sets the default method for returning a
position to using EARTH (X, Y, Z in a rotating
earth) coordinates
Return: void
#include "DynamicObjects.H"
Class: DYNAMIC_SPLINE_3.
Summary: Creates a cubic polynomial with specified position and velocity over the given interval.
Description: Despite the name, this does not create what is normally thought of as a cubic spline. You construct one of this spline pieces by specifying the position and velocity at both the start time and the end time. We then compute the cubic polynomial (also known as a Hermite interpolant) for the given information.
Examples:
Public Interface
-
Method: operator () (double)
Summary: returns the position at the given point in time.
Description: This method computes the position of the dynamic
motion at the passed in time.
Return: the position at the given point in time
- t
- In: Time at which position is desired.
-
virtual double operator()( |
double t
,
double& V
) ; |
- Method: operator () (double, double&) Summary: returns the position at the given point in time. Description: This method computes the position of the dynamic motion at the passed in time. It also computes the first derivative (velocity) and returns that in the second parameter Return: the position at the given point in time.
- t
- In: Time at which position is desired desired.
- V
- Out: Value for the velocity.
-
virtual double operator()( |
double t
,
double& V
,
double& A
) ; |
- Method: operator () (double, double&, double&) Summary: returns the position at the given point in time. Description: This method computes the position of the dynamic motion at the passed in time. It also computes the first derivative (velocity) and the second derivative (acceleration) and returns them in the second and third parameters. Return: the position at the given point in time.
- t
- In: Time at which position is desired.
- V
- Out: Value for the velocity.
- A
- Out: Value for the acceleration.
-
- Method: GetType() Summary: Returns a char * string of the type of this item Description: Returns a char * string of the type of this item Return: Returns a char * string of the type of this item.
-
void init( |
double t0
,
double x0
,
double v0
,
double t1
,
double x1
,
double v1
) ; |
- Method: init(double, double, double, double, double, double) Summary: Initializes (creates) the cubic interpolant Description: when you provide the values for position and velocity at the initial point and at the end point, this will find the unique cubic polynomial (a trivial case of Hermite interpolation) that satisfies those conditions. Return: void.
- t0
- In: Start time.
- x0
- In: Initial position.
- v0
- In: Initial velocity.
- t1
- In: end time.
- x1
- In: End position.
- v1
- In: End velocity.
#include "DynamicObjects.H"
Class: DYNAMIC_SPLINE_6.
Summary: Creates a 6th order polynomial matching position, velocity, and acceleration at the end points.
Description: This method does not create a spline through a number of points but, rather, creates a single polynomial through two points and makes sure that it matches both first and second derivatives at those points.
Examples:
Public Interface
-
- Method: operator () (double) Summary: Returns the position at a given point in time Description: Returns the position at a given point in time Return: Returns the position at a given point in time.
- t
- In: Time at which position is desired.
-
virtual double operator()( |
double t
,
double& V
) ; |
Method: operator () (double, double&)
Summary: Returns the position at a given point in time plus the first
derivative
Description: Returns the position at a given point in time plus the first
derivative
Return: Returns the position at a given point in time
-
virtual double operator()( |
double t
,
double& V
,
double& A
) ; |
- Method:operator () (double, double&, double &) Summary: Returns the position at a given point in timeplus the first and second derivatives Description: Returns the position at a given point in timeplus the first and second derivatives Return: Returns the position at a given point in time.
-
- Method: GetType() Summary: Returns a char * string of the type of this item Description: Returns a char * string of the type of this item Return: Returns a char * string of the type of this item.
-
void init( |
double t0
,
double x0
,
double v0
,
double a0
,
double t1
,
double x1
,
double v1
,
double a1
) ; |
- Method: init(double, double, double, double, double, double, double, double) Summary: Creates the polynomial matching the passed in values Description: When you pass in an initial and final position, velocity, and acceleration, this will create the polynomial that matches those values. Return:
- t0
- In: Initial time.
- x0
- In: Initial position.
- v0
- In: Initial velocity.
- a0
- In: Initial acceleration.
- t1
- In: End time.
- x1
- In: End position.
- v1
- In: End velocity.
- a1
- In: End acceleration.
#include "ObjectProxyMessage.H"
Public Interface
-
-
-
-
class FREE_OBJECT_PROXY : public C_FREE_LIST
#include "FreeObjectProxy.H"
Public Interface
-
- N is number of ObjectProxy class types defined in Objects.par file.
#include "GreatCircle.H"
Public Interface
-
-
-
virtual void operator()( |
double t
,
int PT
,
double X [ 3 ]
) ; |
-
-
virtual void operator()( |
double
,
int
,
double [ 3 ]
,
double [ 3 ]
) ; |
-
-
virtual void operator()( |
double
,
int
,
double [ 3 ]
,
double [ 3 ]
,
double [ 3 ]
) ; |
-
-
-
-
double init_Tconstant( |
double LatInit
,
double LonInit
,
double AltInit
,
double TimeInit
,
double LatFin
,
double LonFin
,
double AltFin
,
double TimeFin
) ; |
-
-
double init_Vconstant( |
double LatInit
,
double LonInit
,
double AltInit
,
double TimeInit
,
double LatFin
,
double LonFin
,
double AltFin
,
double V
) ; |
-
#include "ObjectProxyMessage.H"
Public Interface
-
-
-
-
class LIST_ATTRIBUTE : public BASE_ATTRIBUTE
#include "Attribute.H"
Class: LIST_ATTRIBUTE.
Summary: publishable list attribute for use in object proxies.
Description: If you want to publish a non time dependant list within your object, this is the class to use. Whenever this class is updated in value, that update is then sent to everyone who is subscribing to your object proxy. These updates are automatically taken care of through the use of operator overloading.
Examples: An example of the use of LIST_ATTRIBUTE can be found in S_RanMot.H in demos/BmdSim.
Public Interface
-
Method: LIST_ATTRIBUTE()
Summary: Default constructor for a list attribute
Description: Default constructor does nothing additional
Return: a new LIST_ATTRIBUTE
-
Method: ~LIST_ATTRIBUTE()
Summary: Destructor for a list attribute.
Description: empties the list, deletes all members and returns
Return: void
-
- Method: operator () (char *) Summary: returns the OBJECT_ATTRIBUTE with the passed in name Description: When one has a list of OBJECT_ATTRIBUTEs and wants to find the attribute with a particular name, this operator will walk through the list until it finds the matching OBJECT_ATTRIBUTE. If there is not any object in the list that matches the passed in name, NULL is returned. Return: The OBJECT_ATTRIBUTE matching the passed in name.
- n
- In: Name of the attribute you want to find in this list.
-
- Method: operator ++() Summary: Returns a pointer to the next item in the list. Description: This is done by moving a current pointer down the list to the next item. If we are at the bottom of the list or the list is empty, then we return NULL. Return: Returns a pointer to the next item in the list.
-
- Pass this function something returned from new without brackets.
- v
- In: New object to be added to the bottom of the list.
-
- Method: operator --() Summary: Returns a pointer to the previous item in the list. Description: This is done by moving a current pointer up the list to the previous item. If we are at the top of the list or the list is empty, then we return NULL. Return: Returns a pointer to the previous item in the list.
-
- Method: operator -=(void *) Summary: Removes an item from the list. Description: When you want to remove an item from the list, -= item will accomplish that for you. If the passed in item cannot be found in the list, an error message is printed and we continue. The item that is removed is pushed back on the free list using FreeList->push_item_bot(item) Return: void.
- v
- In: Item to be removed from the list.
-
Method: Copy(BASE_ATTRIBUTE*)
Summary: Copies the passed in attribute over this attribute
Description: Copies the passed in attribute over this attribute
Return: void
- a
- In: Attribute to be copied over this attribute.
-
- Method: EmptyMessage Summary: Updates our attribute using the value passed in the buffer. Description: Once we have filled a message with the FIllMessage() call, we then can send that buffer to another object proxy as their update. This method unpacks that buffer and updates the values of our attribute. Return: void.
- buff
- In: Buffer containing updated values for our attribute.
-
Method: FillMessage
Summary: Fills a buffer with this attribute for sending.
Description: Once we know the size of buffer required for sending
this attribute (from GetMessageSize()), we can then
allocate the memory ourselves and call FillMessage
with that buffer to be filled.
Return: void
- buff
- InOut: Buffer that will contain this attribute.
-
- Method: operator () (double) Summary: returns the OBJECT_ATTRIBUTE that is valid for the passed in time. Description: Since object attributes can be valid at different points in time, this operator finds the one in our list that is valid at that time. For example, we may have a list attribute that contains object_attributes that are valid for the times 0<-->10, 10<-->30, and 30<-->10000. If we call this operator with the value 3, it returns the first object attribute, and f we call it with value 50, it returns the third. If there happen to be two items in the list with overlapping times and you call this operator with a time in that overlap, then the OBJECT_ATTRIBUTE closest to the top of the list will be returned. If there is not any attribute valid for that time, NULL will be returned. Return: the OBJECT_ATTRIBUTE valid for the passed in time.
- ListId
- In: Id for the attribute we wish to find.
-
Method: get_length()
Summary: Returns the length of this list.
Description: Just like a normal list (RB_list), this returns the
length of the list. Same as GetLength().
Return: Returns the length of this list.
-
- Method: GetMessageSize() Summary: Returns the size of message required to contain this attribute. Description: If we change the value of an LIST_ATTRIBUTE, we need to announce this update to the object proxies. This method tells us the size of buffer required to contain that message. Return: Returns the size of message required to contain this attribute.
-
- Method: GetSize() Summary: Returns the size of this attribute. Description: Returns the size of this attribute. Return: Returns the size of this attribute.
-
- Method: GetType() Summary: Returns the type of this attribute: LIST_ATTRIBUTE_TYPE Description: Each attribute has a unique type (listed at the top of this header file) and this method returns that type. Return: Returns the type of this attribute: LIST_ATTRIBUTE_TYPE.
-
- Method: GetValue() Summary: Returns the list within this attribute. Description: Returns the list within this attribute. Return: Returns the list within this attribute.
-
- Method: bot() Summary: Returns a pointer to the bottom of the list. Description: Returns a pointer to the bottom of the list. Return: Returns a pointer to the bottom of the list.
-
- Method: get_bot() Summary: Returns a pointer to the bottom of the list. Description: Returns a pointer to the bottom of the list. Return: Returns a pointer to the bottom of the list.
-
Method: get_length()
Summary: Returns the length of this list.
Description: Just like a normal list (RB_list), this returns the
length of the list. Same as GetLength().
Return: Returns the length of this list.
-
- Method: get_top() Summary: Returns a pointer to the top of the list. Description: Returns a pointer to the top of the list. Return: Returns a pointer to the top of the list.
-
virtual void outstream( |
ostream& out
,
int level = 0
) ; |
- Method: outstream(ostream &, int) Summary: Prints this attribute to the passed in stream. Description: This operator will print out this list attribute to the passed in stream. Since it is a list, we do this by calling the virtual function outstream() on each OBJECT_ATTRIBUTE member of this list. Return: void.
- out
- In: Stream to which we should print.
- level
- In: level of printing to perform.
-
- Method: top() Summary: Returns a pointer to the top of the list. Description: Returns a pointer to the top of the list. Return: Returns a pointer to the top of the list.
#include "ObjectProxyMessage.H"
Public Interface
-
-
-
-
class LOGICAL_ATTRIBUTE_MESSAGE_INFO : public ATTRIBUTE_MESSAGE_INFO
#include "ObjectProxyMessage.H"
Public Interface
-
-
-
-
#include "LoiterMotion.H"
Public Interface
-
-
-
virtual void operator()( |
double t
,
int PT
,
double X [ 3 ]
) ; |
-
-
virtual void operator()( |
double t
,
int PT
,
double X [ 3 ]
,
double V [ 3 ]
) ; |
-
-
virtual void operator()( |
double t
,
int PT
,
double X [ 3 ]
,
double V [ 3 ]
,
double A [ 3 ]
) ; |
-
-
-
-
void Init( |
double ts
,
double te
,
double x [ 3 ]
,
double r
,
double s
,
int PT
) ; |
-
-
void Init( |
double ts
,
double te
,
double x0
,
double x1
,
double x2
,
double r
,
double s
,
int PT
) ; |
-
-
-
class MONOTONICALLY_INCREASING_BUFFER
#include "ObjectProxy.H"
Public Interface
-
-
-
-
-
-
class OBJECT_ATTRIBUTE : public BASE_ATTRIBUTE
#include "Attribute.H"
Class: OBJECT_ATTRIBUTE.
Summary: publishable object attribute for use in object proxies.
Description: If you want to publish a non time dependant object within your object, this is the class to use. Whenever this class is updated in value, that update is then sent to everyone who is subscribing to your object proxy.
Examples: An example of the use of OBJECT_ATTRIBUTE can be found in S_RanMot.H in demos/BmdSim.
Another example is this. Suppose you had the class:
class STANDARD_INFO {
public:
char * GetName();
void SetName(char *Name);
double GetStartTime();
void SetStartTime(double startTime);
STANDARD_INFO()
{
Setname(NULL);
SetStartTime(-INFINITY)
};
private:
char * Name;
double StartTime;
double TempVariable;
};
You could turn this into a publishable class fairly easily
by just changing it to:
class STANDARD_INFO : public OBJECT_ATTRIBUTE{
public:
char * GetName();
void SetName(char *Name);
double GetStartTime();
void SetStartTime(double startTime);
STANDARD_INFO()
{
Setname(NULL);
SetStartTime(-INFINITY);
DEFINE_ATTRIBUTE(StartTime, "StartTime");
DEFINE_ATTRIBUTE(Name, "Name");
}
private:
STRING_ATTRIBUTE Name;
FLOAT_ATTRIBUTE StartTime;
double TempVariable;
};
RB_DEFINE_CLASS(STANDARD_INFO);
The major changes you may notice are to change standard variables to ATTRIBUTE variables, to inherit from OBJECT_ATTRIBUTE, and to add DEFINE_ATTRIBUTE() calls to the constructor. These DEFINE_ATTRIBUTE() calls allow SPEEDES to know what your class looks like and gives SPEEDES a way to know how to package up this attribute for updates. The addition of the RB_DEFINE_CLASS(STANDARD_INFO) allows SPEEDES to know how to roll back your class as well as delete roll back data properly when events are committed.
If a LIST_ATTRIBUTE object is really a LIST_ATTRIBUTE and NOT a BASE_DYNAMIC_ATTRIBUTE, then it contains nothing but OBJECT_ATTRIBUTEs. If it is a BASE_DYNAMIC_ATTRIBUTE, then it contains nothing but DYNAMIC_ITEMs. An OBJECT_ATTRIBUTE is not necessarily in a LIST_ATTRIBUTE. OBJECT_ATTRIBUTEs have a list id which indicates where in they may exist within a given dynamic attribute.
Public Interface
-
- Method: OBJECT_ATTRIBUTE() Summary: Default constructor for an OBJECT_ATTRIBUTE Description: It is highly recommended that you overload this method to initialize your own objects. That is, you will want to add in DEFINE_ATTRIBUTE() calls for each of your own attributes as well as initialize any variables you need to initialize. Return: a new OBJECT_ATTRIBUTE.
-
- Method: ~OBJECT_ATTRIBUTE() Summary: destructor for an OBJECT_ATTRIBUTE Description: The default destructor partially destroy's your object attribute but you may want to clean up any memory you may have allocated within your object. Return: void.
-
Method: Copy(BASE_ATTRIBUTE*)
Summary: Copies the passed in attribute over this attribute
Description: Copies the passed in attribute over this attribute
Return: void
- a
- In: Attribute to be copied over this attribute.
-
- Method: EmptyMessage Summary: Updates our attribute using the value passed in the buffer. Description: Once we have filled a message with the FIllMessage() call, we then can send that buffer to another object proxy as their update. This method unpacks that buffer and updates the values of our attribute. Return: void.
- buff
- In: Buffer containing updated values for our attribute.
-
Method: FillMessage
Summary: Fills a buffer with this attribute for sending.
Description: Once we know the size of buffer required for sending
this attribute (from GetMessageSize()), we can then
allocate the memory ourselves and call FillMessage
with that buffer to be filled.
Return: void
- buff
- InOut: Buffer to be filled with our attribute's value.
-
- Method: GetDepth() Summary: Determines the depth in terms of Object Proxies Description: Determines the depth in terms of Object Proxies Return: Feturns the depth in terms of Object Proxies.
-
Method: GetInListAttribute()
Summary: Returns the InListAttribute for this object.
Description: If this object is contained in a list, we can grab that
list using this method.
Return: The InListAttribute for this object (the list that
contains this object)
-
- Method: GetListId() Summary: returns the list id for this object attribute Description: Returns where in a list attribute this attribute resides Return: Returns where in a list attribute this attribute resides.
-
- Method: GetMessageSize() Summary: Returns the size of message required to contain this attribute. Description: If we change the value of an OBJECT_ATTRIBUTE, we need to announce this update to the object proxies. This method tells us the size of buffer required to contain that message. Return: Returns the size of message required to contain this attribute.
-
- Method: GetObjectName() Summary: Returns the name of the object proxy within this class. Description: Returns the name of the object proxy within this class. Return: Returns the name of the object proxy within this class.
-
Method: GetObjectProxy()
Summary: Returns the object proxy within this class
Description: Each OBJECT_ATTRIBUTE contains an object proxy and this
method returns that object proxy. This is the same as
GetValue()
Return:
-
Method: GetSize()
Summary: Returns the size of an OBJECT_ATTRIBUTE
Description: Returns the size so that we can construct a buffer that
contains one of these objects.
Return: Returns the size of an OBJECT_ATTRIBUTE
-
- Method: GetType() Summary: Returns the type of this attribute: OBJECT_ATTRIBUTE_TYPE Description: Each attribute has a special type (all enumerated at the top of this header file) and that type is returned here. Return: Returns the type of this attribute: OBJECT_ATTRIBUTE_TYPE.
-
- Method: GetValue() Summary: Returns the object proxy within this class Description: Each OBJECT_ATTRIBUTE contains an object proxy and this method returns that object proxy. This is the same as GetObjectProxy() Return: Returns the object proxy within this class.
-
- Method: ObjProxyGetClassName Summary: Each class is named, This returns that name. Description: Each class is named, This returns that name Return: Each class is named, This returns that name.
-
virtual char* PackLevelInfo( |
const char* Buff
,
int NlevelInfo
) ; |
Method: PackLevelInfo
Summary: packs up the level info buffer.
Description: packs up the level info buffer that is used for
sending updates out to other nodes. It gives the
info needed for finding the right object proxy to
modify for the attribute
Return: a pointer to the the start of the level info within the passed in
buffer
- Buff
- In: Buffer to contain the level info.
- NlevelInfo
- In: Number of levels of info.
-
- Method: SetStartTime(double) Summary: Sets the time this attribute starts Description: OBJECT_ATTRIBUTES can be valid only for a given period of time. One can set the start time and the end time using this method and SetEndTime(). Return: void.
- ObjectType
- In: Name to which we should set the class.
-
- Method: SetInListAttribute(LIST_ATTRIBUTE*) Summary: Sets attribute as being in the passed in LIST_ATTRIBUTE Description: If you create an attribute list of object attributes, the list and this attribute must know about eachother. This method lets the object know about the list that contains it. Return:
- l
- In: LIST_ATTRIBUTE which contains this OBJECT_ATTRIBUTE.
-
- Method: SetInObjectProxy(OBJECT_PROXY*) Summary: Sets attribute as being in an object proxy Description: Once we create an attribute, it must be inserted into an object proxy (this is done for you). This method performs that task. Return:
- o
- In: Object proxy within which this attribute is contained.
-
- Method: SetObjectName(char *) Summary: Sets the object name of the object proxy within this class. Description: Sets the object name of the object proxy within this class. Return: Sets the object name of the object proxy within this class.
- ObjectName
- In: Name for the object proxy within this class.
-
virtual void outstream( |
ostream& out
,
int level
) ; |
Method: ostream(ostream&, int)
Summary: Prints the object proxy within this attribute to the stream.
Description: Prints the object proxy within this attribute to the stream.
Return: void
class OBJECT_ATTRIBUTE_MESSAGE_INFO : public ATTRIBUTE_MESSAGE_INFO
#include "ObjectProxyMessage.H"
Public Interface
-
-
-
-
-
-
-
void SetValue( |
char* ObjectProxyMessage
,
int n
) ; |
-
class OBJECT_PROXY : public C_ITEM
#include "ObjectProxy.H"
Note that in this code, the word reference and AttributeIndex are often used synonymously.
Public Interface
-
- Int FullDestroy_p;
-
-
- type
- : FullDestroy_p(0).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Internal Method: EmptyMessage Summary: Empty the input message into this OBJECT_PROXY. Description: The input message was made by something like FillMessage. This function reads that message and modifies the BASE_ATTRIBUTE in this OBJECT_PROXY according to how the message says it should be modified. Return: The Attribute field in the return value is the attribute that the message said to modify. The Buff field is the start of the next message. This value may be passed to another call of EmptyMessage. The OpWarning field indicates that an error may have occurred.
-
void Execute( |
char* MethodName
,
...
) ; |
-
-
void FillMessage( |
F_UPDATE_LIST_ITEM* top
,
int len
,
butes to read char*& message
,
int& nBytes
) ; |
- Internal Method: FillMessage Summary: Fills in a message representing some attributes of this OBJECT_PROXY. Description: Returns by reference in the last two arguments a buffer which can be sent as part of an event message, which represents the attributes specified in the linked list argument called top. EmptyMessage knows how to interpret the message created by this function. Return: void.
- top
- IN: attributes to read.
- len
- IN: num of attributes to read.
- message
- OUT: start of filled message.
- nBytes
- OUT: length of filled message.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
double GetDynamicFloat( |
char* name
,
double t
,
double& V
,
int index = - 1
) ; |
-
-
double GetDynamicFloat( |
int reference
,
double t
,
double& V
,
int index = - 1
) ; |
-
-
double GetDynamicFloat( |
char* name
,
double t
,
double& V
,
double& A
,
int index = - 1
) ; |
-
-
double GetDynamicFloat( |
int reference
,
double t
,
double& V
,
double& A
,
int index = - 1
) ; |
-
-
-
-
int GetDynamicInt( |
int reference
,
double t
,
int index = - 1
) ; |
-
-
-
-
-
-
-
-
-
-
void GetDynamicPosition( |
char* name
,
double x [ 3 ]
,
int PT
,
double t = 0. 0
,
int index = - 1
) ; |
-
-
void GetDynamicPosition( |
int reference
,
double x [ 3 ]
,
int PT
,
double t = 0. 0
,
int index = - 1
) ; |
-
-
void GetDynamicPosition( |
char* name
,
double x [ 3 ]
,
double v [ 3 ]
,
int PT
,
double t = 0. 0
,
int index = - 1
) ; |
-
-
void GetDynamicPosition( |
int reference
,
double x [ 3 ]
,
double v [ 3 ]
,
int PT
,
double t = 0. 0
,
int index = - 1
) ; |
-
-
void GetDynamicPosition( |
char* name
,
double x [ 3 ]
,
double v [ 3 ]
,
double a [ 3 ]
,
int PT
,
double t = 0. 0
,
int index = - 1
) ; |
-
-
void GetDynamicPosition( |
int reference
,
double x [ 3 ]
,
double v [ 3 ]
,
double a [ 3 ]
,
int PT
,
double t = 0. 0
,
int index = - 1
) ; |
-
-
double GetFloat( |
int reference
,
int index = - 1
) ; |
-
-
double GetFloat( |
char* name
,
int index = - 1
) ; |
- GetFloat.
-
-
-
-
-
- OBJECT_PROXY *GetListTime(int reference, double t, int index = -1);
-
int GetInt( |
int reference
,
int index = - 1
) ; |
-
-
int GetInt( |
char* name
,
int index = 0
) ; |
- GetInt.
-
- GetList.
-
- OBJECT_PROXY *GetListTime(char *name, double t, int index = -1);
-
-
-
-
-
-
-
int GetLogical( |
int reference
,
int index = - 1
) ; |
-
-
- GetLogical.
-
-
-
-
-
-
-
-
-
-
-
-
-
- GetObject.
-
-
-
-
-
void GetPosition( |
int reference
,
double x [ 3 ]
,
int PT
,
double t = 0. 0
,
int index = - 1
) ; |
-
-
void GetPosition( |
char* name
,
double x [ 3 ]
,
double v [ 3 ]
,
int PT
,
double t = 0. 0
,
int index = - 1
) ; |
-
-
void GetPosition( |
int reference
,
double x [ 3 ]
,
double v [ 3 ]
,
int PT
,
double t = 0. 0
,
int index = - 1
) ; |
-
-
void GetPosition( |
char* name
,
double x [ 3 ]
,
double v [ 3 ]
,
double a [ 3 ]
,
int PT
,
double t = 0. 0
,
int index = - 1
) ; |
-
-
void GetPosition( |
int reference
,
double x [ 3 ]
,
double v [ 3 ]
,
double a [ 3 ]
,
int PT
,
double t = 0. 0
,
int index = - 1
) ; |
-
-
void GetPosition( |
char* name
,
double x [ 3 ]
,
int PT
,
double t = 0. 0
,
int index = - 1
) ; |
- GetPosition.
-
-
-
- Returns the integer array index for the attribute name (and proxy class type) passed in.
-
char* GetString( |
int reference
,
int index = - 1
) ; |
-
-
char* GetString( |
char* name
,
int index = - 1
) ; |
- GetString.
-
void GetTimeInterval( |
const char* name
,
double& startTime
,
double& endTime
,
int index = 0
) ; |
-
-
void GetTimeInterval( |
const char* name
,
double time
,
double& startTime
,
double& endTime
,
int index = 0
) ; |
-
-
void GetTimeInterval( |
int reference
,
double time
,
double& startTime
,
double& endTime
,
int index = 0
) ; |
-
-
void GetTimeInterval( |
int reference
,
double& startTime
,
double& endTime
,
int index = 0
) ; |
Method: UpdateRemote<Type>
Summary: Change the value of an attribute in the remote owner of this proxy.
Description: NOTE: These functions do not immediately update this
proxy or the owner of this proxy. For
example, suppose "sample_int" is 2, and you have the
following code:
UpdateRemoteInt("sample_int", 3);
cout << GetInt("sample_int");
The above example code would print out 2.
This function is called in a certain event. The attribute will be updated in this proxy and the owner of this proxy sometime AFTER that event finishes but still at the same physical simulation time, although at possibly higher priorities. The update might not occur by the time of the very next event, but it will still occur sometime during the same physical time (although at possibly different priorities.). But once an event with a higher physical time is processed, then the attribute is definitely updated in both this proxy and the owner of this proxy.
Return: void.
This code is not implemented yet. Void UpdateRemoteInt(const char *name, int index, int new_value) { const int fill_mess_buff_size = INT_ATTRIBUTE::GetMessageSizeStatic(); char * const fill_message_buff = MIB.need(fill_mess_buff_size); INT_ATTRIBUTE::FillMessageWith(fill_message_buff, new_value); UpdateRemoteAttribute (name, index, fill_message_buff, fill_mess_buff_size); }.
Void UpdateRemoteInt(char *name, int new_value) { UpdateRemoteInt(name, 0, new_value); }.
void UpdateRemoteString(char *name, int index, char *new_value) {
const int fill_mess_buff_size
= STRING_ATTRIBUTE::GetMessageSize(new_value);
char * const fill_message_buff = MIB.need(fill_mess_buff_size);
((STRING_ATTRIBUTE_MESSAGE_INFO*)fill_message_buff)
->SetNbytes(fill_mess_buff_size);
STRING_ATTRIBUTE::FillMessageWith(fill_message_buff, new_value);
UpdateRemoteAttribute
(name, index, fill_message_buff, fill_mess_buff_size);
}
Void UpdateRemoteString(char *name, char *new_value) { UpdateRemoteString(name, 0, new_value); }.
Return information based on name of attribute.
-
-
-
-
-
void PrintStream( |
ostream& out = cout
,
int level = 0
) ; |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
struct OBJECT_PROXY::EMPTY_MESSAGE_RESULT
#include "ObjectProxy.H"
OUT: length of filled message.
Public Interface
Public Data
BASE_ATTRIBUTE* Attribute;
-
const char* Buff;
-
int OpWarning;
-
class OBJECT_PROXY_MESSAGE
#include "ObjectProxyMessage.H"
Public Interface
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
void Print( |
ostream& out = cout
) ; |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class OBJECT_TEMPLATE : public C_ITEM
#include "ObjectTemplate.H"
Public Interface
-
-
-
-
-
void AddMethod( |
void (* m ) ( void*, va_list& )
,
char* n
) ; |
-
-
-
-
int Execute( |
void* ObjectProxy
,
char* Mname
,
va_list& va
) ; |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
void SetDefine( |
int i
,
char* n
,
char* t
) ; |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class POLY_10_MOTION : public POLY_N_MOTION
#include "PolyMotion.H"
Public Interface
-
virtual BIG_FLOAT* GetCx( |
) ; |
-
-
virtual BIG_FLOAT* GetCy( |
) ; |
-
-
virtual BIG_FLOAT* GetCz( |
) ; |
-
-
-
-
-
class POLY_1_MOTION : public POLY_N_MOTION
#include "PolyMotion.H"
Public Interface
-
virtual BIG_FLOAT* GetCx( |
) ; |
-
-
virtual BIG_FLOAT* GetCy( |
) ; |
-
-
virtual BIG_FLOAT* GetCz( |
) ; |
-
-
-
-
-
class POLY_2_MOTION : public POLY_N_MOTION
#include "PolyMotion.H"
Public Interface
-
virtual BIG_FLOAT* GetCx( |
) ; |
-
-
virtual BIG_FLOAT* GetCy( |
) ; |
-
-
virtual BIG_FLOAT* GetCz( |
) ; |
-
-
-
-
-
class POLY_3_MOTION : public POLY_N_MOTION
#include "PolyMotion.H"
Public Interface
-
virtual BIG_FLOAT* GetCx( |
) ; |
-
-
virtual BIG_FLOAT* GetCy( |
) ; |
-
-
virtual BIG_FLOAT* GetCz( |
) ; |
-
-
-
-
-
class POLY_4_MOTION : public POLY_N_MOTION
#include "PolyMotion.H"
Public Interface
-
virtual BIG_FLOAT* GetCx( |
) ; |
-
-
virtual BIG_FLOAT* GetCy( |
) ; |
-
-
virtual BIG_FLOAT* GetCz( |
) ; |
-
-
-
-
-
class POLY_5_MOTION : public POLY_N_MOTION
#include "PolyMotion.H"
Public Interface
-
virtual BIG_FLOAT* GetCx( |
) ; |
-
-
virtual BIG_FLOAT* GetCy( |
) ; |
-
-
virtual BIG_FLOAT* GetCz( |
) ; |
-
-
-
-
-
class POLY_6_MOTION : public POLY_N_MOTION
#include "PolyMotion.H"
Public Interface
-
virtual BIG_FLOAT* GetCx( |
) ; |
-
-
virtual BIG_FLOAT* GetCy( |
) ; |
-
-
virtual BIG_FLOAT* GetCz( |
) ; |
-
-
-
-
-
class POLY_7_MOTION : public POLY_N_MOTION
#include "PolyMotion.H"
Public Interface
-
virtual BIG_FLOAT* GetCx( |
) ; |
-
-
virtual BIG_FLOAT* GetCy( |
) ; |
-
-
virtual BIG_FLOAT* GetCz( |
) ; |
-
-
-
-
-
class POLY_8_MOTION : public POLY_N_MOTION
#include "PolyMotion.H"
Public Interface
-
virtual BIG_FLOAT* GetCx( |
) ; |
-
-
virtual BIG_FLOAT* GetCy( |
) ; |
-
-
virtual BIG_FLOAT* GetCz( |
) ; |
-
-
-
-
-
class POLY_9_MOTION : public POLY_N_MOTION
#include "PolyMotion.H"
Public Interface
-
virtual BIG_FLOAT* GetCx( |
) ; |
-
-
virtual BIG_FLOAT* GetCy( |
) ; |
-
-
virtual BIG_FLOAT* GetCz( |
) ; |
-
-
-
-
-
#include "PolyMotion.H"
Public Interface
-
-
-
virtual void operator()( |
double t
,
int PT
,
double X [ 3 ]
,
double V [ 3 ]
) ; |
-
-
virtual void operator()( |
double t
,
int PT
,
double X [ 3 ]
,
double V [ 3 ]
,
double A [ 3 ]
) ; |
-
-
virtual void operator()( |
double t
,
int PT
,
double X [ 3 ]
) ; |
- Overloaded operators to evaluate position.
-
void AddPoints( |
double ts
,
double te
,
double t
,
double v0
,
double v1
,
double v2
,
double err2
,
...
) ; |
-
-
void Evaluate( |
BIG_FLOAT* c
,
double t
,
int n
,
double& X
,
double& V
) ; |
-
-
void Evaluate( |
BIG_FLOAT* c
,
double t
,
int n
,
double& X
,
double& V
,
double& A
) ; |
-
-
void Evaluate( |
BIG_FLOAT* c
,
double t
,
int n
,
double& X
) ; |
- Evaluate Methods (does single dimension - not all three at once).
-
virtual BIG_FLOAT* GetCx( |
) ; |
-
-
virtual BIG_FLOAT* GetCy( |
) ; |
-
-
virtual BIG_FLOAT* GetCz( |
) ; |
-
-
- Virtual functions that should be supplied by the derived child.
-
-
-
-
-
-
class POSITION_ATTRIBUTE_MESSAGE_INFO : public ATTRIBUTE_MESSAGE_INFO
#include "ObjectProxyMessage.H"
Public Interface
-
-
-
-
class PROXY_LEVEL_INFO
#include "ObjectProxyMessage.H"
Public Interface
-
void print( |
ostream& out = cout
) ; |
-
Public Data
int ArrayIndex;
-
int AttributeIndex;
-
int Level;
-
int ListId;
-
#include "Spline3Motion.H"
Public Interface
-
virtual void operator()( |
double t
,
int PT
,
double X [ 3 ]
) ; |
-
-
virtual void operator()( |
double t
,
int PT
,
double X [ 3 ]
,
double V [ 3 ]
) ; |
-
-
virtual void operator()( |
double t
,
int PT
,
double X [ 3 ]
,
double V [ 3 ]
,
double A [ 3 ]
) ; |
-
-
-
-
void init( |
double t0
,
double x0 [ 3 ]
,
double v0 [ 3 ]
,
double t1
,
double x1 [ 3 ]
,
double v1 [ 3 ]
) ; |
-
#include "Spline6Motion.H"
Public Interface
-
virtual void operator()( |
double t
,
int PT
,
double X [ 3 ]
) ; |
-
-
virtual void operator()( |
double t
,
int PT
,
double X [ 3 ]
,
double V [ 3 ]
) ; |
-
-
virtual void operator()( |
double t
,
int PT
,
double X [ 3 ]
,
double V [ 3 ]
,
double A [ 3 ]
) ; |
-
-
-
-
void init( |
double t0
,
double x0 [ 3 ]
,
double v0 [ 3 ]
,
double a0 [ 3 ]
,
double t1
,
double x1 [ 3 ]
,
double v1 [ 3 ]
,
double a1 [ 3 ]
) ; |
-
class STATIC_FLOAT_ATTRIBUTE : public BASE_ATTRIBUTE
#include "Attribute.H"
Class: STATIC_FLOAT_ATTRIBUTE.
Summary: publishable float (double) attribute for use in object proxies.
Description: If you want to publish non time dependant float data about your object, this is the class to use. Whenever this class is updated in value, that update is then sent to everyone who is subscribing to your object proxy. These updates are automatically taken care of through the use of operator overloading.
Examples: An example of the use of STATIC_FLOAT_ATTRIBUTE can be found in S_RanMot.H in demos/BmdSim.
Public Interface
-
- Method: STATIC_FLOAT_ATTRIBUTE() Summary: Standard constructor for a STATIC_FLOAT_ATTRIBUTE Description: The standard constructor initializes the value to 0. You should be aware of this when converting SPEEDES code to non SPEEDES code. The default constructor for a double (float) does not initialize values to 0. Return:
-
- Method: operator =(double) Summary: assigns a double value to a float attribute Description: Through operator overloading, we can update all the object proxies as well as change the value of the actual variable. Return: The new value to allow for chaining of assignments.
- a
- In: the new value for the attribute.
-
Method: operator double ()
Summary: returns the double value of the float attribute.
Description: This operator allows the STATIC_FLOAT_ATTRIBUTE to behave
like a normal double.
Return: the double value of the float attribute
-
- Method: operator *=(double)) Summary: multiplies the value of the attribute by the passed in value Description: This operator multiplies the value of the float attribute by the passed in value and then returns the new value. This new value is then sent to all the object proxies Return: the new value of the float attribute.
-
Method: operator ++()
Summary: prefix increment operator
Description: prefix increments the value of the float attribute and
sends this new value to the object proxies.
Return: the incremented value of the attribute
-
Method: operator ++(int)
Summary: postfix increment operator
Description: postfix increments the value of the float attribute and
sends this new value to the object proxies.
Return: the old value of the attribute
-
- Method: operator +=(double) Summary: increment value of attribute by passed in value Description: this operator increments the value of the float attribute by the passed in value and returns this new value. This new value is also sent to all the object proxies. Return: the new value of the float attribute.
- a
- In: The amount by which to increase the attribute.
-
Method: operator --()
Summary: prefix decrement operator
Description: prefix decrements the value of hte float attribute and
sends this new value to the object proxies.
Return: the decremented value of the attribute.
-
Method: operator --(int)
Summary: postfix decrement operator
Description: postfix decrements the value of hte float attribute and
sends this new value to the object proxies
Return: the old value of hte attribute.
-
- Method: operator -=(double) Summary: decrements the value of the attribute by the passed in value Description: This operator decrements the value of the float attribute by the passed in value and then returns the new value. This new value is then sent to all the object proxies. Return: the new value of the float attribute.
- a
- In:: The amount by which to increase the attribute.
-
- Method: operator /=(double) Summary: divides the value of the attribute by the passed in value Description: This operator divides the value of the float attribute by the passed in value and then returns the new value. This new value is then sent to all the object proxies Return: the new value of the float attribute.
-
Method: EmptyMessage
Summary: Removes the float attribute data and updates our value
Description: When an attribute within an object proxy is changed,
a message is sent to everyone, announcing this change.
this method is how we extract the data
Return: void
- buff
- In: The buffer containing the new attribute information.
-
- Method: FillMessage Summary: Fills the buffer buff with a float attribute message Description: When an attribute is updated, we want to announce this new value to the object proxies. This is done through a message and this method fills that message Return: void.
- buff
- InOut: Buffer to contain the message.
-
- Method: GetMessageSize() Summary: returns the size of a FLOAT_ATTRIBUTE_MESSAGE Description: When sending messages, we want to know how big they are. This method allows us to get the size of the message. Return: returns the size of a FLOAT_ATTRIBUTE_MESSAGE.
-
Method: GetSize()
Summary: returns the size of this attribute
Description:
Return: returns the size of this attribute
-
- Method: GetType() Summary: returns the type of this attribute: STATIC_FLOAT_ATTRIBUTE_TYPE Description: Each attribute type is defined by a differnt enum so that we can construct them from buffers which can tell us their type. Return: returns the type of this attribute: STATIC_FLOAT_ATTRIBUTE_TYPE.
-
- Method: GetValue() Summary: returns the value of the float attribute Description: returns the value of the float attribute Return: returns the value of the float attribute.
-
Method: assign(double)
Summary: schedules an update for every object proxy and updates the value
Description: Whenever the value of a STATIC_INT_ATTRIBUTE is
changed, this method is called which schedules
updates for every object proxy in the simulation and
then changes the value of the attribute.
Return: the new value of the attribute
- a
- In: the new value for the attribute.
-
virtual void outstream( |
ostream& out
,
int
) ; |
Method: outstream(ostream &, int)
Summary: prints this attribute to the passed in stream
Description:
Return: void
class STATIC_INT_ATTRIBUTE : public BASE_ATTRIBUTE
#include "Attribute.H"
Class: STATIC_INT_ATTRIBUTE.
Summary: publishable integer attribute for use in object proxies.
Description: If you want to publish non time dependant integer data about your object, this is the class to use. Whenever this class is updated in value, that update is then sent to everyone who is subscribing to your object proxy. These updates are automatically taken care of through the use of operator overloading.
Examples: An example of the use of STATIC_INT_ATTRIBUTE can be found in S_RanMot.H in demos/BmdSim.
Public Interface
-
- Method: STATIC_INT_ATTRIBUTE() Summary: default constructor for a STATIC_INT_ATTRIBUTE Description: The default constructor sets the value of an attribute to zero. Notice that C++ does not initialize local variables or those allocated by new. If you design your code assuming these objects are initialized to zero and then rewrite your code using normal integers, you could get different behavior so be careful of this. Return: a new STATIC_INT_ATTRIBUTE.
-
Method: operator = ()
Summary: assigns the integer value to this attribute
Description: This schedules an update for all the subscribed object
proxies and then updates the value. This new value is
then returned.
Return: the new integer value
-
- Method: operator int() Summary: Returns the integer value of this attribute Description: Returns the integer value of this attribute Return: Returns the integer value of this attribute.
-
- Method: operator %=(int) Summary: Multiplies attribute mod the passed value and returns new value Description: Multiplies attribute mod the passed value and returns new value Through the assign call, the object proxes are updated as well. Return: The attribute mod the passed in value.
- a
- In: Amount by which to mod the attribute.
-
- Method: operator &=(int) Summary: and's attribute with passed in value and returns new value Description: and's attribute with the passed value and returns new value Through the assign call, the object proxes are updated as well. Return: Value of attribute after being and'ed with the passed in value.
- a
- In: Value with which to and the attribute.
-
- Method: operator *=(int) Summary: Multiplies attribute by the passed value and returns new value Description: Multiplies attribute by the passed value and returns new value Through the assign call, the object proxes are updated as well. Return: The attribute multiplied by the passed in value.
- a
- In: amount by which to multiply the attribute.
-
- Method: operator ++() Summary: Increments the value of a value and returns the new value Description: Increments the value of a value and returns the new value. Through the assign call, the object proxes are updated as well Return: the updated value (attribute + 1).
-
Method: operator ++()
Summary: Increments the value of a value and returns the old value
Description: Increments the value of a value and returns the old
value. Through the assign call, the object proxes are
updated as well. Notice that this is the postfix
operator
Return: the old value of the attribute
-
Method: operator +=(int)
Summary: Increments attribute by the passed value and returns new value
Description: Increments attribute by the passed value and returns
new value Through the assign call, the object proxes
are updated as well.
Return: the new value (attribute + a)
- a
- In: value to be added to attribute.
-
Method: operator --()
Summary: Decrements the value of a value and returns the new value
Description: Increments the value of a value and returns the new
value. Through the assign call, the object proxes are
updated as well. Notice that this is the prefix
operator
Return: the new value (attribute - 1)
-
Method: operator --()
Summary: Decrements the value of a value and returns the old value
Description: Increments the value of a value and returns the old
value. Through the assign call, the object proxes are
updated as well. Notice that this is the postfix
operator
Return: the current value (attribute)
-
Method: operator -=(int)
Summary: Decrements attribute by the passed value and returns new value
Description: Decrements attribute by the passed value and returns
new value Through the assign call, the object proxes
are updated as well.
Return:
- a
- In: value to be subtracted from attribute.
-
- Method: operator /=(int) Summary: Divides attribute by the passed value and returns new value Description: Divides attribute by the passed value and returns new value Through the assign call, the object proxes are updated as well. Return: The attribute divided by the passed in value.
- a
- In: ammount by which to divide the attribute.
-
- Method: operator <<=(int) Summary: shifts the attribute left by passed in vale and return new value Description: left shifts attribute by the passed value and returns new value Through the assign call, the object proxes are updated as well. Return: Value of attribute after shifted left by passed in value.
- a
- In: ammount to shift attribute left.
-
- Method: operator >>=(int) Summary: Right shifts attribute by the passed value and returns new value Description: Right shifts attribute by the passed value and returns new value Through the assign call, the object proxes are updated as well. Return: Value of the attribute after being shifted right.
- a
- In: ammount to shift attribute.
-
- Method: operator ^=(int) Summary: not's attribute with passed in value and returns new value Description: not's attribute with the passed value and returns new value Through the assign call, the object proxes are updated as well. Return: Value of attribute after being not'ed with the passed in value.
- a
- In: Value with which to 'not' the attribute.
-
- Method: operator |=(int) Summary: or's attribute with the passed value and returns new value Description: or's attribute with the passed value and returns new value Through the assign call, the object proxes are updated as well Return: value of attribute after being or'ed with the passed value.
- a
- In: value with which to or the attribute.
-
Method: EmptyMessage
Summary: Removes int attribute data from the passed in buff (message)
Description: Removes int attribute data from the passed in buff
(message). This data is then used to update the
values of our int attribute
Return: void
-
Method: FillMessage
Summary: Fills passed in buffer with a INT_ATTRIBUTE_MESSAGE
Description: Fills passed in buffer with a INT_ATTRIBUTE_MESSAGE
Return: void
- buff
- InOut: Buffer to contain the int attribute message.
-
-
-
- Method: GetSize() Summary: Returns the size of a STATIC_INT_ATTRIBUTE Description:Returns the size of a STATIC_INT_ATTRIBUTE Return: Returns the size of a STATIC_INT_ATTRIBUTE.
-
- Method: GetType() Summary: Returns the type of this attribute: STATIC_INT_ATTRIBUTE_TYPE Description:Returns the type of this attribute: STATIC_INT_ATTRIBUTE_TYPE Return: Returns the type of this attribute: STATIC_INT_ATTRIBUTE_TYPE.
-
- Method: GetValue() Summary: Returns the integer value of this attribute Description: returns the integer value of the attribute Return: Returns the integer value of this attribute.
-
Method: assign(int)
Summary: updates the value of the attribute
Description: This schedules an update for all the subscribed object
proxies and then updates the value. This new value is
then returned.
Return:
- a
- In: New value for the attribute.
-
virtual void outstream( |
ostream& out
,
int
) ; |
- Method: outstream(ostream&, int) Summary: prints our attribute to the passed in stream Description: prints our attribute to the passed in stream Return: void.
- out
- In: stream to which we should print.
-
-
-
-
-
- Method: GetMessageSizeStatic() Summary: Returns the size of an INT_ATTRIBUTE message Description: Returns the size of an INT_ATTRIBUTE message Return: Returns the size of an INT_ATTRIBUTE message.
class STATIC_LOGICAL_ATTRIBUTE : public BASE_ATTRIBUTE
#include "Attribute.H"
Class: STATIC_LOGICAL_ATTRIBUTE.
Summary: publishable logical attribute for use in object proxies.
Description: If you want to publish non time dependant logical data about your object, this is the class to use. Whenever this class is updated in value, that update is then sent to everyone who is subscribing to your object proxy. These updates are automatically taken care of through the use of operator overloading.
Examples: An example of the use of STATIC_LOGICAL_ATTRIBUTE can be found in S_RanMot.H in demos/BmdSim.
Public Interface
-
Method: STATIC_LOGICAL_ATTRIBUTE()
Summary: Default constructor for a STATIC_LOGICAL_ATTRIBUTE
Description: The default constructor initializes the value of the
logical to true. Notice that this may not be the case for
logicals in non-SPEEDES code.
Return: a new STATIC_LOGICAL_ATTRIBUTE
-
- Method: operator =(int) Summary: assigns the passed in value to the attribute Description: Just like the operator int(), the intent of this method is to allow a STATIC_LOGICAL_ATTRIBUTE to operate exactly as one would expect a boolean to behave. Return: the new value of the STATIC_LOGICAL_ATTRIBUTE.
- a
- In: the new value of the attribute.
-
- Method: operator int() Summary: integer constructor from an attribute. Description: This operator allows a STATIC_LOGICAL_ATTRIBUTE to behave exactly like a normal boolean value. That is, it returns an integer value which can be tested against 0 for truth or false. Return: the integer value of the attribute.
-
Method: EmptyMessage
Summary: Remove STATIC_LOGICAL_ATTRIBUTE values from a message and
updates our own values.
Description: Remove STATIC_LOGICAL_ATTRIBUTE values from a message and
updates our own values
Retuvoidrn:
- buff
- In: buffer containing the new values.
-
Method: FillMessage
Summary: Fills a message with the STATIC_LOGICAL_ATTRIBUTE value
Description: Fills a message with the STATIC_LOGICAL_ATTRIBUTE
value so that we can send that message to an object
proxy for an update
Return: void
- buff
- InOut: Buffer to contain the message.
-
- Method: GetMessageSize() Summary: Returns the size of a message for a STATIC_LOGICAL_ATTRIBUTE Description: Returns the size of a message for a STATIC_LOGICAL_ATTRIBUTE Return: Returns the size of a message for a STATIC_LOGICAL_ATTRIBUTE.
-
Method: GetSize()
Summary: Returns the size of this attribute
Description: We need to be able to get attributes size through a
virtual method.
Return: the size of a STATIC_LOGICAL_ATTRIBUTE
-
- Method: GetType() Summary: returns the type of this attribute: STATIC_LOGICAL_ATTRIBUTE_TYPE Description: We need to be able to construct or identify these attributes and use enum's along with these methods to identify the tyeps Return: the type of this attribute: STATIC_LOGICAL_ATTRIBUTE_TYPE.
-
- Method: GetValue() Summary: Returns the value of the attribute Description: Returns the value of the attribute Return: Returns the value of the attribute.
-
Method: assign(int)
Summary: updates the value of a STATIC_LOGICAL_ATTRIBUTE
Description: Whenever a STATIC_LOGICAL_ATTRIBUTE is updated
through any public method, this method is called to
change the value of the attribute as well as scheule
all the object proxies to be updated
Return: the new value of the attribute
- a
- In: the new value of the attribute.
-
virtual void outstream( |
ostream& out
,
int
) ; |
Method: outstream(ostream &, int)
Summary: prints a STATIC_LOGICAL_ATTRIBUTE to the passed in stream
Description: This virutal method allows us to print out the attribute
Return: void
class STRING_ATTRIBUTE : public BASE_ATTRIBUTE
#include "Attribute.H"
Class: STRING_ATTRIBUTE.
Summary: publishable string attribute for use in object proxies.
Description: If you want to publish non time dependant string data about your object, this is the class to use. Whenever this class is updated in value, that update is then sent to everyone who is subscribing to your object proxy. These updates are automatically taken care of through the use of operator overloading.
Examples: An example of the use of STRING_ATTRIBUTE can be found in S_RanMot.H in demos/BmdSim.
Public Interface
-
Method: STRING_ATTRIBUTE()
Summary: Default constructor, sets the string to NULL
Description: Default constructor, sets the string to NULL.
Return: a new STRING_ATTRIBUTE
-
Method: ~STRING_ATTRIBUTE()
Summary: destructor for a STRING_ATTRIBUTE
Description: The destructor for a STRING_ATTRIBUTE frees any memory that
had been allocated for storage.
Return: void
-
- Method: operator =(char *) Summary: Assigns a string to a STRING_ATTRIBUTE Description: When one assigns a string to a STRING_ATTRIBUTE, the string is copied so that one does not need to concern ones self with freeing or deleting the memory on the right hand side of the assignment. As with all other ATTRIBUTES, this always schedules an update for the object proxies. Return: the char * string that was allocated for thie STRING_ATTRIBUTE.
- a
- In: The string we want assigned to this attribute.
-
-
-
Method: operator !=(char *)
Summary: compares the passed in string with this attribute
Description: This operator returns 0 if the strings are equal and 0
otherwise
Return: This operator returns 0 if the strings are equal and 1 otherwise
- a
- In: The string you wish to compare to this attribute.
-
Method: operator ==(char *)
Summary: compares the passed in string with the attribute
Description: This operator returns 1 if the strings are equal and 0
otherwise.
Return: This operator returns 1 if the strings are equal and 0 otherwise
- a
- In: The string you wish to compare to this attribute.
-
Method: Copy(BASE_ATTRIBUTE*)
Summary: Copies the passed in attribute to this attribute
Description: Copies the passed in attribute to this attribute
Return: void
-
Method: EmptyMessage
Summary: copies the attribute information out of the buffer and
into this attribute
Description: When an attribute has been changed, a scheduleupdate
event is scheduled which updates all the object
proxies. The update is carried in a message filled
by the method FillMessage and this method is used to
unpack that message
Return: void
-
Method: FillMessage
Summary: Fills the char * buff with this attribute as a message
Description: Once we have called GetMessageSize() to find out how
much memory is required to send this attribute, we
can allocate that memory and then pass it to this
method to fill in that buffer.
Return:
- buff
- InOut: Buffer to contain this attribute as a message.
-
- Method: GetMessageSize() Summary: returns the size of message required to send this attribute Description: STRING_ATTRIBUTE is different from many of the attributes like the INT_ATTRIBUTE since the STRING_ATTRIBUTE has a dynamic size. This method lets us know how much room is really needed to send this attribute to another node in the case of a scheduled update. Return: returns the size of message required to send this attribute.
-
- Method: GetSize() Summary: Returns the size of this attribute. Description: Notice that this returns the size of the attribute and that means without including the size of the string, just the size of the attribute with the char Return: Returns the size of this attribute.
-
- Method: GetType() Summary: Returns the type of this attribute: STRING_ATTRIBUTE_TYPE Description: Each derived ATTRIBUTE type has a virtual function call to identify it's type. All the types are listed at the top of this header file. Return: The type of this attribute: STRING_ATTRIBUTE_TYPE.
-
- Method: GetValue() Summary: returns the char * string value for the STRING_ATTRIBUTE Description: returns the char * string value for the STRING_ATTRIBUTE Return: returns the char * string value for the STRING_ATTRIBUTE.
-
- Method: assign(char *) Summary: Assigns a new value to the STRING_ATTRIBUTE Description: Whenever a new value is assigned to a string attribute, an update is scheduled for all the object proxies and the new value is assigned to the string. Return: new value of the STRING_ATTRIBUTE.
-
virtual void outstream( |
ostream& out
,
int
) ; |
- Method: outstream(ostream &, int) Summary: prints this attribute to the passed in stream Description: prints this attribute to the passed in stream Return: void.
- out
- In: The stream to which we should print this string attribute.
-
-
-
-
-
-
class STRING_ATTRIBUTE_MESSAGE_INFO : public ATTRIBUTE_MESSAGE_INFO
#include "ObjectProxyMessage.H"
Public Interface
-
-
-
-
STATE_DOUBLE* operator=(double x [ 3 ]
) ; |
Method: operator =(double[3])
Summary: Allows assignment of a position through the '=' operator
Description: Allows assignment of a position through the '='
operator. As with the assign() method, there is no
error checking.
Return: A pointer to the stored values.
|
void operator+=(C_DOUBLE& dbl
,
BIG_FLOAT& v2
) ; |
|
void operator+=(BIG_FLOAT& v1
,
C_DOUBLE& dbl
) ; |
#define DOUBLE_CHECK dbl; dbl +=. |
double operator[](int i
) ; |
Method: operator [] (int)
Summary: Returns the i'th coordinate
Description: Returns the i'th coordinate value. This is not
error checked to make sure you request a valid
number. If you ask for the 973rd coordinate, you
get what you deserve.
Return: Returns the i'th coordinate value
|
- i
- In: Which coordinate you want.
|
void Convert(double X1 [ 3 ]
,
int PT1
,
double X2 [ 3 ]
,
int PT2
,
double t = 0
) ; |
|
void Convert(double X1 [ 3 ]
,
double V1 [ 3 ]
,
int PT1
,
double X2 [ 3 ]
,
double V2 [ 3 ]
,
int PT2
,
double t = 0
) ; |
|
void Convert(double X1 [ 3 ]
,
double V1 [ 3 ]
,
double A1 [ 3 ]
,
int PT1
,
double X2 [ 3 ]
,
double V2 [ 3 ]
,
double A2 [ 3 ]
,
int PT2
,
double t = 0
) ; |
|
void CrossProduct(double X1 [ 3 ]
,
double X2 [ 3 ]
,
double X3 [ 3 ]
) ; |
|
void Difference(double X1 [ 3 ]
,
double X2 [ 3 ]
,
double X3 [ 3 ]
) ; |
|
double DotProduct(double X1 [ 3 ]
,
double X2 [ 3 ]
) ; |
|
void EARTH_to_ECI(double t
,
double Earth [ 3 ]
,
double Eci [ 3 ]
) ; |
|
void EARTH_to_ECR(double Earth [ 3 ]
,
double Ecr [ 3 ]
) ; |
|
void ECI_to_EARTH(double t
,
double Eci [ 3 ]
,
double Earth [ 3 ]
) ; |
|
void ECI_to_ECR(double t
,
double x [ 3 ]
) ; |
|
void ECI_to_ECR(double t
,
double x [ 3 ]
,
double v [ 3 ]
) ; |
|
void ECI_to_ECR(double t
,
double x [ 3 ]
,
double v [ 3 ]
,
double a [ 3 ]
) ; |
|
void ECR_to_EARTH(double Ecr [ 3 ]
,
double Earth [ 3 ]
) ; |
|
void ECR_to_ECI(double t
,
double x [ 3 ]
) ; |
|
void ECR_to_ECI(double t
,
double x [ 3 ]
,
double v [ 3 ]
) ; |
|
void ECR_to_ECI(double t
,
double x [ 3 ]
,
double v [ 3 ]
,
double a [ 3 ]
) ; |
|
virtual void EmptyMessage(const char* buff
) ; |
|
virtual void FillMessage(char* buff
) ; |
|
void GetEARTH(double& Lat
,
double& Lon
,
double& Alt
,
double t = 0. 0
) ; |
Method: GetEarth(double&, double&, double&, double) Summary: Computes the position in the EARTH coordinate system Description: No matter what coordinate system is used to store the position, this returns the new position in the three parameters. The time (t) parameter is ignored unless we are currently in ECI coordinate system in which case t is ?????????? (time of day?). Return: void. |
- Lat
- Out: Latitude coordinate.
- Lon
- Out: Longitude coordinate.
- Alt
- Out: Altitude coordinate.
- t
- In: Seconds after midnight.
|
void GetECI(double x [ 3 ]
,
double t = 0. 0
) ; |
Method: GetECI(double[3], double) Summary: Computes the position in ECI coordinates Description: Computes the position in ECI coordinates and returns those values in the first parameter. Notice that this does not change the stored state. For this reason, if you are going to be making successive calls to GetECI, it may be wise to call SetECI first or just save the values and not call the method again. Return: void. |
-
- Out: Position in ECI coordinates.
- t
- In: seconds after midnight.
|
void GetECR(double x [ 3 ]
,
double t = 0. 0
) ; |
Method: GetECR(double[3], double) Summary: Computes the position in ECR coordinates Description: Computes the position in ECR coordinates and returns those values in the first parameter. Notice that this does not change the stored state. For this reason, if you are going to be making successive calls to GetECR, it may be wise to call SetECR first or just save the values and not call the method again. Return: void. |
-
- Out: Position in ECI coordinates.
- t
- In: seconds after midnight.
|
virtual int GetMessageSize() ; |
|
int GetPositionType() ; |
Method: GetPositionType() Summary: Returns the type of coordinate system that is currently in use Description: Returns the type of coordinate system that is currently in use. The possibilities are: EARTH: Latitude, Longitude, Altitude ECR: X, Y, Z in a rotating earth coordinate system ECI: X, Y, Z in an inertial coordinate system Return: Returns the type of coordinate system that is currently in use. |
virtual int GetSize() ; |
Method: GetSize() Summary: Returns the size of a STATIC_POSITION_ATTRIBUTE Description: Returns the size of a STATIC_POSITION_ATTRIBUTE Return: Returns the size of a STATIC_POSITION_ATTRIBUTE. |
virtual int GetType() ; |
Method: GetType() Summary: Returns the type of this attribute: STATIC_POSITION_ATTRIBUTE_TYPE Description: Each type is enumerated so we can properly find them and the enumeration can be found at the top of Attribute.H. Return: Returns the type of this attribute: STATIC_POSITION_ATTRIBUTE_TYPE. |
int GetUnitDistance(char* unitDistance
) ; |
|
int GetUnitTime(char* unitTime
) ; |
|
STATE_DOUBLE* GetValue() ; |
Method: GetValue() Summary: Returns a pointer to the stored value of the position Description: The position is stored as an array and this simply returns a pointer to that array. BE VERY CAREFUL!! any changes you make to that array are not reflected in the object proxy!!!! The only way to make changes that are reflected in the object proxies is to use the STATIC_POSITION_ATTRIBUTE::Set*() methods. Return: A pointer to the present stored position. |
void GetValue(double x [ 3 ]
,
int PT
,
double t = 0. 0
) ; |
Method: GetValue(double[3], int, double) Summary: Computes and returns position in requested coordinate system Description: Computes the position in the passed coordinate system and returns those values in the first parameter. Notice that this does not change the stored state. For this reason, if you are going to be making successive calls to GetValue, it may be wise to call SetECR or SetECI (whichever you are going to be using most frequently) first or just save the values and not call the method again. Return: void. |
-
- Out: Coordinates in requested system.
- PT
- In: Coordinate system in which to evaluate the postion. Options are: EARTH: Latitude, Longitude, Altitude ECR: X, Y, Z in a rotating earth coordinate system ECI: X, Y, Z in an inertial coordinate system.
- t
- In: Seconds after midnight.
|
double KilometersPerSecond(double speed
,
int unitDistance
,
int unitTime
) ; |
|
double Kilometers_to_Miles(double kilometers
) ; |
|
double Kilometers_to_NauticalMiles(double kilometers
) ; |
|
double Kilometers_to_UnitDistance(double kilometers
,
int unitDistance
) ; |
|
double Magnitude(double X [ 3 ]
) ; |
|
char* MapAttribute(int index
) ; |
|
int MapAttribute(char* name
) ; |
static const int LOGICAL_TRUE=1;
static const int LOGICAL_FALSE=0;
|
double Miles_to_Kilometers(double miles
) ; |
|
double NauticalMiles_to_Kilometers(double nauticalMiles
) ; |
|
void Normalize(double X [ 3 ]
) ; |
|
void ScalarMultiply(double X [ 3 ]
,
double Scaler
) ; |
|
void SetEARTH(double Lat
,
double Lon
,
double Alt
) ; |
Method: SetEarth(double, double, double) Summary: Sets a position in EARTH coordinates Description: Sets the latitude, longitude and altitude to the passed in values as also sets the position type to EARTH. This is not error checked so, if you are in EARTH coordinates, it will happily allow you to make your position 74922.76 degrees longitude 87823 degrees latitude, and an altitude of -5692. Return: void. |
- Lat
- In: New latitude.
- Lon
- In: New longitude.
- Alt
- In: New altitude.
|
void SetECI(double x [ 3 ]
) ; |
Method: SetEDI(double[3])
Summary: Sets a new position in ECI coordinates
Description: Sets a new position in Earth Centered Inertial (ECI)
coordinate system.
Return: void
|
-
- In: New position in ECI coordinates.
|
void SetECR(double x [ 3 ]
) ; |
Method: SetEDR(double[3])
Summary: Sets a new position in ECR coordinates
Description: Sets a new position in Earth Centered Rotating (ECR)
coordinate system.
Return: void
|
-
- In: New position in ECI coordinates.
|
double Squared(double X
) ; |
|
void Sum(double X1 [ 3 ]
,
double X2 [ 3 ]
,
double X3 [ 3 ]
) ; |
|
double UnitDistance_to_Kilometers(double distance
,
int unitDistance
) ; |
|
void VectorCopy(double Xout [ 3 ]
,
double Xin [ 3 ]
) ; |
|
STATE_DOUBLE* assign(double x [ 3 ]
) ; |
Method: assign(double[3]) Summary: Sets the position to the passed in values Description: Lets you change your position to the requested values. This is not error checked so, if you are in EARTH coordinates, it will happily allow you to make your position 74922.76 degrees longitude 87823 degrees latitude, and an altitude of -5692. Return: A pointer to the stored values. |
void delete_vector_with_child_type() ; |
|
void full_pivot(BIG_FLOAT** A
,
BIG_FLOAT* B
,
int* X
,
int n
,
int index
) ; |
|
iterate |
#include "matrix_equation.H" |
void iterate(BIG_FLOAT** A
,
BIG_FLOAT* B
,
BIG_FLOAT* X
,
int n
) ; |
|
int matrix_equation(BIG_FLOAT** A
,
BIG_FLOAT* B
,
BIG_FLOAT* X
,
int n
) ; |
Typedef long double BIG_FLOAT; |
virtual void outstream(ostream& out
,
int
) ; |
|
void set_gsam(double g
) ; |
EARTH: Latitude, Longitude, Altitude ECR: X, Y, Z in a rotating earth coordinate system ECI: X, Y, Z in an inertial coordinate system. |
void swap_columns(BIG_FLOAT** A
,
int* X
,
int column1
,
int column2
,
int n
) ; |
|
void swap_rows(BIG_FLOAT** A
,
BIG_FLOAT* X
,
int n
) ; |
|
verify |
#include "matrix_equation.H" |
int verify(BIG_FLOAT** A
,
BIG_FLOAT* X
,
BIG_FLOAT* B
,
int n
) ; |
|
- REMOVE=-1
- NEITHER=1
- OBJECT_PROXY_ADD=0
#include "ObjectProxyMessage.H"
Enum: ATTRIBUTE_TYPE Summary: enums of different attribute type Description: each attribute type must be enumerated so that we can identify them by lookup. The last enum must be N_ATTRIBUTE_TYPES so we know how many there are.
- STATIC_INT_ATTRIBUTE_TYPE
- Attribute type of integer.
- STATIC_FLOAT_ATTRIBUTE_TYPE
- Attribute type of float (doubles).
- STATIC_LOGICAL_ATTRIBUTE_TYPE
- Attribute type of logicals (booleans).
- STATIC_POSITION_ATTRIBUTE_TYPE
- Attribute type of static positions.
- DYNAMIC_INT_ATTRIBUTE_TYPE
- Attribute type of dynamic (time dependant) int.
- DYNAMIC_FLOAT_ATTRIBUTE_TYPE
- Attribute type of dynamic (time dependant) floats.
- DYNAMIC_LOGICAL_ATTRIBUTE_TYPE
- Attribute type of dynamic (time dependant) logical.
- DYNAMIC_OBJECT_ATTRIBUTE_TYPE
- Attribute type of dynamic (time dependant) object.
- DYNAMIC_POSITION_ATTRIBUTE_TYPE
- Attribute type of dynamic (time dependant) position.
- STRING_ATTRIBUTE_TYPE
- Attribute type of string.
- OBJECT_ATTRIBUTE_TYPE
- Attribute type of objects.
- LIST_ATTRIBUTE_TYPE
- Attribute type for lists.
- N_ATTRIBUTE_TYPES
- Total number of attribute types.
#include "Attribute.H"