Working on MongoDB interface
This commit is contained in:
@@ -62,7 +62,7 @@ classdef AnalogInput < handle
|
||||
|
||||
methods(Static)
|
||||
function test
|
||||
pi = raspi('10.0.0.104', 'pi', 'raspberry');
|
||||
pi = raspi('10.0.0.104', 'pi', 'HenryPump@1903');
|
||||
mux = MuxSetup(pi);
|
||||
anInput1 = AnalogInput(mux, 1, 0.0, 65535.0, 0.0, 100.0);
|
||||
anInput2 = AnalogInput(mux, 2, 0.0, 65535.0, 0.0, 100.0);
|
||||
|
||||
@@ -19,7 +19,7 @@ classdef DigitalInput < handle
|
||||
|
||||
methods(Static)
|
||||
function test
|
||||
pi = raspi('10.0.0.104', 'pi', 'raspberry');
|
||||
pi = raspi('10.0.0.104', 'pi', 'HenryPump@1903');
|
||||
mux = MuxSetup(pi);
|
||||
digIn1 = DigitalInput(mux, 1);
|
||||
digIn2 = DigitalInput(mux, 2);
|
||||
|
||||
@@ -35,7 +35,7 @@ classdef DigitalOutput < handle
|
||||
end
|
||||
methods(Static)
|
||||
function test
|
||||
pi = raspi('10.0.0.104', 'pi', 'raspberry');
|
||||
pi = raspi('10.0.0.104', 'pi', 'HenryPump@1903');
|
||||
|
||||
d1 = DigitalOutput(pi, 1);
|
||||
d2 = DigitalOutput(pi, 2);
|
||||
|
||||
676
Mallet No Tag.csv
Normal file
676
Mallet No Tag.csv
Normal file
@@ -0,0 +1,676 @@
|
||||
0,9776.026
|
||||
0.005469917,9889.581
|
||||
0.013863833,10032.636
|
||||
0.025325333,10243.539
|
||||
0.040032,10488.118
|
||||
0.058248417,10661.443
|
||||
0.07980025,10718.797
|
||||
0.104515583,10687.978
|
||||
0.132326083,10620.406
|
||||
0.16308075,10498.72
|
||||
0.195990667,10401.043
|
||||
0.232066417,10441.696
|
||||
0.271218583,10526.409
|
||||
0.313498083,10628.152
|
||||
0.359020417,10737.421
|
||||
0.407674083,10845.921
|
||||
0.4593205,10926.294
|
||||
0.51380025,11047.595
|
||||
0.571258167,11276.132
|
||||
0.63128025,11503.57
|
||||
0.693512167,11739.085
|
||||
0.758432417,11992.673
|
||||
0.826354917,12256.92
|
||||
0.89726725,12511.497
|
||||
0.9712875,12731.464
|
||||
1.048186583,12876.278
|
||||
1.127629,12925.886
|
||||
1.20959525,12924.183
|
||||
1.293956833,12923.688
|
||||
1.380850583,13030.321
|
||||
1.470691583,13306.049
|
||||
1.562806,13623.199
|
||||
1.656998333,13950.403
|
||||
1.753329083,14278.376
|
||||
1.852025333,14574.101
|
||||
1.952786833,14803.847
|
||||
2.055333167,15081.718
|
||||
2.159586667,15410.35
|
||||
2.265318833,15706.46
|
||||
2.3733975,16035.092
|
||||
2.484817583,16412.453
|
||||
2.59948025,16801.681
|
||||
2.71644175,17036.536
|
||||
2.834529167,16972.534
|
||||
2.95454075,16866.287
|
||||
3.0765375,16790.748
|
||||
3.201042417,16735.592
|
||||
3.328021917,16637.255
|
||||
3.457062,16447.942
|
||||
3.587754333,16175.73
|
||||
3.7197685,15843.802
|
||||
3.853573333,15517.477
|
||||
3.989576583,15256.582
|
||||
4.127587917,15145.994
|
||||
4.26697625,15090.343
|
||||
4.407120917,14970.086
|
||||
4.548720667,14891.362
|
||||
4.692186667,14842.962
|
||||
4.837357167,14740.34
|
||||
4.98334575,14499.057
|
||||
5.129595167,14326.721
|
||||
5.27664525,14369.901
|
||||
5.424664833,14485.104
|
||||
5.573320667,14591.681
|
||||
5.722529083,14679.086
|
||||
5.8719985,14766.051
|
||||
6.021790083,14919.434
|
||||
6.171415167,15126.162
|
||||
6.321026,15310.2
|
||||
6.470778417,15376.069
|
||||
6.62113375,15440.62
|
||||
6.771690917,15476
|
||||
6.92142425,15446.828
|
||||
7.070682583,15428.04
|
||||
7.219948833,15377.058
|
||||
7.369218333,15312.727
|
||||
7.517862583,15275.865
|
||||
7.665456333,15279.6
|
||||
7.81258175,15273.283
|
||||
7.95967025,15173.133
|
||||
8.106388583,15022.496
|
||||
8.251937833,14858.125
|
||||
8.39614225,14745.339
|
||||
8.53943,14636.839
|
||||
8.681693667,14430.496
|
||||
8.822886833,14220.802
|
||||
8.96252875,14055.937
|
||||
9.100747583,13982.486
|
||||
9.237511083,13908.102
|
||||
9.372204667,13851.627
|
||||
9.504688833,13881.018
|
||||
9.634593417,13925.517
|
||||
9.762460917,14039.895
|
||||
9.88810475,14149.439
|
||||
10.01133025,14239.756
|
||||
10.13194283,14293.484
|
||||
10.24966075,14316.173
|
||||
10.36420408,14430.991
|
||||
10.47555567,14679.855
|
||||
10.58395958,14924.489
|
||||
10.68960167,15012.168
|
||||
10.79186508,15026.451
|
||||
10.89072792,15122.316
|
||||
10.98580667,15239.826
|
||||
11.07743458,15393.979
|
||||
11.16544292,15480.175
|
||||
11.24972158,15551.648
|
||||
11.33033592,15622.736
|
||||
11.4071015,15593.4
|
||||
11.48018525,15485.943
|
||||
11.54942825,15270.646
|
||||
11.61424633,14921.577
|
||||
11.674432,14544.71
|
||||
11.72986992,14224.263
|
||||
11.78069242,13971.114
|
||||
11.82665033,13684.399
|
||||
11.86771467,13375.159
|
||||
11.90365167,13002.742
|
||||
11.93385692,12640.544
|
||||
11.95854375,12384.043
|
||||
11.97725417,12122.214
|
||||
11.99019917,11907.961
|
||||
11.99821617,11556.585
|
||||
12,10818.453
|
||||
11.99437833,10218.872
|
||||
11.98168992,9974.513
|
||||
11.96236683,9966.822
|
||||
11.93623683,10046.975
|
||||
11.90283792,10210.082
|
||||
11.86283425,10566.073
|
||||
11.81606508,10971.727
|
||||
11.76242917,11263.277
|
||||
11.70194025,11417.265
|
||||
11.635014,11506.812
|
||||
11.56213983,11355.131
|
||||
11.48255125,10783.129
|
||||
11.39636908,9951.934
|
||||
11.30301192,9180.95
|
||||
11.2028855,8568.624
|
||||
11.09612617,8027.276
|
||||
10.98281183,7570.531
|
||||
10.86439075,7120.324
|
||||
10.74053733,6429.602
|
||||
10.61033417,5731.465
|
||||
10.47414308,5262.799
|
||||
10.331585,4993.608
|
||||
10.18328317,4887.8
|
||||
10.02944475,4866.045
|
||||
9.870938667,4903.347
|
||||
9.708080667,4908.126
|
||||
9.541035917,4860.331
|
||||
9.370086833,4740.019
|
||||
9.194264167,4623.608
|
||||
9.011303833,4806.163
|
||||
8.823120833,5495.896
|
||||
8.630679917,6335.056
|
||||
8.434706083,7096.646
|
||||
8.235212917,7736.001
|
||||
8.031737583,8240.211
|
||||
7.823389583,8565.273
|
||||
7.609442167,8874.732
|
||||
7.394066333,9242.04
|
||||
7.18177575,9725.045
|
||||
6.971143917,10100.648
|
||||
6.76005725,10223.652
|
||||
6.547905917,10202.061
|
||||
6.335514583,10102.626
|
||||
6.1247145,10005.552
|
||||
5.915829583,9948.583
|
||||
5.70865225,9976.106
|
||||
5.502857083,10010.661
|
||||
5.29959525,9951.22
|
||||
5.0998445,9703.729
|
||||
4.90439275,9250.665
|
||||
4.712906583,8789.8
|
||||
4.525125833,8425.513
|
||||
4.34108925,8209.502
|
||||
4.161316917,8221.533
|
||||
3.985825667,8288.006
|
||||
3.81218425,8331.242
|
||||
3.639778833,8203.953
|
||||
3.47038125,8070.566
|
||||
3.30502375,8083.531
|
||||
3.144516,8198.954
|
||||
2.9875085,8453.806
|
||||
2.833456917,8828.805
|
||||
2.683372083,9145.351
|
||||
2.538298167,9273.079
|
||||
2.397747333,9299.449
|
||||
2.261532,9382.898
|
||||
2.128944,9634.838
|
||||
1.9997345,9987.423
|
||||
1.874468417,10264.305
|
||||
1.754004833,10515.696
|
||||
1.638998417,10693.087
|
||||
1.529095667,10687.429
|
||||
1.423291583,10592.882
|
||||
1.320598583,10505.588
|
||||
1.221731833,10531.792
|
||||
1.12771575,10595.739
|
||||
1.038479333,10568.875
|
||||
0.95374375,10443.948
|
||||
0.873229167,10212.17
|
||||
0.796579167,9881.834
|
||||
0.723449833,9552.763
|
||||
0.653880417,9342.464
|
||||
0.587873833,9236.052
|
||||
0.525776833,9193.421
|
||||
0.467945417,9160.623
|
||||
0.413685,9046.41
|
||||
0.362936583,8910.99
|
||||
0.315684333,8743.488
|
||||
0.271219,8566.646
|
||||
0.230005083,8550.44
|
||||
0.1921475,8679.871
|
||||
0.158036583,8881.379
|
||||
0.127829583,9023.831
|
||||
0.1008755,9046.739
|
||||
0.076851667,9062.177
|
||||
0.055667083,9212.429
|
||||
0.037832833,9532.985
|
||||
0.0232665,9776.026
|
||||
0.012359417,9889.581
|
||||
0.005017167,10032.636
|
||||
0.000966833,10243.539
|
||||
0,10488.118
|
||||
0.005469917,10661.443
|
||||
0.013863833,10718.797
|
||||
0.025325333,10687.978
|
||||
0.040032,10620.406
|
||||
0.058248417,10498.72
|
||||
0.07980025,10401.043
|
||||
0.104515583,10441.696
|
||||
0.132326083,10526.409
|
||||
0.16308075,10628.152
|
||||
0.195990667,10737.421
|
||||
0.232066417,10845.921
|
||||
0.271218583,10926.294
|
||||
0.313498083,11047.595
|
||||
0.359020417,11276.132
|
||||
0.407674083,11503.57
|
||||
0.4593205,11739.085
|
||||
0.51380025,11992.673
|
||||
0.571258167,12256.92
|
||||
0.63128025,12511.497
|
||||
0.693512167,12731.464
|
||||
0.758432417,12876.278
|
||||
0.826354917,12925.886
|
||||
0.89726725,12924.183
|
||||
0.9712875,12923.688
|
||||
1.048186583,13030.321
|
||||
1.127629,13306.049
|
||||
1.20959525,13623.199
|
||||
1.293956833,13950.403
|
||||
1.380850583,14278.376
|
||||
1.470691583,14574.101
|
||||
1.562806,14803.847
|
||||
1.656998333,15081.718
|
||||
1.753329083,15410.35
|
||||
1.852025333,15706.46
|
||||
1.952786833,16035.092
|
||||
2.055333167,16412.453
|
||||
2.159586667,16801.681
|
||||
2.265318833,17036.536
|
||||
2.3733975,16972.534
|
||||
2.484817583,16866.287
|
||||
2.59948025,16790.748
|
||||
2.71644175,16735.592
|
||||
2.834529167,16637.255
|
||||
2.95454075,16447.942
|
||||
3.0765375,16175.73
|
||||
3.201042417,15843.802
|
||||
3.328021917,15517.477
|
||||
3.457062,15256.582
|
||||
3.587754333,15145.994
|
||||
3.7197685,15090.343
|
||||
3.853573333,14970.086
|
||||
3.989576583,14891.362
|
||||
4.127587917,14842.962
|
||||
4.26697625,14740.34
|
||||
4.407120917,14499.057
|
||||
4.548720667,14326.721
|
||||
4.692186667,14369.901
|
||||
4.837357167,14485.104
|
||||
4.98334575,14591.681
|
||||
5.129595167,14679.086
|
||||
5.27664525,14766.051
|
||||
5.424664833,14919.434
|
||||
5.573320667,15126.162
|
||||
5.722529083,15310.2
|
||||
5.8719985,15376.069
|
||||
6.021790083,15440.62
|
||||
6.171415167,15476
|
||||
6.321026,15446.828
|
||||
6.470778417,15428.04
|
||||
6.62113375,15377.058
|
||||
6.771690917,15312.727
|
||||
6.92142425,15275.865
|
||||
7.070682583,15279.6
|
||||
7.219948833,15273.283
|
||||
7.369218333,15173.133
|
||||
7.517862583,15022.496
|
||||
7.665456333,14858.125
|
||||
7.81258175,14745.339
|
||||
7.95967025,14636.839
|
||||
8.106388583,14430.496
|
||||
8.251937833,14220.802
|
||||
8.39614225,14055.937
|
||||
8.53943,13982.486
|
||||
8.681693667,13908.102
|
||||
8.822886833,13851.627
|
||||
8.96252875,13881.018
|
||||
9.100747583,13925.517
|
||||
9.237511083,14039.895
|
||||
9.372204667,14149.439
|
||||
9.504688833,14239.756
|
||||
9.634593417,14293.484
|
||||
9.762460917,14316.173
|
||||
9.88810475,14430.991
|
||||
10.01133025,14679.855
|
||||
10.13194283,14924.489
|
||||
10.24966075,15012.168
|
||||
10.36420408,15026.451
|
||||
10.47555567,15122.316
|
||||
10.58395958,15239.826
|
||||
10.68960167,15393.979
|
||||
10.79186508,15480.175
|
||||
10.89072792,15551.648
|
||||
10.98580667,15622.736
|
||||
11.07743458,15593.4
|
||||
11.16544292,15485.943
|
||||
11.24972158,15270.646
|
||||
11.33033592,14921.577
|
||||
11.4071015,14544.71
|
||||
11.48018525,14224.263
|
||||
11.54942825,13971.114
|
||||
11.61424633,13684.399
|
||||
11.674432,13375.159
|
||||
11.72986992,13002.742
|
||||
11.78069242,12640.544
|
||||
11.82665033,12384.043
|
||||
11.86771467,12122.214
|
||||
11.90365167,11907.961
|
||||
11.93385692,11556.585
|
||||
11.95854375,10818.453
|
||||
11.97725417,10218.872
|
||||
11.99019917,9974.513
|
||||
11.99821617,9966.822
|
||||
12,10046.975
|
||||
11.99437833,10210.082
|
||||
11.98168992,10566.073
|
||||
11.96236683,10971.727
|
||||
11.93623683,11263.277
|
||||
11.90283792,11417.265
|
||||
11.86283425,11506.812
|
||||
11.81606508,11355.131
|
||||
11.76242917,10783.129
|
||||
11.70194025,9951.934
|
||||
11.635014,9180.95
|
||||
11.56213983,8568.624
|
||||
11.48255125,8027.276
|
||||
11.39636908,7570.531
|
||||
11.30301192,7120.324
|
||||
11.2028855,6429.602
|
||||
11.09612617,5731.465
|
||||
10.98281183,5262.799
|
||||
10.86439075,4993.608
|
||||
10.74053733,4887.8
|
||||
10.61033417,4866.045
|
||||
10.47414308,4903.347
|
||||
10.331585,4908.126
|
||||
10.18328317,4860.331
|
||||
10.02944475,4740.019
|
||||
9.870938667,4623.608
|
||||
9.708080667,4806.163
|
||||
9.541035917,5495.896
|
||||
9.370086833,6335.056
|
||||
9.194264167,7096.646
|
||||
9.011303833,7736.001
|
||||
8.823120833,8240.211
|
||||
8.630679917,8565.273
|
||||
8.434706083,8874.732
|
||||
8.235212917,9242.04
|
||||
8.031737583,9725.045
|
||||
7.823389583,10100.648
|
||||
7.609442167,10223.652
|
||||
7.394066333,10202.061
|
||||
7.18177575,10102.626
|
||||
6.971143917,10005.552
|
||||
6.76005725,9948.583
|
||||
6.547905917,9976.106
|
||||
6.335514583,10010.661
|
||||
6.1247145,9951.22
|
||||
5.915829583,9703.729
|
||||
5.70865225,9250.665
|
||||
5.502857083,8789.8
|
||||
5.29959525,8425.513
|
||||
5.0998445,8209.502
|
||||
4.90439275,8221.533
|
||||
4.712906583,8288.006
|
||||
4.525125833,8331.242
|
||||
4.34108925,8203.953
|
||||
4.161316917,8070.566
|
||||
3.985825667,8083.531
|
||||
3.81218425,8198.954
|
||||
3.639778833,8453.806
|
||||
3.47038125,8828.805
|
||||
3.30502375,9145.351
|
||||
3.144516,9273.079
|
||||
2.9875085,9299.449
|
||||
2.833456917,9382.898
|
||||
2.683372083,9634.838
|
||||
2.538298167,9987.423
|
||||
2.397747333,10264.305
|
||||
2.261532,10515.696
|
||||
2.128944,10693.087
|
||||
1.9997345,10687.429
|
||||
1.874468417,10592.882
|
||||
1.754004833,10505.588
|
||||
1.638998417,10531.792
|
||||
1.529095667,10595.739
|
||||
1.423291583,10568.875
|
||||
1.320598583,10443.948
|
||||
1.221731833,10212.17
|
||||
1.12771575,9881.834
|
||||
1.038479333,9552.763
|
||||
0.95374375,9342.464
|
||||
0.873229167,9236.052
|
||||
0.796579167,9193.421
|
||||
0.723449833,9160.623
|
||||
0.653880417,9046.41
|
||||
0.587873833,8910.99
|
||||
0.525776833,8743.488
|
||||
0.467945417,8566.646
|
||||
0.413685,8550.44
|
||||
0.362936583,8679.871
|
||||
0.315684333,8881.379
|
||||
0.271219,9023.831
|
||||
0.230005083,9046.739
|
||||
0.1921475,9062.177
|
||||
0.158036583,9212.429
|
||||
0.127829583,9532.985
|
||||
0.1008755,9862.826
|
||||
0.076851667,10190.689
|
||||
0.055667083,10424.885
|
||||
0.037832833,10515.421
|
||||
0.0232665,9776.026
|
||||
0.012359417,9889.581
|
||||
0.005017167,10032.636
|
||||
0.000966833,10243.539
|
||||
0,10488.118
|
||||
0.005469917,10661.443
|
||||
0.013863833,10718.797
|
||||
0.025325333,10687.978
|
||||
0.040032,10620.406
|
||||
0.058248417,10498.72
|
||||
0.07980025,10401.043
|
||||
0.104515583,10441.696
|
||||
0.132326083,10526.409
|
||||
0.16308075,10628.152
|
||||
0.195990667,10737.421
|
||||
0.232066417,10845.921
|
||||
0.271218583,10926.294
|
||||
0.313498083,11047.595
|
||||
0.359020417,11276.132
|
||||
0.407674083,11503.57
|
||||
0.4593205,11739.085
|
||||
0.51380025,11992.673
|
||||
0.571258167,12256.92
|
||||
0.63128025,12511.497
|
||||
0.693512167,12731.464
|
||||
0.758432417,12876.278
|
||||
0.826354917,12925.886
|
||||
0.89726725,12924.183
|
||||
0.9712875,12923.688
|
||||
1.048186583,13030.321
|
||||
1.127629,13306.049
|
||||
1.20959525,13623.199
|
||||
1.293956833,13950.403
|
||||
1.380850583,14278.376
|
||||
1.470691583,14574.101
|
||||
1.562806,14803.847
|
||||
1.656998333,15081.718
|
||||
1.753329083,15410.35
|
||||
1.852025333,15706.46
|
||||
1.952786833,16035.092
|
||||
2.055333167,16412.453
|
||||
2.159586667,16801.681
|
||||
2.265318833,17036.536
|
||||
2.3733975,16972.534
|
||||
2.484817583,16866.287
|
||||
2.59948025,16790.748
|
||||
2.71644175,16735.592
|
||||
2.834529167,16637.255
|
||||
2.95454075,16447.942
|
||||
3.0765375,16175.73
|
||||
3.201042417,15843.802
|
||||
3.328021917,15517.477
|
||||
3.457062,15256.582
|
||||
3.587754333,15145.994
|
||||
3.7197685,15090.343
|
||||
3.853573333,14970.086
|
||||
3.989576583,14891.362
|
||||
4.127587917,14842.962
|
||||
4.26697625,14740.34
|
||||
4.407120917,14499.057
|
||||
4.548720667,14326.721
|
||||
4.692186667,14369.901
|
||||
4.837357167,14485.104
|
||||
4.98334575,14591.681
|
||||
5.129595167,14679.086
|
||||
5.27664525,14766.051
|
||||
5.424664833,14919.434
|
||||
5.573320667,15126.162
|
||||
5.722529083,15310.2
|
||||
5.8719985,15376.069
|
||||
6.021790083,15440.62
|
||||
6.171415167,15476
|
||||
6.321026,15446.828
|
||||
6.470778417,15428.04
|
||||
6.62113375,15377.058
|
||||
6.771690917,15312.727
|
||||
6.92142425,15275.865
|
||||
7.070682583,15279.6
|
||||
7.219948833,15273.283
|
||||
7.369218333,15173.133
|
||||
7.517862583,15022.496
|
||||
7.665456333,14858.125
|
||||
7.81258175,14745.339
|
||||
7.95967025,14636.839
|
||||
8.106388583,14430.496
|
||||
8.251937833,14220.802
|
||||
8.39614225,14055.937
|
||||
8.53943,13982.486
|
||||
8.681693667,13908.102
|
||||
8.822886833,13851.627
|
||||
8.96252875,13881.018
|
||||
9.100747583,13925.517
|
||||
9.237511083,14039.895
|
||||
9.372204667,14149.439
|
||||
9.504688833,14239.756
|
||||
9.634593417,14293.484
|
||||
9.762460917,14316.173
|
||||
9.88810475,14430.991
|
||||
10.01133025,14679.855
|
||||
10.13194283,14924.489
|
||||
10.24966075,15012.168
|
||||
10.36420408,15026.451
|
||||
10.47555567,15122.316
|
||||
10.58395958,15239.826
|
||||
10.68960167,15393.979
|
||||
10.79186508,15480.175
|
||||
10.89072792,15551.648
|
||||
10.98580667,15622.736
|
||||
11.07743458,15593.4
|
||||
11.16544292,15485.943
|
||||
11.24972158,15270.646
|
||||
11.33033592,14921.577
|
||||
11.4071015,14544.71
|
||||
11.48018525,14224.263
|
||||
11.54942825,13971.114
|
||||
11.61424633,13684.399
|
||||
11.674432,13375.159
|
||||
11.72986992,13002.742
|
||||
11.78069242,12640.544
|
||||
11.82665033,12384.043
|
||||
11.86771467,12122.214
|
||||
11.90365167,11907.961
|
||||
11.93385692,11556.585
|
||||
11.95854375,10818.453
|
||||
11.97725417,10218.872
|
||||
11.99019917,9974.513
|
||||
11.99821617,9966.822
|
||||
12,10046.975
|
||||
11.99437833,10210.082
|
||||
11.98168992,10566.073
|
||||
11.96236683,10971.727
|
||||
11.93623683,11263.277
|
||||
11.90283792,11417.265
|
||||
11.86283425,11506.812
|
||||
11.81606508,11355.131
|
||||
11.76242917,10783.129
|
||||
11.70194025,9951.934
|
||||
11.635014,9180.95
|
||||
11.56213983,8568.624
|
||||
11.48255125,8027.276
|
||||
11.39636908,7570.531
|
||||
11.30301192,7120.324
|
||||
11.2028855,6429.602
|
||||
11.09612617,5731.465
|
||||
10.98281183,5262.799
|
||||
10.86439075,4993.608
|
||||
10.74053733,4887.8
|
||||
10.61033417,4866.045
|
||||
10.47414308,4903.347
|
||||
10.331585,4908.126
|
||||
10.18328317,4860.331
|
||||
10.02944475,4740.019
|
||||
9.870938667,4623.608
|
||||
9.708080667,4806.163
|
||||
9.541035917,5495.896
|
||||
9.370086833,6335.056
|
||||
9.194264167,7096.646
|
||||
9.011303833,7736.001
|
||||
8.823120833,8240.211
|
||||
8.630679917,8565.273
|
||||
8.434706083,8874.732
|
||||
8.235212917,9242.04
|
||||
8.031737583,9725.045
|
||||
7.823389583,10100.648
|
||||
7.609442167,10223.652
|
||||
7.394066333,10202.061
|
||||
7.18177575,10102.626
|
||||
6.971143917,10005.552
|
||||
6.76005725,9948.583
|
||||
6.547905917,9976.106
|
||||
6.335514583,10010.661
|
||||
6.1247145,9951.22
|
||||
5.915829583,9703.729
|
||||
5.70865225,9250.665
|
||||
5.502857083,8789.8
|
||||
5.29959525,8425.513
|
||||
5.0998445,8209.502
|
||||
4.90439275,8221.533
|
||||
4.712906583,8288.006
|
||||
4.525125833,8331.242
|
||||
4.34108925,8203.953
|
||||
4.161316917,8070.566
|
||||
3.985825667,8083.531
|
||||
3.81218425,8198.954
|
||||
3.639778833,8453.806
|
||||
3.47038125,8828.805
|
||||
3.30502375,9145.351
|
||||
3.144516,9273.079
|
||||
2.9875085,9299.449
|
||||
2.833456917,9382.898
|
||||
2.683372083,9634.838
|
||||
2.538298167,9987.423
|
||||
2.397747333,10264.305
|
||||
2.261532,10515.696
|
||||
2.128944,10693.087
|
||||
1.9997345,10687.429
|
||||
1.874468417,10592.882
|
||||
1.754004833,10505.588
|
||||
1.638998417,10531.792
|
||||
1.529095667,10595.739
|
||||
1.423291583,10568.875
|
||||
1.320598583,10443.948
|
||||
1.221731833,10212.17
|
||||
1.12771575,9881.834
|
||||
1.038479333,9552.763
|
||||
0.95374375,9342.464
|
||||
0.873229167,9236.052
|
||||
0.796579167,9193.421
|
||||
0.723449833,9160.623
|
||||
0.653880417,9046.41
|
||||
0.587873833,8910.99
|
||||
0.525776833,8743.488
|
||||
0.467945417,8566.646
|
||||
0.413685,8550.44
|
||||
0.362936583,8679.871
|
||||
0.315684333,8881.379
|
||||
0.271219,9023.831
|
||||
0.230005083,9046.739
|
||||
0.1921475,9062.177
|
||||
0.158036583,9212.429
|
||||
0.127829583,9532.985
|
||||
0.1008755,9862.826
|
||||
0.076851667,10190.689
|
||||
0.055667083,10424.885
|
||||
0.037832833,10515.421
|
||||
0.0232665,10534.1
|
||||
0.012359417,10661.443
|
||||
0.005017167,10718.797
|
||||
0.000966833,10687.978
|
||||
0,10620.406
|
||||
|
87
MongoDB.m
Normal file
87
MongoDB.m
Normal file
@@ -0,0 +1,87 @@
|
||||
|
||||
classdef MongoDB < handle
|
||||
properties
|
||||
hostname;
|
||||
username;
|
||||
password;
|
||||
database='poc';
|
||||
port=27017;
|
||||
cardCollection, wellDataCollection, gaugeOffCollection, ...
|
||||
wellTestCollection, fluidShotsCollection, ...
|
||||
runStatusCollection, wellConfigCollection, setpointCollection;
|
||||
end
|
||||
|
||||
methods
|
||||
function obj = Database(hostname, username, password)
|
||||
javaaddpath 'mongo-java-driver-3.4.2.jar';
|
||||
import com.mongodb.*;
|
||||
import com.mongodb.client.model.*;
|
||||
import java.util.Arrays;
|
||||
|
||||
obj.hostname = hostname;
|
||||
obj.username = username;
|
||||
obj.password = password;
|
||||
credential = MongoCredential.createCredential(obj.username, obj.database, obj.password);
|
||||
mongo = MongoClient(Arrays.asList(ServerAddress(obj.hostname, obj.port)), Arrays.asList(credential));
|
||||
|
||||
db = mongo.getDatabase("poc");
|
||||
obj.cardCollection = db.getCollection('cards');
|
||||
% obj.cardCollection.createIndex(Indexes.ascending("timestamp", "strokeNumber"));
|
||||
|
||||
obj.wellDataCollection = db.getCollection("measurements");
|
||||
% obj.wellDataCollection.createIndex(Indexes.ascending("dateStored", "tagName"));
|
||||
|
||||
obj.gaugeOffCollection = db.getCollection("gaugeOff");
|
||||
% obj.gaugeOffCollection.createIndex(Indexes.ascending("timestamp", "tagName"));
|
||||
|
||||
obj.wellTestCollection = db.getCollection("wellTests");
|
||||
% obj.wellTestCollection.createIndex(Indexes.ascending("testStartTime"));
|
||||
|
||||
obj.fluidShotsCollection = db.getCollection("fluidShots");
|
||||
% obj.fluidShotsCollection.createIndex(Indexes.ascending("timestamp"));
|
||||
|
||||
obj.runStatusCollection = db.getCollection("runStatus");
|
||||
% obj.runStatusCollection.createIndex(Indexes.ascending("timestamp"));
|
||||
|
||||
obj.wellConfigCollection = db.getCollection("wellConfiguration");
|
||||
% obj.wellConfigCollection.createIndex(Indexes.ascending("timestamp"));
|
||||
|
||||
obj.setpointCollection = db.getCollection("setpoints");
|
||||
% obj.setpointCollection.createIndex(Indexes.ascending("name"));
|
||||
end
|
||||
|
||||
function lastStroke = getLastStrokeNum(obj)
|
||||
javaaddpath 'mongo-java-driver-3.4.2.jar';
|
||||
import com.mongodb.client.model.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
lastStroke = -1;
|
||||
last = Accumulators.last("lastStroke", "$strokeNumber");
|
||||
lastList = java.util.ArrayList;
|
||||
lastList.add(last);
|
||||
group = Aggregates.group("strokeNumber", lastList);
|
||||
groupList = java.util.ArrayList;
|
||||
groupList.add(group);
|
||||
groupListArray = Arrays.asList(groupList);
|
||||
|
||||
cursor = obj.cardCollection.aggregate(groupListArray).iterator();
|
||||
while (cursor.hasNext())
|
||||
docStroke = cursor.next().getLong("lastStroke");
|
||||
if (docStroke > lastStroke)
|
||||
lastStroke = docStroke;
|
||||
end
|
||||
end
|
||||
cursor.close();
|
||||
end
|
||||
end
|
||||
|
||||
methods(Static)
|
||||
function test
|
||||
db = Database('localhost', 'poc_java', 'HenryPump@1903');
|
||||
lastStroke = db.getLastStrokeNum()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
@@ -52,7 +52,7 @@ classdef MuxSetup < handle
|
||||
end
|
||||
methods(Static)
|
||||
function test
|
||||
pi = raspi('10.0.0.104', 'pi', 'raspberry');
|
||||
pi = raspi('10.0.0.104', 'pi', 'HenryPump@1903');
|
||||
mux = MuxSetup(pi);
|
||||
mux.set(1);
|
||||
mux.readAnalogSPI()
|
||||
|
||||
12
test.m
12
test.m
@@ -1,6 +1,16 @@
|
||||
|
||||
% db = MongoDB();
|
||||
% db.getLastStrokeNum()
|
||||
|
||||
% DigitalOutput.test()
|
||||
% MuxSetup.test()
|
||||
% AnalogInput.test()
|
||||
% DigitalInput.test()
|
||||
Database.test()
|
||||
% Database.test()
|
||||
% c = Card(1);
|
||||
% m = csvread('Mallet No Tag.csv')
|
||||
% for i = 1:size(m,1)
|
||||
% c.push(m(i,1), m(i,2), 0, 0)
|
||||
% end
|
||||
%
|
||||
% scatter(c.surfacePosition(:,:), c.surfaceLoad(:,:))
|
||||
|
||||
Reference in New Issue
Block a user