@@ -5,15 +5,15 @@ This is intended to be the implementation of the Anemometer algorithm but at pre
55Here is an example
66``` json
77{
8- "Timestamp" : 1513978578493813500 ,
9- "Sensor" : " 579d5bca617c6479" ,
10- "Vendor" : " ucberkeley" ,
11- "Algorithm" : " 1.0" ,
12- "Tofs" : [
8+ "Timestamp" : 1513978578493813500 , // Unix Nano timestamp
9+ "Sensor" : " 579d5bca617c6479" , //Mac address of the source
10+ "Vendor" : " ucberkeley" , //Algorithm vendor
11+ "Algorithm" : " 1.0" , //Algorithm version
12+ "Tofs" : [ //The time of flights emitted by the algorithm
1313 {
14- "Src" : 0 ,
15- "Dst" : 1 ,
16- "Val" : 555
14+ "Src" : 0 , //The originating ASIC
15+ "Dst" : 1 , //The receiving ASIC
16+ "Val" : 555 //These are stubs because the algorithm is not implemented
1717 },
1818 {
1919 "Src" : 0 ,
@@ -71,16 +71,99 @@ Here is an example
7171 "Val" : 555
7272 }
7373 ],
74- "RawInput" : {
74+ //Outputted temperature calculated by the algorithm
75+ //These are placeholders
76+ "Temperatures" : [
77+ {
78+ "Src" : 0 ,
79+ "Dst" : 1 ,
80+ "Val" : 25.5
81+ },
82+ {
83+ "Src" : 0 ,
84+ "Dst" : 2 ,
85+ "Val" : 25.5
86+ },
87+ {
88+ "Src" : 0 ,
89+ "Dst" : 3 ,
90+ "Val" : 25.5
91+ },
92+ {
93+ "Src" : 1 ,
94+ "Dst" : 0 ,
95+ "Val" : 25.5
96+ },
97+ {
98+ "Src" : 1 ,
99+ "Dst" : 2 ,
100+ "Val" : 25.5
101+ },
102+ {
103+ "Src" : 1 ,
104+ "Dst" : 3 ,
105+ "Val" : 25.5
106+ },
107+ {
108+ "Src" : 2 ,
109+ "Dst" : 0 ,
110+ "Val" : 25.5
111+ },
112+ {
113+ "Src" : 2 ,
114+ "Dst" : 1 ,
115+ "Val" : 25.5
116+ },
117+ {
118+ "Src" : 2 ,
119+ "Dst" : 3 ,
120+ "Val" : 25.5
121+ },
122+ {
123+ "Src" : 3 ,
124+ "Dst" : 0 ,
125+ "Val" : 25.5
126+ },
127+ {
128+ "Src" : 3 ,
129+ "Dst" : 1 ,
130+ "Val" : 25.5
131+ },
132+ {
133+ "Src" : 3 ,
134+ "Dst" : 2 ,
135+ "Val" : 25.5
136+ }
137+ ],
138+ //These are stubs, the algorithm is not implemented
139+ "Velocities" : {
140+ "X" : 1 ,
141+ "Y" : 2 ,
142+ "Z" : 3 ,
143+ "Mag" : 3.7416573867739413 ,
144+ "Phi" : 55 ,
145+ "Theta" : 66 ,
146+ "Valid" : true
147+ },
148+ //Extra information the algorithm emits for use by consumers
149+ "Extradata" : [
150+ " the algorithm has not been filled in yet"
151+ ],
152+ //Information about the signal quality from the anemometers
153+ "Uncorrectable" : 1 ,
154+ "Correctable" : 0 ,
155+ "Total" : 17 ,
156+ "RawInput" : { //This is the data passed as an input to the algorithm
75157 "L7GHeaders" : [
76158 {
77- "Srcmac" : " 579d5bca617c6479" ,
159+ "Srcmac" : " 579d5bca617c6479" , //The ID of the sensor
78160 "Srcip" : " fe80::559d:5bca:617c:6479" ,
79- "Popid" : " hk070" ,
161+ "Popid" : " hk070" , //The ID of the border router
80162 "Poptime" : 74143819359 ,
81- "Brtime" : 1513978578493813500 ,
82- "Rssi" : 42 ,
163+ "Brtime" : 1513978578493813500 , //The time the packet was received
164+ "Rssi" : 42 , //Received signal strength
83165 "Lqi" : 255 ,
166+ //The base64 raw packet payload
84167 "Payload" : " CQtAtgDDND72AAAQHwK7AGsBEApeCA0MABucEswD7AAKA9//JwJl/zUBtP/pAGoArQA0AIAACgBVAOv/mP8JAZz/OQKu/pYDwvwcBA=="
85168 },
86169 {
@@ -114,29 +197,29 @@ Here is an example
114197 "Payload" : " CQpDtgPD/D3+AFAQJQK1AF0BEApeCAEHCX5jEiQA/gD3/1QCDwDqAzEASQX+/pwBtP82ATsAngB8AP3/GwCE/x0Abv8bAFz/EQBU/w=="
115198 }
116199 ],
117- "ChirpHeaders" : [
200+ "ChirpHeaders" : [ //The decoded version of the packets
118201 {
119202 "Type" : 11 ,
120- "Seqno" : 46656 ,
121- "Build" : 195 ,
122- "CalPulse" : 160 ,
203+ "Seqno" : 46656 ,
204+ "Build" : 195 ,
205+ "CalPulse" : 160 , //In ms, the calibration pulse
123206 "CalRes" : [
124- 4764 ,
125- -1 ,
126- -1 ,
207+ 4764 , //The ticks that were measured by each asic
208+ -1 , //Although all sampled at once we only transfer
209+ -1 , //the calibration result for the primary
127210 -1
128211 ],
129- "Primary" : 0 ,
212+ "Primary" : 0 , //Which ASIC was transmitting
130213 "MaxIndex" : [
131214 -1 ,
132- 13 ,
215+ 13 , //The IQ index that had the maximum complex magnitude
133216 12 ,
134217 0
135218 ],
136219 "IValues" : [
137- null ,
220+ null , //We don't include the data for the primary
138221 [
139- 236 ,
222+ 236 , //The IQ values cover Max-3, Max-2, Max-1, Max
140223 -33 ,
141224 -155 ,
142225 -76
@@ -148,7 +231,7 @@ Here is an example
148231 -21
149232 ],
150233 [
151- 265 ,
234+ 265 , //Unless the MaxIndex <=3 in which case they start at zero
152235 569 ,
153236 918 ,
154237 1052
@@ -176,19 +259,19 @@ Here is an example
176259 ]
177260 ],
178261 "Accelerometer" : [
179- -112.24 ,
262+ -112.24 , //Milli G's
180263 60.024 ,
181264 999.424
182265 ],
183266 "Magnetometer" : [
184- 54.300000000000004 ,
267+ 54.300000000000004 , //micro Tesla
185268 18.7 ,
186269 36.300000000000004
187270 ],
188- "Temperature" : 25.76 ,
189- "Humidity" : 21.42
271+ "Temperature" : 25.76 , //Celsius
272+ "Humidity" : 21.42 //RH Percentage
190273 },
191- {
274+ { //There is a set of data for each asic as primary.
192275 "Type" : 12 ,
193276 "Seqno" : 46657 ,
194277 "Build" : 195 ,
@@ -408,91 +491,14 @@ Here is an example
408491 "Humidity" : 21.42
409492 }
410493 ],
411- "SetInfo" : {
412- "Site" : " site0" ,
413- "MAC" : " 579d5bca617c6479" ,
414- "Build" : 195 ,
415- "Complete" : true ,
416- "TimeOfFirst" : " 2017-12-22T13:36:18.49381362-08:00" ,
417- "IsDuct" : true
418- }
419- },
420- "Temperatures" : [
421- {
422- "Src" : 0 ,
423- "Dst" : 1 ,
424- "Val" : 25.5
425- },
426- {
427- "Src" : 0 ,
428- "Dst" : 2 ,
429- "Val" : 25.5
430- },
431- {
432- "Src" : 0 ,
433- "Dst" : 3 ,
434- "Val" : 25.5
435- },
436- {
437- "Src" : 1 ,
438- "Dst" : 0 ,
439- "Val" : 25.5
440- },
441- {
442- "Src" : 1 ,
443- "Dst" : 2 ,
444- "Val" : 25.5
445- },
446- {
447- "Src" : 1 ,
448- "Dst" : 3 ,
449- "Val" : 25.5
450- },
451- {
452- "Src" : 2 ,
453- "Dst" : 0 ,
454- "Val" : 25.5
455- },
456- {
457- "Src" : 2 ,
458- "Dst" : 1 ,
459- "Val" : 25.5
460- },
461- {
462- "Src" : 2 ,
463- "Dst" : 3 ,
464- "Val" : 25.5
465- },
466- {
467- "Src" : 3 ,
468- "Dst" : 0 ,
469- "Val" : 25.5
470- },
471- {
472- "Src" : 3 ,
473- "Dst" : 1 ,
474- "Val" : 25.5
475- },
476- {
477- "Src" : 3 ,
478- "Dst" : 2 ,
479- "Val" : 25.5
494+ "SetInfo" : { //We also include information about the whole set of 4
495+ "Site" : " site0" , //The site of the border router
496+ "MAC" : " 579d5bca617c6479" , //The MAC of the anemometer
497+ "Build" : 195 , //Version
498+ "Complete" : true , //Is the set of measurements complete (no missing data)
499+ "TimeOfFirst" : " 2017-12-22T13:36:18.49381362-08:00" , //The timestamp of the first measurement
500+ "IsDuct" : true //Is it a duct
480501 }
481- ],
482- "Velocities" : {
483- "X" : 1 ,
484- "Y" : 2 ,
485- "Z" : 3 ,
486- "Mag" : 3.7416573867739413 ,
487- "Phi" : 55 ,
488- "Theta" : 66 ,
489- "Valid" : true
490- },
491- "Extradata" : [
492- " the algorithm has not been filled in yet"
493- ],
494- "Uncorrectable" : 1 ,
495- "Correctable" : 0 ,
496- "Total" : 17
502+ }
497503}
498504```
0 commit comments