This file contains 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 fs = require("fs"); | |
const path = require("path"); | |
const express = require("express"); | |
const fileUpload = require("express-fileupload"); | |
const bodyParser = require("body-parser"); | |
const rimraf = require("rimraf"); | |
const mkdirp = require("mkdirp"); | |
const child_process = require("child_process"); | |
const turf = require("@turf/turf"); | |
const archiver = require("archiver"); |
This file contains 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 sys | |
import time | |
import RPi.GPIO as GPIO | |
# use Pi BCM mode for pin numbers | |
GPIO.setmode(GPIO.BCM) | |
# hall effect pins | |
channel1 = 19 | |
channel2 = 26 |
This file contains 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 filterCurblrData = (data:CurbFeatureCollection, day:string, time:string, filterType:string):FeatureCollection<LineString> => { | |
var fitleredData = featureCollection<LineString>([]); | |
for(var curbFeature of data.features) { | |
var filteredFeature = feature<LineString>(curbFeature.geometry); | |
filteredFeature.properties = {}; | |
if(!filterTimeAndDay(curbFeature, day, time)) | |
continue; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
{ | |
"type": "FeatureCollection", | |
"name": "bluetooth_segments", | |
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, | |
"features": [ | |
{ "type": "Feature", "properties": { "segment_name": "YO_LY_BL_MP", "analysis_id": 1448358, "street": "Blythwood", "direction": "EB", "start_crossstreet": "Lytton", "end_crossstreet": "Mount Pleasant", "length": 529, "bluetooth": true, "wifi": false, "duplicate": false, "reversed": false, "end_street": "Blythwood" }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ -79.400481754, 43.716605892 ], [ -79.399124086, 43.716865512 ], [ -79.398772592, 43.716937019 ], [ -79.39769141399999, 43.717158734 ], [ -79.39415696099999, 43.717890131 ] ] ] } }, | |
{ "type": "Feature", "properties": { "segment_name": "YO_GL_BL_MP", "analysis_id": 1448911, "street": "Yonge", "direction": "EB", "start_crossstreet": "Glengrove", "end_crossstreet": "Mount Pleasant", "length": 860, "bluetooth": true, "wifi": false, "duplicate": false, "reversed": false, "end_street" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder