docs: Rename doc
folder to docs
, update outline
This commit is contained in:
parent
45570161d4
commit
fb54bdaf0c
5 changed files with 2 additions and 0 deletions
60
docs/src/ed-lrr.md
Normal file
60
docs/src/ed-lrr.md
Normal file
|
@ -0,0 +1,60 @@
|
|||
---
|
||||
# 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
|
||||
---
|
||||
|
||||
# How it works
|
||||
|
||||
## `stars.csv` format
|
||||
|
||||
### Columns
|
||||
|
||||
| Name | Content |
|
||||
| --------- | ------------------------------------------------------------------- |
|
||||
| id | unique ID-Number (not to be confused with EDSM id or id64) |
|
||||
| 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
|
||||
|
||||
## Routing Algorithms
|
||||
|
||||
### Breadth-First Search (BFS)
|
||||
|
||||
### A*-Search
|
||||
|
||||
### Greedy Search
|
||||
|
||||
## Optimizations
|
||||
|
||||
## Routing Graphs
|
||||
|
||||
# Usage
|
||||
|
||||
## Preprocessing Data
|
||||
|
||||
## Plotting a Route
|
||||
|
||||
# [Changelog](https://gitlab.com/Earthnuker/ed_lrr/blob/pyqt_gui/CHANGELOG.md)
|
64
docs/src/img_out.py
Normal file
64
docs/src/img_out.py
Normal file
|
@ -0,0 +1,64 @@
|
|||
import sys
|
||||
import pylab as PL
|
||||
import numpy as np
|
||||
from scipy.spatial.ckdtree import cKDTree
|
||||
import heapq
|
||||
|
||||
exit()
|
||||
|
||||
|
||||
def vec(a, b):
|
||||
return b - a
|
||||
|
||||
|
||||
def bfs(points):
|
||||
return
|
||||
|
||||
|
||||
def in_ellipse(p, f1, f2, r, offset=0):
|
||||
df = ((f1 - f2) ** 2).sum(0) ** 0.5
|
||||
d_f1 = ((p - f1) ** 2).sum(1) ** 0.5
|
||||
d_f2 = ((p - f2) ** 2).sum(1) ** 0.5
|
||||
return (d_f1 + d_f2) < (df * (1 + r))
|
||||
|
||||
|
||||
num_points = 100000
|
||||
|
||||
p_orig = np.random.normal(0, 10, size=(num_points, 2))
|
||||
tree = cKDTree(p_orig)
|
||||
f1 = np.array([0, -30])
|
||||
f2 = -f1 # np.random.normal(0, 20, (3,))
|
||||
# r = 2 ** ((n / cnt) - cnt)
|
||||
|
||||
mask = in_ellipse(p_orig, f1, f2, 0.1)
|
||||
|
||||
p = p_orig[mask]
|
||||
p_orig = p_orig[~mask]
|
||||
|
||||
colors = np.random.random(p.shape[0])
|
||||
fig = PL.gcf()
|
||||
PL.scatter(
|
||||
p_orig[:, 0],
|
||||
p_orig[:, 1],
|
||||
marker=".",
|
||||
s=0.2,
|
||||
edgecolor="None",
|
||||
c=[(0.0, 0.0, 0.0)],
|
||||
alpha=0.75,
|
||||
rasterized=True,
|
||||
)
|
||||
PL.scatter(
|
||||
p[:, 0], p[:, 1], marker="s", s=0.2, edgecolor="None", c=colors, rasterized=True
|
||||
)
|
||||
PL.plot(f1[0], f1[1], "r.", label="Source")
|
||||
PL.plot(f2[0], f2[1], "g.", label="Destination")
|
||||
|
||||
max_v = max(p_orig[:, 0].max(), p_orig[:, 1].max(), f1[0], f1[1], f2[0], f2[1]) + 2
|
||||
min_v = min(p_orig[:, 0].min(), p_orig[:, 1].min(), f1[0], f1[1], f2[0], f2[1]) - 2
|
||||
|
||||
|
||||
PL.xlim(min_v, max_v)
|
||||
PL.ylim(min_v, max_v)
|
||||
|
||||
PL.legend()
|
||||
PL.savefig(sys.argv[1], dpi=1200)
|
Loading…
Add table
Add a link
Reference in a new issue