00001
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 package gov.lanl.isr.sensix.sensing;
00036
00037 import gov.lanl.isr.sensix.*;
00038
00039
00040 public class SpatialSeriesImpl extends SpatialSeriesPOA
00041 {
00042 protected double centirads;
00043 protected double dist_cm;
00044
00045 private CollectionImpl del;
00046
00047
00048 public SpatialSeriesImpl(byte l, Sensory s, double angle, double dist) {
00049 del = new CollectionImpl(l, s);
00050 centirads = angle;
00051 dist_cm = dist;
00052 }
00053
00054 public SpatialSeriesImpl(Sensory s, double angle, double dist) {
00055 del = new CollectionImpl(s);
00056 centirads = angle;
00057 dist_cm = dist;
00058 }
00059
00060 public SpatialSeriesImpl(byte l, Sensory s) {
00061 del = new CollectionImpl(l, s);
00062 centirads = -1.0;
00063 dist_cm = -1.0;
00064 }
00065
00066 public SpatialSeriesImpl(Sensory s) {
00067 del = new CollectionImpl(s);
00068 centirads = -1.0;
00069 dist_cm = -1.0;
00070 }
00071
00072 public SpatialSeriesImpl(byte l, Sensory s, double angle, double dist,
00073 int seq) {
00074 del = new CollectionImpl(l, s, seq);
00075 centirads = angle;
00076 dist_cm = dist;
00077 }
00078
00079
00080 public byte identifier() {
00081 return SenseCorba.PSI;
00082 }
00083
00084 public void distance(double d) {
00085 dist_cm = d;
00086 }
00087
00088 public double distance() {
00089 return dist_cm;
00090 }
00091
00092 public void angle(double a) {
00093 centirads = a;
00094 }
00095
00096 public double angle() {
00097 return centirads;
00098 }
00099
00100 public String asString() {
00101 String string_rep = "SpatialSeries(";
00102 if (del.level() != SenseCorba.INVALID)
00103 string_rep += "level=" + (int)del.level() + ",";
00104 if (centirads > 0.0)
00105 string_rep += "angle=" + centirads + ",";
00106 if (dist_cm > 0.0)
00107 string_rep += "distance=" + dist_cm + ",";
00108 string_rep += del.sense().asString() + ")";
00109 return string_rep;
00110 }
00111
00112
00113
00114
00115
00116 public int sequencer() {
00117 return del.sequencer();
00118 }
00119
00120 public byte level() {
00121 return del.level();
00122 }
00123
00124 public Data[] results() {
00125 return del.results();
00126 }
00127
00128 public void results(Data[] d) {
00129 del.results(d);
00130 }
00131
00132 public Sensory sense() {
00133 return del.sense();
00134 }
00135
00136 public void sense(Sensory s) {
00137 del.sense(s);
00138 }
00139
00140 public byte sensor() {
00141 return del.sensor();
00142 }
00143
00144 public long timeused() {
00145 return del.timeused();
00146 }
00147
00148 public void timeused(long t) {
00149 del.timeused(t);
00150 }
00151
00152 public double energyused() {
00153 return del.energyused();
00154 }
00155
00156 public void energyused(double e) {
00157 del.energyused(e);
00158 }
00159
00160 public byte priority() {
00161 return del.priority();
00162 }
00163
00164 public void priority(byte p) {
00165 del.priority(p);
00166 }
00167
00168 public FunctorError[] errors() {
00169 return del.errors();
00170 }
00171
00172 public void errors(FunctorError[] e) {
00173 del.errors(e);
00174 }
00175
00176 public Functor[] subfunctors() {
00177 return del.subfunctors();
00178 }
00179
00180 public void subfunctors(Functor[] fs) {
00181 del.subfunctors(fs);
00182 }
00183 }