Working on MongoDB interface

This commit is contained in:
Patrick McDonagh
2017-07-18 16:17:56 -05:00
parent 183689119e
commit 8726d73923
8 changed files with 784 additions and 5 deletions

View File

@@ -62,7 +62,7 @@ classdef AnalogInput < handle
methods(Static) methods(Static)
function test function test
pi = raspi('10.0.0.104', 'pi', 'raspberry'); pi = raspi('10.0.0.104', 'pi', 'HenryPump@1903');
mux = MuxSetup(pi); mux = MuxSetup(pi);
anInput1 = AnalogInput(mux, 1, 0.0, 65535.0, 0.0, 100.0); anInput1 = AnalogInput(mux, 1, 0.0, 65535.0, 0.0, 100.0);
anInput2 = AnalogInput(mux, 2, 0.0, 65535.0, 0.0, 100.0); anInput2 = AnalogInput(mux, 2, 0.0, 65535.0, 0.0, 100.0);

View File

@@ -19,7 +19,7 @@ classdef DigitalInput < handle
methods(Static) methods(Static)
function test function test
pi = raspi('10.0.0.104', 'pi', 'raspberry'); pi = raspi('10.0.0.104', 'pi', 'HenryPump@1903');
mux = MuxSetup(pi); mux = MuxSetup(pi);
digIn1 = DigitalInput(mux, 1); digIn1 = DigitalInput(mux, 1);
digIn2 = DigitalInput(mux, 2); digIn2 = DigitalInput(mux, 2);

View File

@@ -35,7 +35,7 @@ classdef DigitalOutput < handle
end end
methods(Static) methods(Static)
function test function test
pi = raspi('10.0.0.104', 'pi', 'raspberry'); pi = raspi('10.0.0.104', 'pi', 'HenryPump@1903');
d1 = DigitalOutput(pi, 1); d1 = DigitalOutput(pi, 1);
d2 = DigitalOutput(pi, 2); d2 = DigitalOutput(pi, 2);

