ED_LRR/docs/src/ed-lrr.md

93 lines
2.7 KiB
Markdown
Raw Normal View History

2019-08-06 00:50:48 +00:00
---
# Metadata
title: ED_LRR
author:
- Daniel Seiller <earthnuker@gmail.com>
subtitle: 'Elite Dangerous: Long-Range Router'
# Formating
toc: true
lang: en
colorlinks: true
papersize: a4
numbersections: true
#Panflute options
panflute-filters: [multifilter]
panflute-path: 'filters'
#Template options
titlepage: true
toc-own-page: false
---
\pagebreak
# Implementation
2019-08-06 00:50:48 +00:00
## `stars.csv` format
### Columns
2019-08-31 21:43:52 +00:00
| Name | Content |
| --------- | ------------------------------------------------------------ |
| id | unique ID-Number (not equal to id or id64, just a sequential number) |
| star_type | Type of Star |
| system | Name of System |
| body | Name of Star |
2019-08-06 00:50:48 +00:00
| mult | Jump Range Multiplier (1.5 for White Dwarfs, 4.0 for Neutron Stars) |
2019-08-31 21:43:52 +00:00
| distance | Distance from arrival in Ls |
| x,y,z | Position in Galactic Coordinates with Sol at (0,0,0) |
2019-08-06 00:50:48 +00:00
## `stars.idx` format
`bincode` serialized data:
- **[u64]**: List of byte offset for records (entry 0=first recod, entry 1= second record, etc)
2019-08-06 00:50:48 +00:00
## Routing Algorithms
### Breadth-First Search (BFS)
Standard Breadth-First Search, always finds the shortest route
2019-08-06 00:50:48 +00:00
### A*-Search
2019-08-31 21:43:52 +00:00
Modified A*-Search with adjustable "greediness". Priority Queue weighted by $\text{number of jumps from start system} + (\text{estimated number of jumps to target system} * \text{greediness})$
A greediness of 0 is equivalent to BFS and a greediness of $\infty$ is equivalent to Greedy-Search
### Greedy-Search
Priority Queue weighted by minimum distance to target, prefers systems with high multiplier (Neutron Stars and White Dwarfs)
2019-08-06 00:50:48 +00:00
## Optimizations
### Ellipse elimination
Only consider systems within an ellipsoid with source and destination as the foci, the width of the ellipsoid is adjustable
2019-08-06 00:50:48 +00:00
## Routing Graphs
### File format
`bincode` serialized data:
- *bool* **primary**: flag to indicate that graph only includes primary stars
- *f32* **range**: jump range for routing graph
- *[u8]* **file_hash**: sha3 hash of `stars.csv` from which graph was generated
- *String* **path**: path to `stars.csv` from which graph was generated
- *FnvHashMap* **graph**: Hashmap mapping systems to the systems from which they can be rached, traversed from destination system backwards to source to reconstruct route
2019-08-06 00:50:48 +00:00
# Usage
<!--
TODO: Add screenshots
-->
2019-08-06 00:50:48 +00:00
## Preprocessing Data
## Plotting a Route
# [Changelog](https://gitlab.com/Earthnuker/ed_lrr/blob/pyqt_gui/CHANGELOG.md)