{"id":17922891,"url":"https://github.com/reknih/gral","last_synced_at":"2025-04-03T08:47:49.739Z","repository":{"id":68361323,"uuid":"209323472","full_name":"reknih/GRAL","owner":"reknih","description":"A tool to approximate locations of wireless sensors in a tree-like network topology with few known locations","archived":false,"fork":false,"pushed_at":"2023-04-14T17:53:30.000Z","size":63,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-08T22:23:11.527Z","etag":null,"topics":["localization","wireless-sensor-networks","wsn"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reknih.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-18T14:03:28.000Z","updated_at":"2020-01-26T20:13:15.000Z","dependencies_parsed_at":"2024-10-28T20:41:19.239Z","dependency_job_id":"9a64ac16-066d-4764-a4d2-845e7785550c","html_url":"https://github.com/reknih/GRAL","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reknih%2FGRAL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reknih%2FGRAL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reknih%2FGRAL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reknih%2FGRAL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reknih","download_url":"https://codeload.github.com/reknih/GRAL/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246970340,"owners_count":20862508,"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":["localization","wireless-sensor-networks","wsn"],"created_at":"2024-10-28T20:41:12.748Z","updated_at":"2025-04-03T08:47:49.694Z","avatar_url":"https://github.com/reknih.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GRAL\n[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n\n\u003e A tool to approximate locations of wireless sensors in a tree-like network topology with few known locations\n\nThis algorithm is suitable for a central batch approximation of the locations of nodes in a sensor network in topologies\nthat can be modeled as graphs with weighted vertices. GRAL stands for graph-based location.\n\n## Install\n\nRun the following command in the cloned GRAL directory.\n```\nmvn clean install\n```\nAfter that, you can either add this package to your\ndependencies in your `pom.xml` or run the jar in the target folder.\n\n## Usage\n### As a dependency of your own project\nFirst, you have to model your environment by constructing a `TopologyAnalyzer`. Call `addRelay(id, radius)` on it to\nadd the reference nodes of your environment. Then call `addEdge(start, dest, weight)` on the object with the previously\ndefined relay ids and `weight` as the length of the connecting link in the physical environment.\n\nThen, construct a new `Locator(analyzer, checkpoints, pathRectification)` using the `TopologyAnalyzer` instance.\nThe latter two arguments are boolean option switches:\n- `checkpoints`: Whether two mobile nodes with an encounter should be assigned the same position. Can decrease positional accuracy.\n- `pathRectification`: Places lower bounds on positions of nodes that encounter peers from different original relays.\n   Increases positional accuracy for deployments with many nodes and complex topographies.\n\nFinally call the `feed` member of your `Locator` for each incoming package. It will output those packages with\npositions assigned once they are ready. It may be useful to subclass the `Package` class to contain the sensor values\nthat the nodes in your WSN collect. The `Package` implementation of GRAL contains a useful `toJsonString` method for\noutputting the localized packages to other applications.\n\n### CLI\nThe JAR can also be run directly. It takes one argument and various flags can be set.\nThe first and only mandatory argument specifies a JSON file that defines the graph representing your environment.\nFor example, suppose you want to use GRAL with an environment with a relay 1001 and 1003 that each are on a link to a relay 1002, which,\nin turn is connected to a fourth relay 1004, you would use the following file:\n```json\n[\n  {\"start\": 1001, \"destination\": 1002, \"weight\": 50, \"destinationRadius\": 2.1},\n  {\"start\": 1003, \"destination\": 1002, \"weight\": 70, \"startRadius\": 5.5},\n  {\"start\": 1002, \"destination\": 1004, \"weight\": 50}\n]\n``` \nThe `startRadius` and `destinationRadius` properties set the effective wireless radius of the respective reference node.\nThey only have to be set for the first time the relay is mentioned in the file and can be omitted afterwards. If the value\nis not specified the first time a relay is used, its range radius will default to the square root of ten. All other\nproperties are required.\n\nPlease note that, as of now, relay ids have to be greater than 1000.\n\nThere are `--checkpoints` and `--pathRectification` flags that set the eponymous settings\ndescribed in the previous subsection.\n\nIf the `-f FILE` flag is set, the application will expect to find a `FILE` with one JSON representation of a package per\nline. Example:\n```json\n{ \"deviceId\": 10, \"timestamp\": 50, \"contacts\": [{ \"deviceId\": 11, \"strength\": 0.7 }] }\n```\n\nThe application will parse the file and output any localized packages to standard output.\n\nIf the flag is not present, the application will expect such packages in the command line input and output localized \npackages as they get ready. This is useful as an interactive mode or for piping.\n\n## Background\n\nI build this project for my bachelor's thesis. Its objective is to annotate readings from floating sensors in a \nsewage network with their estimated positions. The network does not contain localization hardware and the sensors rarely\ncontact nodes with fixed known positions.\nTo accomplish a precise approximation contact history with other sensors is taken into account. The solution also\nleverages knowledge about the well-known sewage topology.\n\n## Contributing\n\nFeel free to create a Pull Request!\n\n## License\n\n Apache-2.0 © Martin Haug\n ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freknih%2Fgral","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freknih%2Fgral","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freknih%2Fgral/lists"}