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
| function getTrilateration(position1, position2, position3) { | |
| var xa = position1.x; | |
| var ya = position1.y; | |
| var xb = position2.x; | |
| var yb = position2.y; | |
| var xc = position3.x; | |
| var yc = position3.y; | |
| var ra = position1.distance; | |
| var rb = position2.distance; | |
| var rc = position3.distance; |
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
| // Created by Derrick Cohodas (dav-) | |
| // Based on the Python example by StackExchange user wwnick from http://gis.stackexchange.com/a/415/41129 | |
| // Requires the Mathjs library - http://mathjs.org/ | |
| var math = require('mathjs') | |
| /** | |
| * Represents a coordinate with a distance | |
| * @param {Number} lat Latitude |
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
| 1. Visit https://awslabs1.awsapps.com/start/ | |
| 2. Log in with your username and password | |
| 3. Your AMB network should already be created with the following settings: | |
| NetworkName acme | |
| NetworkDescription ACME consortium blockchain | |
| Edition STARTER | |
| FirstMemberName ACME1stMember | |
| FirstMemberDescription The first member in the ACME consortium | |
| FirstMemberAdminUsername acme1admin |
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
| <div id="consolelog" style="font-family: 'Courier New', Courier, monospace; font-size: 12px; margin: 40px 30px 0px; background-color: white; border: 2px solid black; padding: 10px;"></div> | |
| <input type="text" id="consoleinput" style="margin: 0px 30px; width: 400px;" onkeypress="return evalConsoleInput(event, this.value);" /> | |
| <script type="text/javascript"> | |
| var appendConsole = function(message, type) { | |
| var color = "black"; | |
| if (type === "error") { | |
| color = "red"; | |
| } else if (type === "debug") { |