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
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ | |
/* Latitude/longitude spherical geodesy formulae & scripts (c) Chris Veness 2002-2012 */ | |
/* - www.movable-type.co.uk/scripts/latlong.html */ | |
/* */ | |
/* Sample usage: */ | |
/* var p1 = new LatLon(51.5136, -0.0983); */ | |
/* var p2 = new LatLon(51.4778, -0.0015); */ | |
/* var dist = p1.distanceTo(p2); // in km */ | |
/* var brng = p1.bearingTo(p2); // in degrees clockwise from north */ | |
/* ... etc */ |
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
.controller('compassCtrl', function($scope, $ionicPlatform, Location) { | |
$scope.$on('$ionicView.afterLeave', function(){ | |
console.log("Before leaving clear the compass"); | |
if(positionTimerId) navigator.geolocation.clearWatch(positionTimerId); | |
if(compassTimerId) navigator.compass.clearWatch(compassTimerId); | |
}); | |
$scope.location = Location.get(); | |
console.log($scope.location); |
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
.factory('Location', function() { | |
var position = { | |
lat: '', | |
lng: '' | |
}; | |
var get = function(){ | |
return position; | |
} |
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
#Install Dependencies | |
$ apt-get install python-scipy | |
$ apt-get install python-pip | |
$ pip install moviepy | |
$ pip install python-dotenv | |
$ pip install futures | |
$ pip install boto | |
$ pip install --allow-external mysql-connector-python mysql-connector-python | |
#Install forever |