676
Mallet No Tag.csv Normal file
View 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
1 0 9776.026
2 0.005469917 9889.581
3 0.013863833 10032.636
4 0.025325333 10243.539
5 0.040032 10488.118
6 0.058248417 10661.443
7 0.07980025 10718.797
8 0.104515583 10687.978
9 0.132326083 10620.406
10 0.16308075 10498.72
11 0.195990667 10401.043
12 0.232066417 10441.696
13 0.271218583 10526.409
14 0.313498083 10628.152
15 0.359020417 10737.421
16 0.407674083 10845.921
17 0.4593205 10926.294
18 0.51380025 11047.595
19 0.571258167 11276.132
20 0.63128025 11503.57
21 0.693512167 11739.085
22 0.758432417 11992.673
23 0.826354917 12256.92
24 0.89726725 12511.497
25 0.9712875 12731.464
26 1.048186583 12876.278
27 1.127629 12925.886
28 1.20959525 12924.183
29 1.293956833 12923.688
30 1.380850583 13030.321
31 1.470691583 13306.049
32 1.562806 13623.199
33 1.656998333 13950.403
34 1.753329083 14278.376
35 1.852025333 14574.101
36 1.952786833 14803.847
37 2.055333167 15081.718
38 2.159586667 15410.35
39 2.265318833 15706.46
40 2.3733975 16035.092
41 2.484817583 16412.453
42 2.59948025 16801.681
43 2.71644175 17036.536
44 2.834529167 16972.534
45 2.95454075 16866.287
46 3.0765375 16790.748
47 3.201042417 16735.592
48 3.328021917 16637.255
49 3.457062 16447.942
50 3.587754333 16175.73
51 3.7197685 15843.802
52 3.853573333 15517.477
53 3.989576583 15256.582
54 4.127587917 15145.994
55 4.26697625 15090.343
56 4.407120917 14970.086
57 4.548720667 14891.362
58 4.692186667 14842.962
59 4.837357167 14740.34
60 4.98334575 14499.057
61 5.129595167 14326.721
62 5.27664525 14369.901
63 5.424664833 14485.104
64 5.573320667 14591.681
65 5.722529083 14679.086
66 5.8719985 14766.051
67 6.021790083 14919.434
68 6.171415167 15126.162
69 6.321026 15310.2
70 6.470778417 15376.069
71 6.62113375 15440.62
72 6.771690917 15476
73 6.92142425 15446.828
74 7.070682583 15428.04
75 7.219948833 15377.058
76 7.369218333 15312.727
77 7.517862583 15275.865
78 7.665456333 15279.6
79 7.81258175 15273.283
80 7.95967025 15173.133
81 8.106388583 15022.496
82 8.251937833 14858.125
83 8.39614225 14745.339
84 8.53943 14636.839
85 8.681693667 14430.496
86 8.822886833 14220.802
87 8.96252875 14055.937
88 9.100747583 13982.486
89 9.237511083 13908.102
90 9.372204667 13851.627
91 9.504688833 13881.018
92 9.634593417 13925.517
93 9.762460917 14039.895
94 9.88810475 14149.439
95 10.01133025 14239.756
96 10.13194283 14293.484
97 10.24966075 14316.173
98 10.36420408 14430.991
99 10.47555567 14679.855
100 10.58395958 14924.489
101 10.68960167 15012.168
102 10.79186508 15026.451
103 10.89072792 15122.316
104 10.98580667 15239.826
105 11.07743458 15393.979
106 11.16544292 15480.175
107 11.24972158 15551.648
108 11.33033592 15622.736
109 11.4071015 15593.4
110 11.48018525 15485.943
111 11.54942825 15270.646
112 11.61424633 14921.577
113 11.674432 14544.71
114 11.72986992 14224.263
115 11.78069242 13971.114
116 11.82665033 13684.399
117 11.86771467 13375.159
118 11.90365167 13002.742
119 11.93385692 12640.544
120 11.95854375 12384.043
121 11.97725417 12122.214
122 11.99019917 11907.961
123 11.99821617 11556.585
124 12 10818.453
125 11.99437833 10218.872
126 11.98168992 9974.513
127 11.96236683 9966.822
128 11.93623683 10046.975
129 11.90283792 10210.082
130 11.86283425 10566.073
131 11.81606508 10971.727
132 11.76242917 11263.277
133 11.70194025 11417.265
134 11.635014 11506.812
135 11.56213983 11355.131
136 11.48255125 10783.129
137 11.39636908 9951.934
138 11.30301192 9180.95
139 11.2028855 8568.624
140 11.09612617 8027.276
141 10.98281183 7570.531
142 10.86439075 7120.324
143 10.74053733 6429.602
144 10.61033417 5731.465
145 10.47414308 5262.799
146 10.331585 4993.608
147 10.18328317 4887.8
148 10.02944475 4866.045
149 9.870938667 4903.347
150 9.708080667 4908.126
151 9.541035917 4860.331
152 9.370086833 4740.019
153 9.194264167 4623.608
154 9.011303833 4806.163
155 8.823120833 5495.896
156 8.630679917 6335.056
157 8.434706083 7096.646
158 8.235212917 7736.001
159 8.031737583 8240.211
160 7.823389583 8565.273
161 7.609442167 8874.732
162 7.394066333 9242.04
163 7.18177575 9725.045
164 6.971143917 10100.648
165 6.76005725 10223.652
166 6.547905917 10202.061
167 6.335514583 10102.626
168 6.1247145 10005.552
169 5.915829583 9948.583
170 5.70865225 9976.106
171 5.502857083 10010.661
172 5.29959525 9951.22
173 5.0998445 9703.729
174 4.90439275 9250.665
175 4.712906583 8789.8
176 4.525125833 8425.513
177 4.34108925 8209.502
178 4.161316917 8221.533
179 3.985825667 8288.006
180 3.81218425 8331.242
181 3.639778833 8203.953
182 3.47038125 8070.566
183 3.30502375 8083.531
184 3.144516 8198.954
185 2.9875085 8453.806
186 2.833456917 8828.805
187 2.683372083 9145.351
188 2.538298167 9273.079
189 2.397747333 9299.449
190 2.261532 9382.898
191 2.128944 9634.838
192 1.9997345 9987.423
193 1.874468417 10264.305
194 1.754004833 10515.696
195 1.638998417 10693.087
196 1.529095667 10687.429
197 1.423291583 10592.882
198 1.320598583 10505.588
199 1.221731833 10531.792
200 1.12771575 10595.739
201 1.038479333 10568.875
202 0.95374375 10443.948
203 0.873229167 10212.17
204 0.796579167 9881.834
205 0.723449833 9552.763
206 0.653880417 9342.464
207 0.587873833 9236.052
208 0.525776833 9193.421
209 0.467945417 9160.623
210 0.413685 9046.41
211 0.362936583 8910.99
212 0.315684333 8743.488
213 0.271219 8566.646
214 0.230005083 8550.44
215 0.1921475 8679.871
216 0.158036583 8881.379
217 0.127829583 9023.831
218 0.1008755 9046.739
219 0.076851667 9062.177
220 0.055667083 9212.429
221 0.037832833 9532.985
222 0.0232665 9776.026
223 0.012359417 9889.581
224 0.005017167 10032.636
225 0.000966833 10243.539
226 0 10488.118
227 0.005469917 10661.443
228 0.013863833 10718.797
229 0.025325333 10687.978
230 0.040032 10620.406
231 0.058248417 10498.72
232 0.07980025 10401.043
233 0.104515583 10441.696
234 0.132326083 10526.409
235 0.16308075 10628.152
236 0.195990667 10737.421
237 0.232066417 10845.921
238 0.271218583 10926.294
239 0.313498083 11047.595
240 0.359020417 11276.132
241 0.407674083 11503.57
242 0.4593205 11739.085
243 0.51380025 11992.673
244 0.571258167 12256.92
245 0.63128025 12511.497
246 0.693512167 12731.464
247 0.758432417 12876.278
248 0.826354917 12925.886
249 0.89726725 12924.183
250 0.9712875 12923.688
251 1.048186583 13030.321
252 1.127629 13306.049
253 1.20959525 13623.199
254 1.293956833 13950.403
255 1.380850583 14278.376
256 1.470691583 14574.101
257 1.562806 14803.847
258 1.656998333 15081.718
259 1.753329083 15410.35
260 1.852025333 15706.46
261 1.952786833 16035.092
262 2.055333167 16412.453
263 2.159586667 16801.681
264 2.265318833 17036.536
265 2.3733975 16972.534
266 2.484817583 16866.287
267 2.59948025 16790.748
268 2.71644175 16735.592
269 2.834529167 16637.255
270 2.95454075 16447.942
271 3.0765375 16175.73
272 3.201042417 15843.802
273 3.328021917 15517.477
274 3.457062 15256.582
275 3.587754333 15145.994
276 3.7197685 15090.343
277 3.853573333 14970.086
278 3.989576583 14891.362
279 4.127587917 14842.962
280 4.26697625 14740.34
281 4.407120917 14499.057
282 4.548720667 14326.721
283 4.692186667 14369.901
284 4.837357167 14485.104
285 4.98334575 14591.681
286 5.129595167 14679.086
287 5.27664525 14766.051
288 5.424664833 14919.434
289 5.573320667 15126.162
290 5.722529083 15310.2
291 5.8719985 15376.069
292 6.021790083 15440.62
293 6.171415167 15476
294 6.321026 15446.828
295 6.470778417 15428.04
296 6.62113375 15377.058
297 6.771690917 15312.727
298 6.92142425 15275.865
299 7.070682583 15279.6
300 7.219948833 15273.283
301 7.369218333 15173.133
302 7.517862583 15022.496
303 7.665456333 14858.125
304 7.81258175 14745.339
305 7.95967025 14636.839
306 8.106388583 14430.496
307 8.251937833 14220.802
308 8.39614225 14055.937
309 8.53943 13982.486
310 8.681693667 13908.102
311 8.822886833 13851.627
312 8.96252875 13881.018
313 9.100747583 13925.517
314 9.237511083 14039.895
315 9.372204667 14149.439
316 9.504688833 14239.756
317 9.634593417 14293.484
318 9.762460917 14316.173
319 9.88810475 14430.991
320 10.01133025 14679.855
321 10.13194283 14924.489
322 10.24966075 15012.168
323 10.36420408 15026.451
324 10.47555567 15122.316
325 10.58395958 15239.826
326 10.68960167 15393.979
327 10.79186508 15480.175
328 10.89072792 15551.648
329 10.98580667 15622.736
330 11.07743458 15593.4
331 11.16544292 15485.943
332 11.24972158 15270.646
333 11.33033592 14921.577
334 11.4071015 14544.71
335 11.48018525 14224.263
336 11.54942825 13971.114
337 11.61424633 13684.399
338 11.674432 13375.159
339 11.72986992 13002.742
340 11.78069242 12640.544
341 11.82665033 12384.043
342 11.86771467 12122.214
343 11.90365167 11907.961
344 11.93385692 11556.585
345 11.95854375 10818.453
346 11.97725417 10218.872
347 11.99019917 9974.513
348 11.99821617 9966.822
349 12 10046.975
350 11.99437833 10210.082
351 11.98168992 10566.073
352 11.96236683 10971.727
353 11.93623683 11263.277
354 11.90283792 11417.265
355 11.86283425 11506.812
356 11.81606508 11355.131
357 11.76242917 10783.129
358 11.70194025 9951.934
359 11.635014 9180.95
360 11.56213983 8568.624
361 11.48255125 8027.276
362 11.39636908 7570.531
363 11.30301192 7120.324
364 11.2028855 6429.602
365 11.09612617 5731.465
366 10.98281183 5262.799
367 10.86439075 4993.608
368 10.74053733 4887.8
369 10.61033417 4866.045
370 10.47414308 4903.347
371 10.331585 4908.126
372 10.18328317 4860.331
373 10.02944475 4740.019
374 9.870938667 4623.608
375 9.708080667 4806.163
376 9.541035917 5495.896
377 9.370086833 6335.056
378 9.194264167 7096.646
379 9.011303833 7736.001
380 8.823120833 8240.211
381 8.630679917 8565.273
382 8.434706083 8874.732
383 8.235212917 9242.04
384 8.031737583 9725.045
385 7.823389583 10100.648
386 7.609442167 10223.652
387 7.394066333 10202.061
388 7.18177575 10102.626
389 6.971143917 10005.552
390 6.76005725 9948.583
391 6.547905917 9976.106
392 6.335514583 10010.661
393 6.1247145 9951.22
394 5.915829583 9703.729
395 5.70865225 9250.665
396 5.502857083 8789.8
397 5.29959525 8425.513
398 5.0998445 8209.502
399 4.90439275 8221.533
400 4.712906583 8288.006
401 4.525125833 8331.242
402 4.34108925 8203.953
403 4.161316917 8070.566
404 3.985825667 8083.531
405 3.81218425 8198.954
406 3.639778833 8453.806
407 3.47038125 8828.805
408 3.30502375 9145.351
409 3.144516 9273.079
410 2.9875085 9299.449
411 2.833456917 9382.898
412 2.683372083 9634.838
413 2.538298167 9987.423
414 2.397747333 10264.305
415 2.261532 10515.696
416 2.128944 10693.087
417 1.9997345 10687.429
418 1.874468417 10592.882
419 1.754004833 10505.588
420 1.638998417 10531.792
421 1.529095667 10595.739
422 1.423291583 10568.875
423 1.320598583 10443.948
424 1.221731833 10212.17
425 1.12771575 9881.834
426 1.038479333 9552.763
427 0.95374375 9342.464
428 0.873229167 9236.052
429 0.796579167 9193.421
430 0.723449833 9160.623
431 0.653880417 9046.41
432 0.587873833 8910.99
433 0.525776833 8743.488
434 0.467945417 8566.646
435 0.413685 8550.44
436 0.362936583 8679.871
437 0.315684333 8881.379
438 0.271219 9023.831
439 0.230005083 9046.739
440 0.1921475 9062.177
441 0.158036583 9212.429
442 0.127829583 9532.985
443 0.1008755 9862.826
444 0.076851667 10190.689
445 0.055667083 10424.885
446 0.037832833 10515.421
447 0.0232665 9776.026
448 0.012359417 9889.581
449 0.005017167 10032.636
450 0.000966833 10243.539
451 0 10488.118
452 0.005469917 10661.443
453 0.013863833 10718.797
454 0.025325333 10687.978
455 0.040032 10620.406
456 0.058248417 10498.72
457 0.07980025 10401.043
458 0.104515583 10441.696
459 0.132326083 10526.409
460 0.16308075 10628.152
461 0.195990667 10737.421
462 0.232066417 10845.921
463 0.271218583 10926.294
464 0.313498083 11047.595
465 0.359020417 11276.132
466 0.407674083 11503.57
467 0.4593205 11739.085
468 0.51380025 11992.673
469 0.571258167 12256.92
470 0.63128025 12511.497
471 0.693512167 12731.464
472 0.758432417 12876.278
473 0.826354917 12925.886
474 0.89726725 12924.183
475 0.9712875 12923.688
476 1.048186583 13030.321
477 1.127629 13306.049
478 1.20959525 13623.199
479 1.293956833 13950.403
480 1.380850583 14278.376
481 1.470691583 14574.101
482 1.562806 14803.847
483 1.656998333 15081.718
484 1.753329083 15410.35
485 1.852025333 15706.46
486 1.952786833 16035.092
487 2.055333167 16412.453
488 2.159586667 16801.681
489 2.265318833 17036.536
490 2.3733975 16972.534
491 2.484817583 16866.287
492 2.59948025 16790.748
493 2.71644175 16735.592
494 2.834529167 16637.255
495 2.95454075 16447.942
496 3.0765375 16175.73
497 3.201042417 15843.802
498 3.328021917 15517.477
499 3.457062 15256.582
500 3.587754333 15145.994
501 3.7197685 15090.343
502 3.853573333 14970.086
503 3.989576583 14891.362
504 4.127587917 14842.962
505 4.26697625 14740.34
506 4.407120917 14499.057
507 4.548720667 14326.721
508 4.692186667 14369.901
509 4.837357167 14485.104
510 4.98334575 14591.681
511 5.129595167 14679.086
512 5.27664525 14766.051
513 5.424664833 14919.434
514 5.573320667 15126.162
515 5.722529083 15310.2
516 5.8719985 15376.069
517 6.021790083 15440.62
518 6.171415167 15476
519 6.321026 15446.828
520 6.470778417 15428.04
521 6.62113375 15377.058
522 6.771690917 15312.727
523 6.92142425 15275.865
524 7.070682583 15279.6
525 7.219948833 15273.283
526 7.369218333 15173.133
527 7.517862583 15022.496
528 7.665456333 14858.125
529 7.81258175 14745.339
530 7.95967025 14636.839
531 8.106388583 14430.496
532 8.251937833 14220.802
533 8.39614225 14055.937
534 8.53943 13982.486
535 8.681693667 13908.102
536 8.822886833 13851.627
537 8.96252875 13881.018
538 9.100747583 13925.517
539 9.237511083 14039.895
540 9.372204667 14149.439
541 9.504688833 14239.756
542 9.634593417 14293.484
543 9.762460917 14316.173
544 9.88810475 14430.991
545 10.01133025 14679.855
546 10.13194283 14924.489
547 10.24966075 15012.168
548 10.36420408 15026.451
549 10.47555567 15122.316
550 10.58395958 15239.826
551 10.68960167 15393.979
552 10.79186508 15480.175
553 10.89072792 15551.648
554 10.98580667 15622.736
555 11.07743458 15593.4
556 11.16544292 15485.943
557 11.24972158 15270.646
558 11.33033592 14921.577
559 11.4071015 14544.71
560 11.48018525 14224.263
561 11.54942825 13971.114
562 11.61424633 13684.399
563 11.674432 13375.159
564 11.72986992 13002.742
565 11.78069242 12640.544
566 11.82665033 12384.043
567 11.86771467 12122.214
568 11.90365167 11907.961
569 11.93385692 11556.585
570 11.95854375 10818.453
571 11.97725417 10218.872
572 11.99019917 9974.513
573 11.99821617 9966.822
574 12 10046.975
575 11.99437833 10210.082
576 11.98168992 10566.073
577 11.96236683 10971.727
578 11.93623683 11263.277
579 11.90283792 11417.265
580 11.86283425 11506.812
581 11.81606508 11355.131
582 11.76242917 10783.129
583 11.70194025 9951.934
584 11.635014 9180.95
585 11.56213983 8568.624
586 11.48255125 8027.276
587 11.39636908 7570.531
588 11.30301192 7120.324
589 11.2028855 6429.602
590 11.09612617 5731.465
591 10.98281183 5262.799
592 10.86439075 4993.608
593 10.74053733 4887.8
594 10.61033417 4866.045
595 10.47414308 4903.347
596 10.331585 4908.126
597 10.18328317 4860.331
598 10.02944475 4740.019
599 9.870938667 4623.608
600 9.708080667 4806.163
601 9.541035917 5495.896
602 9.370086833 6335.056
603 9.194264167 7096.646
604 9.011303833 7736.001
605 8.823120833 8240.211
606 8.630679917 8565.273
607 8.434706083 8874.732
608 8.235212917 9242.04
609 8.031737583 9725.045
610 7.823389583 10100.648
611 7.609442167 10223.652
612 7.394066333 10202.061
613 7.18177575 10102.626
614 6.971143917 10005.552
615 6.76005725 9948.583
616 6.547905917 9976.106
617 6.335514583 10010.661
618 6.1247145 9951.22
619 5.915829583 9703.729
620 5.70865225 9250.665
621 5.502857083 8789.8
622 5.29959525 8425.513
623 5.0998445 8209.502
624 4.90439275 8221.533
625 4.712906583 8288.006
626 4.525125833 8331.242
627 4.34108925 8203.953
628 4.161316917 8070.566
629 3.985825667 8083.531
630 3.81218425 8198.954
631 3.639778833 8453.806
632 3.47038125 8828.805
633 3.30502375 9145.351
634 3.144516 9273.079
635 2.9875085 9299.449
636 2.833456917 9382.898
637 2.683372083 9634.838
638 2.538298167 9987.423
639 2.397747333 10264.305
640 2.261532 10515.696
641 2.128944 10693.087
642 1.9997345 10687.429
643 1.874468417 10592.882
644 1.754004833 10505.588
645 1.638998417 10531.792
646 1.529095667 10595.739
647 1.423291583 10568.875
648 1.320598583 10443.948
649 1.221731833 10212.17
650 1.12771575 9881.834
651 1.038479333 9552.763
652 0.95374375 9342.464
653 0.873229167 9236.052
654 0.796579167 9193.421
655 0.723449833 9160.623
656 0.653880417 9046.41
657 0.587873833 8910.99
658 0.525776833 8743.488
659 0.467945417 8566.646
660 0.413685 8550.44
661 0.362936583 8679.871
662 0.315684333 8881.379
663 0.271219 9023.831
664 0.230005083 9046.739
665 0.1921475 9062.177
666 0.158036583 9212.429
667 0.127829583 9532.985
668 0.1008755 9862.826
669 0.076851667 10190.689
670 0.055667083 10424.885
671 0.037832833 10515.421
672 0.0232665 10534.1
673 0.012359417 10661.443
674 0.005017167 10718.797
675 0.000966833 10687.978
676 0 10620.406

87
MongoDB.m Normal file
View 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

View File

@@ -52,7 +52,7 @@ classdef MuxSetup < handle
end end
methods(Static) methods(Static)
function test function test
pi = raspi('10.0.0.104', 'pi', 'raspberry'); pi = raspi('10.0.0.104', 'pi', 'HenryPump@1903');
mux = MuxSetup(pi); mux = MuxSetup(pi);
mux.set(1); mux.set(1);
mux.readAnalogSPI() mux.readAnalogSPI()

6
Well.m Normal file
View File

@@ -0,0 +1,6 @@
classdef Well
end

12
test.m
View File

@@ -1,6 +1,16 @@
% db = MongoDB();
% db.getLastStrokeNum()
% DigitalOutput.test() % DigitalOutput.test()
% MuxSetup.test() % MuxSetup.test()
% AnalogInput.test() % AnalogInput.test()
% DigitalInput.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(:,:))