mirror of
https://github.com/nasa/trick.git
synced 2024-12-20 05:37:55 +00:00
Split test sims and fun sims into separate directories.
Moved SIM_test_ip and a couple of other sims that depend on the same model set to a new test directory. I'm doing a couple of sims at a time. refs #191
This commit is contained in:
parent
950e319c1b
commit
90fd0ff9f8
1
Makefile
1
Makefile
@ -283,6 +283,7 @@ $(UNIT_TEST_DIRS):
|
|||||||
unit_test: $(UNIT_TEST_DIRS)
|
unit_test: $(UNIT_TEST_DIRS)
|
||||||
|
|
||||||
sim_test:
|
sim_test:
|
||||||
|
@ $(MAKE) -C test
|
||||||
@ $(MAKE) -C trick_sims test
|
@ $(MAKE) -C trick_sims test
|
||||||
|
|
||||||
#requirements:
|
#requirements:
|
||||||
|
@ -63,11 +63,8 @@ else
|
|||||||
LIBEXEC = lib
|
LIBEXEC = lib
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Do this section only once
|
TRICK_INCLUDES := -I${TRICK_HOME}/trick_source -I${TRICK_HOME}/include -I${TRICK_HOME}/include/trick/compat
|
||||||
ifeq ($(MAKELEVEL),0)
|
TRICK_VERSIONS := -DTRICK_VER=$(TRICK_MAJOR) -DTRICK_MINOR=$(TRICK_MINOR)
|
||||||
|
|
||||||
export TRICK_INCLUDES := -I${TRICK_HOME}/trick_source -I${TRICK_HOME}/include -I${TRICK_HOME}/include/trick/compat
|
|
||||||
export TRICK_VERSIONS := -DTRICK_VER=$(TRICK_MAJOR) -DTRICK_MINOR=$(TRICK_MINOR)
|
|
||||||
|
|
||||||
TRICK_SYSTEM_CFLAGS = $(TRICK_INCLUDES) $(TRICK_VERSIONS) -fpic
|
TRICK_SYSTEM_CFLAGS = $(TRICK_INCLUDES) $(TRICK_VERSIONS) -fpic
|
||||||
TRICK_SYSTEM_CXXFLAGS = $(TRICK_INCLUDES) $(TRICK_VERSIONS) -fpic
|
TRICK_SYSTEM_CXXFLAGS = $(TRICK_INCLUDES) $(TRICK_VERSIONS) -fpic
|
||||||
@ -90,17 +87,12 @@ ifeq ($(USE_ER7_UTILS), 1)
|
|||||||
ER7_UTILS_HOME := $(TRICK_HOME)/trick_source/er7_utils
|
ER7_UTILS_HOME := $(TRICK_HOME)/trick_source/er7_utils
|
||||||
TRICK_SYSTEM_CFLAGS += -DUSE_ER7_UTILS_INTEGRATORS
|
TRICK_SYSTEM_CFLAGS += -DUSE_ER7_UTILS_INTEGRATORS
|
||||||
TRICK_SYSTEM_CXXFLAGS += -DUSE_ER7_UTILS_INTEGRATORS
|
TRICK_SYSTEM_CXXFLAGS += -DUSE_ER7_UTILS_INTEGRATORS
|
||||||
ifneq ($(wildcard ${ER7_UTILS_HOME}/CheckpointHelper),)
|
TRICK_LIBS += -ler7_utils
|
||||||
|
ifneq ($(wildcard ${ER7_UTILS_HOME}/CheckpointHelper),)
|
||||||
USE_ER7_UTILS_CHECKPOINTHELPER = 1
|
USE_ER7_UTILS_CHECKPOINTHELPER = 1
|
||||||
TRICK_SYSTEM_CFLAGS += -DUSE_ER7_UTILS_CHECKPOINTHELPER
|
TRICK_SYSTEM_CFLAGS += -DUSE_ER7_UTILS_CHECKPOINTHELPER
|
||||||
TRICK_SYSTEM_CXXFLAGS += -DUSE_ER7_UTILS_CHECKPOINTHELPER
|
TRICK_SYSTEM_CXXFLAGS += -DUSE_ER7_UTILS_CHECKPOINTHELPER
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
endif # MAKELEVEL = 0
|
|
||||||
|
|
||||||
ifeq ($(USE_ER7_UTILS), 1)
|
|
||||||
TRICK_LIBS += -ler7_utils
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(TRICK_FORCE_32BIT), 1)
|
ifeq ($(TRICK_FORCE_32BIT), 1)
|
||||||
|
@ -24,9 +24,7 @@ endif
|
|||||||
SHARED_LIB_OPT := -shared
|
SHARED_LIB_OPT := -shared
|
||||||
RPATH = -Wl,-rpath=${TRICK_LIB_DIR}
|
RPATH = -Wl,-rpath=${TRICK_LIB_DIR}
|
||||||
|
|
||||||
ifeq ($(MAKELEVEL),0)
|
TRICK_LDFLAGS = -Wl,--export-dynamic
|
||||||
export TRICK_LDFLAGS += -Wl,--export-dynamic
|
|
||||||
endif
|
|
||||||
PLATFORM_LIBS = -lrt
|
PLATFORM_LIBS = -lrt
|
||||||
|
|
||||||
LD_WHOLE_ARCHIVE := -Wl,-whole-archive
|
LD_WHOLE_ARCHIVE := -Wl,-whole-archive
|
||||||
|
26
test/.gitignore
vendored
Normal file
26
test/.gitignore
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
DP_rt_*.xml
|
||||||
|
makefile
|
||||||
|
S_job_execution
|
||||||
|
S_run_summary
|
||||||
|
send_hs
|
||||||
|
varserver_log
|
||||||
|
log_*
|
||||||
|
chkpnt_*
|
||||||
|
MONTE_RUN_*
|
||||||
|
.S_library*
|
||||||
|
.icg_no_found
|
||||||
|
CP_out
|
||||||
|
MAKE_out
|
||||||
|
Makefile_sim
|
||||||
|
Makefile_swig
|
||||||
|
S_default.dat
|
||||||
|
S_document.xml
|
||||||
|
S_library_list
|
||||||
|
S_main_*
|
||||||
|
S_sie.resource
|
||||||
|
S_source.cpp
|
||||||
|
S_source.hh
|
||||||
|
T_main_*
|
||||||
|
trick
|
||||||
|
jitlib
|
||||||
|
build
|
1044
test/SIM_rti/RUN_test/unit_test.py
Normal file
1044
test/SIM_rti/RUN_test/unit_test.py
Normal file
File diff suppressed because it is too large
Load Diff
37
test/SIM_rti/S_define
Normal file
37
test/SIM_rti/S_define
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
/************************TRICK HEADER*************************
|
||||||
|
PURPOSE:
|
||||||
|
(This comment lists out the other object files that are not included from c++ headers)
|
||||||
|
LIBRARY DEPENDENCIES:
|
||||||
|
(
|
||||||
|
)
|
||||||
|
*************************************************************/
|
||||||
|
|
||||||
|
#include "sim_objects/default_trick_sys.sm"
|
||||||
|
##include "test_ip/include/ClassOfEverything.hh"
|
||||||
|
|
||||||
|
class testSimObject : public Trick::SimObject {
|
||||||
|
|
||||||
|
public:
|
||||||
|
ClassOfEverything obj ;
|
||||||
|
TEST_STRUCT t ;
|
||||||
|
my_ns::AA ns_test ;
|
||||||
|
|
||||||
|
testSimObject() {}
|
||||||
|
|
||||||
|
private:
|
||||||
|
testSimObject (const testSimObject &);
|
||||||
|
testSimObject & operator= (const testSimObject &);
|
||||||
|
|
||||||
|
} ;
|
||||||
|
|
||||||
|
// Instantiations
|
||||||
|
testSimObject test_so ;
|
||||||
|
|
||||||
|
// Connect objects
|
||||||
|
void create_connections() {
|
||||||
|
|
||||||
|
// Set the default termination time
|
||||||
|
trick_sys.sched.set_terminate_time(1.0) ;
|
||||||
|
trick_sys.sched.set_freeze_frame(0.10) ;
|
||||||
|
}
|
||||||
|
|
2
test/SIM_rti/S_overrides.mk
Normal file
2
test/SIM_rti/S_overrides.mk
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
TRICK_CFLAGS += -I../models
|
||||||
|
TRICK_CXXFLAGS += -I../models
|
2993
test/SIM_test_ip/RUN_test/unit_test.py
Normal file
2993
test/SIM_test_ip/RUN_test/unit_test.py
Normal file
File diff suppressed because it is too large
Load Diff
@ -8,11 +8,10 @@ LIBRARY DEPENDENCIES:
|
|||||||
|
|
||||||
#include "sim_objects/default_trick_sys.sm"
|
#include "sim_objects/default_trick_sys.sm"
|
||||||
|
|
||||||
##include "test_ip/include/Ball_test.hh"
|
##include "test_ip/include/ClassOfEverything.hh"
|
||||||
##include "test_ip/include/OverloadedVariable.hh"
|
##include "test_ip/include/OverloadedVariable.hh"
|
||||||
|
|
||||||
/* base ball... get it? :) */
|
class testSimObject : public Trick::SimObject {
|
||||||
class ballSimObject : public Trick::SimObject {
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool test_false() {
|
bool test_false() {
|
||||||
@ -22,7 +21,7 @@ class ballSimObject : public Trick::SimObject {
|
|||||||
return true ;
|
return true ;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ball_alex obj ;
|
ClassOfEverything obj ;
|
||||||
TEST_STRUCT t ;
|
TEST_STRUCT t ;
|
||||||
my_ns::AA ns_test ;
|
my_ns::AA ns_test ;
|
||||||
Abstract * a ;
|
Abstract * a ;
|
||||||
@ -39,24 +38,11 @@ class ballSimObject : public Trick::SimObject {
|
|||||||
MomMom * mm ;
|
MomMom * mm ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ballSimObject() {
|
testSimObject() {}
|
||||||
("default_data") obj.force.default_data() ;
|
|
||||||
("default_data") obj.state.default_data() ;
|
|
||||||
|
|
||||||
("initialization") obj.state_init() ;
|
|
||||||
|
|
||||||
("derivative") obj.force_field() ;
|
|
||||||
("derivative") obj.state_deriv() ;
|
|
||||||
("integration") trick_ret = obj.state_integ() ;
|
|
||||||
|
|
||||||
(10.0, "scheduled") trick_ret = obj.state_print() ;
|
|
||||||
|
|
||||||
("freeze") obj.state_print() ;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ballSimObject (const ballSimObject &);
|
testSimObject (const testSimObject &);
|
||||||
ballSimObject & operator= (const ballSimObject &);
|
testSimObject & operator= (const testSimObject &);
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@ -84,7 +70,7 @@ class disabledSimObject : public Trick::SimObject {
|
|||||||
class emptySimObject : public Trick::SimObject {
|
class emptySimObject : public Trick::SimObject {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Ball_alex obj ;
|
ClassOfEverything obj ;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
emptySimObject (const emptySimObject &);
|
emptySimObject (const emptySimObject &);
|
||||||
@ -105,7 +91,7 @@ class plainClass {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Instantiations
|
// Instantiations
|
||||||
ballSimObject ball ;
|
testSimObject test_so ;
|
||||||
disabledSimObject disabled_obj ;
|
disabledSimObject disabled_obj ;
|
||||||
|
|
||||||
template <class T, typename U>
|
template <class T, typename U>
|
||||||
@ -154,22 +140,10 @@ class InheritFromTemplatedSimObject : public TemplatedSimObject< int, double > {
|
|||||||
|
|
||||||
InheritFromTemplatedSimObject iftso ;
|
InheritFromTemplatedSimObject iftso ;
|
||||||
|
|
||||||
// This collect can now be done in create_connections or the input file.
|
|
||||||
//collect ball.obj.state.work.external_force = {ball.obj.force.output.force[0]};
|
|
||||||
|
|
||||||
IntegLoop my_integ_loop (0.01) ball;
|
|
||||||
|
|
||||||
// Connect objects
|
// Connect objects
|
||||||
void create_connections() {
|
void create_connections() {
|
||||||
|
|
||||||
// Set the default termination time
|
// Set the default termination time
|
||||||
trick_sys.sched.set_terminate_time(300.0) ;
|
trick_sys.sched.set_terminate_time(1.0) ;
|
||||||
trick_sys.sched.set_freeze_frame(0.10) ;
|
trick_sys.sched.set_freeze_frame(0.10) ;
|
||||||
|
|
||||||
|
|
||||||
my_integ_loop.getIntegrator( Runge_Kutta_2, 4 );
|
|
||||||
|
|
||||||
ball.obj.state.add_external_force( ball.obj.force.output.force ) ;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
3
test/SIM_test_ip/S_overrides.mk
Normal file
3
test/SIM_test_ip/S_overrides.mk
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
TRICK_ICG_EXCLUDE=${TRICK_HOME}/trick_models/exclude_me
|
||||||
|
TRICK_CFLAGS += -I../models
|
||||||
|
TRICK_CXXFLAGS += -I../models
|
4
test/SIM_test_templates/S_overrides.mk
Normal file
4
test/SIM_test_templates/S_overrides.mk
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
TRICK_CFLAGS += -I../models
|
||||||
|
TRICK_CXXFLAGS += -I../models
|
||||||
|
|
@ -3,20 +3,9 @@
|
|||||||
|
|
||||||
@verbatim
|
@verbatim
|
||||||
PURPOSE:
|
PURPOSE:
|
||||||
(Ball model EOM state parameter definition.)
|
(Test input processor)
|
||||||
REFERENCES:
|
|
||||||
(((Bailey, R.W, and Paddock, E.J.)
|
|
||||||
(Trick Simulation Environment) (NASA:JSC #37943)
|
|
||||||
(JSC/Engineering Directorate/Automation, Robotics and Simulation Division)
|
|
||||||
(March 1997)))
|
|
||||||
ASSUMPTIONS AND LIMITATIONS:
|
|
||||||
((2 dimensional space)
|
|
||||||
(Translational EOM only))
|
|
||||||
LIBRARY DEPENDENCY:
|
LIBRARY DEPENDENCY:
|
||||||
((Ball_test.o))
|
((ClassOfEverything.o))
|
||||||
PROGRAMMERS:
|
|
||||||
(((Robert W. Bailey) (Sweet Systems Inc) (March 1997) (Tutorial Lesson 1))
|
|
||||||
((Edwin Z. Crues)(Titan Systems Corp.)(Jan 2002)(Crude C++ translation)))
|
|
||||||
@endverbatim
|
@endverbatim
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
@ -35,7 +24,7 @@ PROGRAMMERS:
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
// Model include files.
|
// Model include files.
|
||||||
#include "Ball++/L1/../L1/include/Ball.hh"
|
#include "trick/mm_macros.hh"
|
||||||
#include "test_ip/include/NoICG.hh"
|
#include "test_ip/include/NoICG.hh"
|
||||||
#include "exclude_me/include/exclude_me.hh"
|
#include "exclude_me/include/exclude_me.hh"
|
||||||
#include "test_ip/include/Namespace_tests.hh"
|
#include "test_ip/include/Namespace_tests.hh"
|
||||||
@ -78,7 +67,7 @@ typedef const struct ConstStruct_ {
|
|||||||
|
|
||||||
class AlsoCannotCopy {
|
class AlsoCannotCopy {
|
||||||
friend class InputProcessor ;
|
friend class InputProcessor ;
|
||||||
friend void init_attrBall_alex() ;
|
friend void init_attrClassOfEverything() ;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int i ;
|
int i ;
|
||||||
@ -93,7 +82,7 @@ class AlsoCannotCopy {
|
|||||||
class CannotCopy {
|
class CannotCopy {
|
||||||
|
|
||||||
friend class InputProcessor ;
|
friend class InputProcessor ;
|
||||||
friend void init_attrBall_alex() ;
|
friend void init_attrClassOfEverything() ;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int i ;
|
int i ;
|
||||||
@ -182,15 +171,15 @@ typedef int Integer ;
|
|||||||
typedef int AnotherInteger ;
|
typedef int AnotherInteger ;
|
||||||
typedef long long Myint64 ;
|
typedef long long Myint64 ;
|
||||||
|
|
||||||
class Ball_alex : public Ball {
|
class ClassOfEverything {
|
||||||
|
|
||||||
friend class InputProcessor ;
|
friend class InputProcessor ;
|
||||||
friend void init_attrBall_alex() ;
|
friend void init_attrClassOfEverything() ;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Default constructor and destructor.
|
// Default constructor and destructor.
|
||||||
Ball_alex() ;
|
ClassOfEverything() ;
|
||||||
~Ball_alex() {};
|
~ClassOfEverything() {};
|
||||||
|
|
||||||
/* maybe someday we'll be able to do something like this. */
|
/* maybe someday we'll be able to do something like this. */
|
||||||
double d_test ; /* -- blah */
|
double d_test ; /* -- blah */
|
||||||
@ -391,8 +380,8 @@ class Ball_alex : public Ball {
|
|||||||
typedef int sizeType ;
|
typedef int sizeType ;
|
||||||
typedef double mydouble ;
|
typedef double mydouble ;
|
||||||
|
|
||||||
Ball_alex::sizeType st ;
|
ClassOfEverything::sizeType st ;
|
||||||
Ball_alex::mydouble md ;
|
ClassOfEverything::mydouble md ;
|
||||||
|
|
||||||
MyTemplate< double , int , short >::template_int my_template_var_int ;
|
MyTemplate< double , int , short >::template_int my_template_var_int ;
|
||||||
int invisible_int ;
|
int invisible_int ;
|
||||||
@ -450,8 +439,8 @@ class Ball_alex : public Ball {
|
|||||||
std::list < std::string > ls ;
|
std::list < std::string > ls ;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ball_alex (const Ball_alex &);
|
ClassOfEverything (const ClassOfEverything &);
|
||||||
Ball_alex & operator= (const Ball_alex &);
|
ClassOfEverything & operator= (const ClassOfEverything &);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -466,7 +455,7 @@ typedef struct test_struct {
|
|||||||
} TEST_STRUCT ;
|
} TEST_STRUCT ;
|
||||||
|
|
||||||
#ifdef SWIG
|
#ifdef SWIG
|
||||||
%struct_str(Ball_alex)
|
%struct_str(ClassOfEverything)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace my_ns {
|
namespace my_ns {
|
||||||
@ -492,6 +481,7 @@ class Test {
|
|||||||
class Abstract {
|
class Abstract {
|
||||||
public:
|
public:
|
||||||
Abstract( int in_id ) : id(in_id) {} ;
|
Abstract( int in_id ) : id(in_id) {} ;
|
||||||
|
virtual ~Abstract() {} ;
|
||||||
int id ;
|
int id ;
|
||||||
virtual void speak() = 0 ;
|
virtual void speak() = 0 ;
|
||||||
} ;
|
} ;
|
@ -3,20 +3,7 @@
|
|||||||
|
|
||||||
@verbatim
|
@verbatim
|
||||||
PURPOSE:
|
PURPOSE:
|
||||||
(Ball model EOM state parameter definition.)
|
(Namespace input processor tests)
|
||||||
REFERENCES:
|
|
||||||
(((Bailey, R.W, and Paddock, E.J.)
|
|
||||||
(Trick Simulation Environment) (NASA:JSC #37943)
|
|
||||||
(JSC/Engineering Directorate/Automation, Robotics and Simulation Division)
|
|
||||||
(March 1997)))
|
|
||||||
ASSUMPTIONS AND LIMITATIONS:
|
|
||||||
((2 dimensional space)
|
|
||||||
(Translational EOM only))
|
|
||||||
LIBRARY DEPENDENCY:
|
|
||||||
((Ball_test.o))
|
|
||||||
PROGRAMMERS:
|
|
||||||
(((Robert W. Bailey) (Sweet Systems Inc) (March 1997) (Tutorial Lesson 1))
|
|
||||||
((Edwin Z. Crues)(Titan Systems Corp.)(Jan 2002)(Crude C++ translation)))
|
|
||||||
@endverbatim
|
@endverbatim
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
24
test/models/test_ip/include/NoICG.hh
Normal file
24
test/models/test_ip/include/NoICG.hh
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
/**
|
||||||
|
@file
|
||||||
|
|
||||||
|
@verbatim
|
||||||
|
PURPOSE:
|
||||||
|
(ICG test)
|
||||||
|
ICG: (No)
|
||||||
|
LIBRARY DEPENDENCY:
|
||||||
|
()
|
||||||
|
@endverbatim
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
#ifndef NOICG_HH
|
||||||
|
#define NOICG_HH
|
||||||
|
|
||||||
|
class DoNotICG {
|
||||||
|
|
||||||
|
public:
|
||||||
|
int ii ;
|
||||||
|
|
||||||
|
} ;
|
||||||
|
|
||||||
|
#endif /* _BALL_HH_ */
|
||||||
|
|
@ -3,20 +3,7 @@
|
|||||||
|
|
||||||
@verbatim
|
@verbatim
|
||||||
PURPOSE:
|
PURPOSE:
|
||||||
(Ball model EOM state parameter definition.)
|
(Template tests)
|
||||||
REFERENCES:
|
|
||||||
(((Bailey, R.W, and Paddock, E.J.)
|
|
||||||
(Trick Simulation Environment) (NASA:JSC #37943)
|
|
||||||
(JSC/Engineering Directorate/Automation, Robotics and Simulation Division)
|
|
||||||
(March 1997)))
|
|
||||||
ASSUMPTIONS AND LIMITATIONS:
|
|
||||||
((2 dimensional space)
|
|
||||||
(Translational EOM only))
|
|
||||||
LIBRARY DEPENDENCY:
|
|
||||||
()
|
|
||||||
PROGRAMMERS:
|
|
||||||
(((Robert W. Bailey) (Sweet Systems Inc) (March 1997) (Tutorial Lesson 1))
|
|
||||||
((Edwin Z. Crues)(Titan Systems Corp.)(Jan 2002)(Crude C++ translation)))
|
|
||||||
@endverbatim
|
@endverbatim
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
21
test/models/test_ip/src/ClassOfEverything.cpp
Normal file
21
test/models/test_ip/src/ClassOfEverything.cpp
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
|
||||||
|
#include "test_ip/include/ClassOfEverything.hh"
|
||||||
|
|
||||||
|
double ClassOfEverything::sdaa[3][3] ;
|
||||||
|
const double ClassOfEverything::scd = 1.2345 ;
|
||||||
|
const double ClassOfEverything::csd = 6.7890 ;
|
||||||
|
const double ClassOfEverything::sdc = 9.8765 ;
|
||||||
|
|
||||||
|
ClassOfEverything::ClassOfEverything() : cir(i), icr(i) {
|
||||||
|
|
||||||
|
unsigned int ii ;
|
||||||
|
|
||||||
|
ep = NULL ;
|
||||||
|
epp = NULL ;
|
||||||
|
|
||||||
|
for ( ii = 0 ; ii < 4 ; ii++ ) {
|
||||||
|
eap[ii] = NULL ;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,35 +0,0 @@
|
|||||||
/**
|
|
||||||
@file
|
|
||||||
|
|
||||||
@verbatim
|
|
||||||
PURPOSE:
|
|
||||||
(Ball model EOM state parameter definition.)
|
|
||||||
ICG: (No)
|
|
||||||
REFERENCES:
|
|
||||||
(((Bailey, R.W, and Paddock, E.J.)
|
|
||||||
(Trick Simulation Environment) (NASA:JSC #37943)
|
|
||||||
(JSC/Engineering Directorate/Automation, Robotics and Simulation Division)
|
|
||||||
(March 1997)))
|
|
||||||
ASSUMPTIONS AND LIMITATIONS:
|
|
||||||
((2 dimensional space)
|
|
||||||
(Translational EOM only))
|
|
||||||
LIBRARY DEPENDENCY:
|
|
||||||
()
|
|
||||||
PROGRAMMERS:
|
|
||||||
(((Robert W. Bailey) (Sweet Systems Inc) (March 1997) (Tutorial Lesson 1))
|
|
||||||
((Edwin Z. Crues)(Titan Systems Corp.)(Jan 2002)(Crude C++ translation)))
|
|
||||||
@endverbatim
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
#ifndef NOICG_HH
|
|
||||||
#define NOICG_HH
|
|
||||||
|
|
||||||
class DoNotICG {
|
|
||||||
|
|
||||||
public:
|
|
||||||
int ii ;
|
|
||||||
|
|
||||||
} ;
|
|
||||||
|
|
||||||
#endif /* _BALL_HH_ */
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
|||||||
|
|
||||||
#include "test_ip/include/Ball_test.hh"
|
|
||||||
|
|
||||||
double Ball_alex::sdaa[3][3] ;
|
|
||||||
const double Ball_alex::scd = 1.2345 ;
|
|
||||||
const double Ball_alex::csd = 6.7890 ;
|
|
||||||
const double Ball_alex::sdc = 9.8765 ;
|
|
||||||
|
|
||||||
Ball_alex::Ball_alex() : cir(i), icr(i) {
|
|
||||||
|
|
||||||
unsigned int ii ;
|
|
||||||
|
|
||||||
ep = NULL ;
|
|
||||||
epp = NULL ;
|
|
||||||
|
|
||||||
for ( ii = 0 ; ii < 4 ; ii++ ) {
|
|
||||||
eap[ii] = NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,100 +0,0 @@
|
|||||||
/************************TRICK HEADER*************************
|
|
||||||
PURPOSE:
|
|
||||||
(This comment lists out the other object files that are not included from c++ headers)
|
|
||||||
LIBRARY DEPENDENCIES:
|
|
||||||
(
|
|
||||||
)
|
|
||||||
*************************************************************/
|
|
||||||
|
|
||||||
#include "sim_objects/default_trick_sys.sm"
|
|
||||||
|
|
||||||
##include "test_ip/include/Ball_test.hh"
|
|
||||||
|
|
||||||
/* base ball... get it? :) */
|
|
||||||
class ballSimObject : public Trick::SimObject {
|
|
||||||
|
|
||||||
public:
|
|
||||||
Ball_alex obj ;
|
|
||||||
TEST_STRUCT t ;
|
|
||||||
my_ns::AA ns_test ;
|
|
||||||
|
|
||||||
ballSimObject() {
|
|
||||||
("default_data") obj.force.default_data() ;
|
|
||||||
("default_data") obj.state.default_data() ;
|
|
||||||
|
|
||||||
("initialization") obj.state_init() ;
|
|
||||||
|
|
||||||
("derivative") obj.force_field() ;
|
|
||||||
("derivative") obj.state_deriv() ;
|
|
||||||
("integration") trick_ret = obj.state_integ() ;
|
|
||||||
|
|
||||||
(10.0, "scheduled") trick_ret = obj.state_print() ;
|
|
||||||
|
|
||||||
("freeze") obj.state_print() ;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
ballSimObject (const ballSimObject &);
|
|
||||||
ballSimObject & operator= (const ballSimObject &);
|
|
||||||
|
|
||||||
} ;
|
|
||||||
|
|
||||||
class disabledSimObject : public Trick::SimObject {
|
|
||||||
public:
|
|
||||||
void print_me() {
|
|
||||||
message_publish( 7 , "\033[31mThis statement in disabledSimObject should not print because the sim object is disabled!!!\033[0m\n" ) ;
|
|
||||||
add_test_result( "IPtest" , "Disable sim_object" , "job not disabled\n") ;
|
|
||||||
}
|
|
||||||
disabledSimObject() {
|
|
||||||
("initialization") print_me() ;
|
|
||||||
(10.0 , "scheduled") print_me() ;
|
|
||||||
}
|
|
||||||
} ;
|
|
||||||
|
|
||||||
class emptySimObject : public Trick::SimObject {
|
|
||||||
|
|
||||||
public:
|
|
||||||
Ball_alex obj ;
|
|
||||||
|
|
||||||
private:
|
|
||||||
emptySimObject (const emptySimObject &);
|
|
||||||
emptySimObject & operator= (const emptySimObject &);
|
|
||||||
|
|
||||||
} ;
|
|
||||||
|
|
||||||
class reallyemptySimObject : public Trick::SimObject {
|
|
||||||
public:
|
|
||||||
int ii ;
|
|
||||||
} ;
|
|
||||||
|
|
||||||
class plainClass {
|
|
||||||
public:
|
|
||||||
double d ;
|
|
||||||
float f ;
|
|
||||||
plainClass() : d() , f() {} ;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Instantiations
|
|
||||||
ballSimObject ball ;
|
|
||||||
disabledSimObject disabled_obj ;
|
|
||||||
|
|
||||||
// This collect can now be done in create_connections or the input file.
|
|
||||||
//collect ball.obj.state.work.external_force = {ball.obj.force.output.force[0]};
|
|
||||||
|
|
||||||
IntegLoop my_integ_loop (0.01) ball;
|
|
||||||
|
|
||||||
// Connect objects
|
|
||||||
void create_connections() {
|
|
||||||
|
|
||||||
// Set the default termination time
|
|
||||||
trick_sys.sched.set_terminate_time(300.0) ;
|
|
||||||
trick_sys.sched.set_freeze_frame(0.10) ;
|
|
||||||
|
|
||||||
|
|
||||||
my_integ_loop.getIntegrator( Runge_Kutta_2, 4 );
|
|
||||||
|
|
||||||
// Example of adding a collect in create_connections.
|
|
||||||
ball.obj.state.add_external_force( ball.obj.force.output.force ) ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
|||||||
TRICK_ICG_EXCLUDE=${TRICK_HOME}/trick_models/exclude_me
|
|
||||||
TRICK_CFLAGS += -I${TRICK_HOME}/trick_models
|
|
||||||
TRICK_CXXFLAGS += -I${TRICK_HOME}/trick_models
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +0,0 @@
|
|||||||
TRICK_ICG_EXCLUDE=${TRICK_HOME}/trick_models/exclude_me
|
|
||||||
TRICK_CFLAGS += -I${TRICK_HOME}/trick_models
|
|
||||||
TRICK_CXXFLAGS += -I${TRICK_HOME}/trick_models
|
|
||||||
#TRICK_CONVERT_SWIG_FLAGS += -s
|
|
@ -1,4 +0,0 @@
|
|||||||
|
|
||||||
TRICK_CFLAGS += -I${TRICK_HOME}/trick_models
|
|
||||||
TRICK_CXXFLAGS += -I${TRICK_HOME}/trick_models
|
|
||||||
|
|
@ -19,7 +19,6 @@ COMPILE_DIRS = SIM_Ball++_L1 \
|
|||||||
SIM_demo_sdefine \
|
SIM_demo_sdefine \
|
||||||
SIM_events \
|
SIM_events \
|
||||||
SIM_monte \
|
SIM_monte \
|
||||||
SIM_rti \
|
|
||||||
SIM_satellite \
|
SIM_satellite \
|
||||||
SIM_stls \
|
SIM_stls \
|
||||||
SIM_stls2 \
|
SIM_stls2 \
|
||||||
@ -30,11 +29,9 @@ COMPILE_DIRS = SIM_Ball++_L1 \
|
|||||||
SIM_test_dp \
|
SIM_test_dp \
|
||||||
SIM_test_dr \
|
SIM_test_dr \
|
||||||
SIM_test_inherit \
|
SIM_test_inherit \
|
||||||
SIM_test_ip \
|
|
||||||
SIM_test_ip2 \
|
SIM_test_ip2 \
|
||||||
SIM_test_sched \
|
SIM_test_sched \
|
||||||
SIM_test_simlib \
|
SIM_test_simlib \
|
||||||
SIM_test_templates \
|
|
||||||
SIM_threads \
|
SIM_threads \
|
||||||
SIM_threads_simple \
|
SIM_threads_simple \
|
||||||
SIM_trickcomm
|
SIM_trickcomm
|
||||||
@ -59,17 +56,14 @@ TEST_DIRS = SIM_Ball++_L1 \
|
|||||||
SIM_demo_sdefine \
|
SIM_demo_sdefine \
|
||||||
SIM_events \
|
SIM_events \
|
||||||
SIM_monte \
|
SIM_monte \
|
||||||
SIM_rti \
|
|
||||||
SIM_stls \
|
SIM_stls \
|
||||||
SIM_stls2 \
|
SIM_stls2 \
|
||||||
SIM_sun \
|
SIM_sun \
|
||||||
SIM_target \
|
SIM_target \
|
||||||
SIM_test_dp \
|
SIM_test_dp \
|
||||||
SIM_test_dr \
|
SIM_test_dr \
|
||||||
SIM_test_ip \
|
|
||||||
SIM_test_sched \
|
SIM_test_sched \
|
||||||
SIM_test_simlib \
|
SIM_test_simlib \
|
||||||
SIM_test_templates \
|
|
||||||
SIM_threads
|
SIM_threads
|
||||||
|
|
||||||
# This test is temporarily sitting out until fixed.
|
# This test is temporarily sitting out until fixed.
|
||||||
|
Loading…
Reference in New Issue
Block a user