Smart_dust_specs_v2

advertisement
Smart Dust Simulation Specifications
Normal.h is found in week3 subdirectory.
Try Dust std div 100
Try Flechette std div 100/3
Abstract: A time based simulation that illustrates the relationship between “smart dust” sensors, their
associated flechettes and the command processor as various targets move through the sensor field.
Objects:
Attributes (private member data)
Behaviors (public member functions)
Data Structures:
Time step behaviors:
Other functions:
Controls:
Objects:
Smart Dust: Heat, Motion, Radiation, Acoustic, Pressure
: Types: H, M, R, A, P //sample for constructor instantiation of type, random chars
: Private Member Data
char Type;
double x, y; (locations held constant)
double signal_strength; //set by referee each time step
Associated “Signal” strengths
Sensor type
H
M
R
A
P
Frequency of Sensor
25%
25%
5%
25%
20%
Signal range (inclusive)
0.0 to 1.0
2.0 to 3.0
4.0 to 5.0
6.0 to 7.0
8.0 to 9.0
The range of the number of sensors: 1,000<N<10,000, user input
Two decimal place precision is required of all signals.
All signals are generated as values: (0.0 <= s <= 1.0 ) + and offset of 2, 4, 6, or 8 as
above.
Flechette :
The number of Flechettes = .02*Number of Sensors
Private Member Data:
Double x, y; kept as const
List <dust*> my_list; //populated by the ref once dust and flechettes are placed
Optional:
Data[5][4];
//the output..
File output for command would include
Type of sensors and their min, mean, max, and n (GRAND TOTALS)
Public Functions
Sense(){add to a list of signals as long as there is a input stream}
Send(){to command a string of data below}
Compute the frequency N, max, min, and mean values of each signal type.
//left to discuss
Command: receives a signal from each flechette for each time step. This signal may be zero.
Compute the OVER-ALL frequency N, max, min, and mean values of each signal type.
N = sum of individual flechette n values
Min = smallest min of each type reported by the flechettes
Max, same..
Mean = sum(ni * meani)/N
Controls:
Size of the domain: 0 to 1000, in both x and y;
User Input Signal range for all Smart Dust: initially 25 //will probably change
Initial position for target = (0, y_random) final position = (1000, y_random)
User input of target profile data from file .
Target data file = id, H, M, R, A, P, speed (or one per line, comma or space
delimited are both acceptable)
Time steps are committed in groups of 5, with user controls for quit or 5 more.
The command will display each flechette data packet then compute and display the
smallest min, largest max, mean of flechette means, total N of each sensor type for each
time step.
SPEED OF TARGET determines how many time steps in the simulation
Compute dx and dy of the speed.
PATH DISTANCE (D) = Sqrt ( 10002 + (yinit – yfinal)2)
Dx (speed in x direction) = (speed*1000)/D
Dy(speed in the y direction) = (speed *(yfinal-yinit))/D
After every 5 time steps, the user is given the option to output all current dust and flechette data
Each of the following should be different in GNUPLOT
Dust signal==0
Dust signal > 0
Flechette
GNU output of the stored data is just the 3 color x,y plots of the data above.
Download