Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikolalysenko/hawaii-navigator
Proof of concept peer to peer navigator for Hawaii
https://github.com/mikolalysenko/hawaii-navigator
gps hawaii ipfs navigation planning router
Last synced: 5 days ago
JSON representation
Proof of concept peer to peer navigator for Hawaii
- Host: GitHub
- URL: https://github.com/mikolalysenko/hawaii-navigator
- Owner: mikolalysenko
- Created: 2017-02-13T01:35:22.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-16T02:47:55.000Z (almost 8 years ago)
- Last Synced: 2024-12-16T22:35:02.845Z (8 days ago)
- Topics: gps, hawaii, ipfs, navigation, planning, router
- Language: JavaScript
- Size: 20.5 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hawaii-navigator
A content addressable index for routing optimized for the Hawaiian archipelago.
## Example
```javascript
// First we initialize the file storage.
var getFile = require('hawaii-navigator/test/http-store')()// Then we create the navigator (need to pass in file reader method)
var nav = require('hawaii-navigator')(getFile)// Search is keyed by place id
var start = 3539645082
var end = 582262220// Use the navigator to get a distance query
nav.distance(start, end, function (err, distance) {
if (err) {
return console.error(err)
}
if (distance < Infinity) {
return console.log('distance from', start, 'to', end, 'is', distance)
} else {
return console.log('no route from', start, 'to', end)
}
})// Now a routing query
nav.route(start, end, function (err, route) {
if (err) {
return console.error(err)
}
return console.log('route:', route)
})
```## Index creation
This is pretty janky right now but to build the index, first start the IPFS daemon:
```
ipfs daemon
```Then run the following command:
```
./run.sh
```You can post the index to IPFS with this command:
```
ipfs add -r hub
```## Credits
(c) 2017 Mikola Lysenko. MIT License