This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const uint8_t photo_transistor_pin_dx = A0; | |
const uint8_t photo_transistor_pin_sx = A1; | |
const int threshold = 700; | |
uint32_t dx_steps = 0; | |
uint32_t sx_steps = 0; | |
boolean dx_state_k = 1; | |
boolean dx_state_km1 = 1; | |
boolean sx_state_k = 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from scikits.audiolab import wavread, wavwrite | |
data1, fs1, enc1 = wavread("finevite112.wav") | |
data2, fs2, enc2 = wavread("machine1.wav") | |
assert fs1 == fs2 | |
assert enc1 == enc2 | |
data2ok = np.split(data2,[len(data2)//2 - len(data1)//2, len(data2)//2 + len(data1)//2+1])[1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Test uncertain system | |
clear all | |
clc | |
%% | |
% Gravity cst | |
g=9.81; | |
% Density of air [ kg*m^-3 ] | |
% From 35°C to - 25°C | |
rho = ureal('rho',1.2250,'Range',[1.1455 1.4224]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Analog read pins | |
const int xPin = 0; | |
const int yPin = 1; | |
const int zPin = 2; | |
int xRead,yRead,zRead; | |
//to hold the caculated values | |
double x; | |
double y; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Analog read pins | |
const int xPin = 0; | |
const int yPin = 1; | |
const int zPin = 2; | |
int xRead,yRead,zRead; | |
void setup() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Consistency Check. Returns true if passed | |
*/ | |
private static boolean performConsistencyCheckWith(InfModel inf) { | |
boolean res = false; | |
ValidityReport validity = inf.validate(); | |
if (validity.isValid()) { | |
System.out.println("\tConsistency Check:\n Passed\n"); | |
res = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Two ways | |
Reasoner reasoner = ReasonerRegistry.getOWLReasoner(); | |
reasoner = reasoner.bindSchema(tbox); | |
OntModelSpec ontModelSpec=OntModelSpec.OWL_MEM_MICRO_RULE_INF; | |
ontModelSpec.setReasoner(reasoner); | |
InfModel infmodel = ModelFactory.createInfModel(reasoner,abox); | |
/** | |
* This is equivalent to an Ontology Model with Reasoner capabilities | |
* specialized on the ABox. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final String JENA_PATH = "/home/PATH/ontologies/"; | |
final String SOURCE = "http://www.semanticweb.org/ontologies/2016/1/"; | |
final String TBOX_FILE = "semantic_mapping_domain_model.owl"; | |
final String ABOX_FILE = "semantic_map1.owl"; | |
/** | |
* Importing Tbox | |
*/ | |
OntModel tbox = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<NamedIndividual rdf:about="sm#chair1_coordinates"> | |
<rdf:type rdf:resource="&semantic_mapping_domain_model;Coordinates"/> | |
<semantic_mapping_domain_model:float_coordinates_z rdf:datatype="&xsd;float">0.0 | |
</semantic_mapping_domain_model:float_coordinates_z> | |
<semantic_mapping_domain_model:float_coordinates_y rdf:datatype="&xsd;float">0.0 | |
</semantic_mapping_domain_model:float_coordinates_y> | |
<semantic_mapping_domain_model:float_coordinates_x rdf:datatype="&xsd;float">1.0 | |
</semantic_mapping_domain_model:float_coordinates_x> | |
</NamedIndividual> |
NewerOlder