93 lines
2.7 KiB
Markdown
93 lines
2.7 KiB
Markdown
---
|
|
# 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
|
|
|
|
## `stars.csv` format
|
|
|
|
### Columns
|
|
|
|
| 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 |
|
|
| mult | Jump Range Multiplier (1.5 for White Dwarfs, 4.0 for Neutron Stars) |
|
|
| distance | Distance from arrival in Ls |
|
|
| x,y,z | Position in Galactic Coordinates with Sol at (0,0,0) |
|
|
|
|
## `stars.idx` format
|
|
|
|
`bincode` serialized data:
|
|
|
|
- **[u64]**: List of byte offset for records (entry 0=first recod, entry 1= second record, etc)
|
|
|
|
## Routing Algorithms
|
|
|
|
### Breadth-First Search (BFS)
|
|
|
|
Standard Breadth-First Search, always finds the shortest route
|
|
|
|
### A*-Search
|
|
|
|
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)
|
|
|
|
## Optimizations
|
|
|
|
### Ellipse elimination
|
|
|
|
Only consider systems within an ellipsoid with source and destination as the foci, the width of the ellipsoid is adjustable
|
|
|
|
## 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
|
|
|
|
# Usage
|
|
|
|
<!--
|
|
TODO: Add screenshots
|
|
-->
|
|
|
|
## Preprocessing Data
|
|
|
|
## Plotting a Route
|
|
|
|
# [Changelog](https://gitlab.com/Earthnuker/ed_lrr/blob/pyqt_gui/CHANGELOG.md)
|