{"id":15984496,"url":"https://github.com/metcoder95/link_station","last_synced_at":"2025-04-04T20:44:44.255Z","repository":{"id":46165215,"uuid":"424014948","full_name":"metcoder95/link_station","owner":"metcoder95","description":"Find the most suitable link station for a given device","archived":false,"fork":false,"pushed_at":"2021-11-09T23:10:58.000Z","size":103,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T04:47:53.989Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/metcoder95.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-02T22:15:11.000Z","updated_at":"2021-11-09T23:11:01.000Z","dependencies_parsed_at":"2022-09-26T16:22:26.403Z","dependency_job_id":null,"html_url":"https://github.com/metcoder95/link_station","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metcoder95%2Flink_station","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metcoder95%2Flink_station/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metcoder95%2Flink_station/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metcoder95%2Flink_station/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metcoder95","download_url":"https://codeload.github.com/metcoder95/link_station/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247249598,"owners_count":20908211,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-08T02:09:05.695Z","updated_at":"2025-04-04T20:44:44.235Z","avatar_url":"https://github.com/metcoder95.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"link_station\n============\n\nFind the most suitable link station for a given device.\nThis is done by properly calculating the power, and comparing it against\nthe reach of the station.\n\nTo get the power of the signal from the device to the station the following formula is used:\n\n```text\ndistance = sqrt(deviceX - stationX ^ 2 + (deviceY - stationY ^ 2))\npower = distance \u003e reach, power  = 0; power = (reach - distance) ^ 2\n```\n\nIf a correct power is find for the given device is found (power != 0 \u0026\u0026 distance != null), the text\n`Best link station for point {deviceX},{deviceY} is {stationX}{stationY} with power {power}`, otherwise\n`No link station within the reach for point {deviceX},{deviceY}`.\n\n[![Version](https://img.shields.io/npm/v/link_station.svg)](https://npmjs.org/package/link_station)\n[![Downloads/week](https://img.shields.io/npm/dw/link_station.svg)](https://npmjs.org/package/link_station)\n[![License](https://img.shields.io/npm/l/link_station.svg)](https://github.com/MetCoder95/link_station/blob/master/package.json)\n\n\u003c!-- toc --\u003e\n* [Usage](#usage)\n* [Commands](#commands)\n\u003c!-- tocstop --\u003e\n# Usage\n\u003c!-- usage --\u003e\n## Arguments\n- `\u003cdevice\u003e` -\u003e The device coordinates to find the best link station for. Are coordinates separated via coma. e.g. X,Y\n\u003eIf not device provided, a single device from the following options will be randomly picked: [0, 0] [100, 100] [15, 10] [18, 18]\n\ne.g. `link-station 1,2`\n\n## Flags\n- stations - alias: `-s` -\u003e The list of stations to use. Is constituted of three values separated by a comma, Y X R(Reach).\n\u003eIf not station provided, the following stations will be used instead:[0, 0, 10], [20, 20, 5], [10, 0, 12]\n\ne.g. `link-station 1,2 -s 1,2,3 -s 4,5,6 -s 7,8,9`\n### Example\n```sh-session\n$ npm install -g link_station\n$ link_station 1,2 -s 10,12,0 -s 123,0,3\n$ Best link station for point \u003cdeviceX\u003e,\u003cdeviceY\u003e is \u003cstationX\u003e,\u003cstationY\u003e with power \u003cpower\u003e\nlink_station/0.0.0 darwin-arm64 node-v16.4.2\n$ link_station --help [COMMAND]\nUSAGE\n  $ link_station\n...\n```\n\u003c!-- usagestop --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetcoder95%2Flink_station","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetcoder95%2Flink_station","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetcoder95%2Flink_station/lists"}