Giter Site home page Giter Site logo

edsn's Introduction

edsn

ED:SN - Elite Dangerous: Star Neighbourhood is a set of tools to prepare a 3d map of surroundings of one of million star systems in Elite Dangerous. With 0.2 release the Python script became the main tool. It calls EDSM API to obtain required information and store into a file in a GNUplot data format. Additionally, the script prepares a GNUplot script file ready to run. The GNUplot script taking as an input list of star systems and producing 3D star map.

Examples

Finally, there is an examples in the examples directory. That include the orginal image of Star System in less that 15 Light Years from V1688 Aquilae. Star Systems in distance of 15 Light Years from V1688 Aquilae.

Python

The prepare_data.py takes as an input the name of star system from Elite Dangerous and the radius defining how much space around it to draw on the map. If no arguments are specified the script prepares information for a map of V1688 Aquilae 15 light years neighbourhood. Information are downloaded from the EDSM website and saved into a json cache file (create_cache function). The script uses a main star type as a base for integer representation of the RGB colour matching stars colour (def_color function). It translates stars coordinates by shifting the origin of a coordinate system into the central star (prepare_gnuplot_data function). Finally, it prepares a GNUplot script file to saved into the output datafile (save_script function).

Please note that the list of translated main body types is limited. It can be found in the def_color function.

GNUplot

Each prepare_data.py script run prepares a pair of files.

  • <system_name>-.3d.dat consists of data .
  • <system_name>-.gnuplot is ready to use Gnuplot script.

Script description

The script takes data file name as an input. It's can be changed in the line 18. Graph title is defined in line 14. The radius of circles are controlled by the "radius" variable in line 5 and the number of them is set by a loop in line 16. The are draw by a function in line 17. Circle representing stars systems are added in the line 19. Their black perimeter in the next line and names in line 18 Finally, in the line 21 images is enriched by a doted line connecting 'surface' with a star location.

Input data specification

There are 5 columns in the data file. The first one is the star system name. Columns two, three and four are coordinates with a central star in the origin of axes (0,0,0). The last (fifth) column represent the color of a main star. It is an integer value of a RGB colour number. Colours definition are collected in the star_colours.odg (see below).

Star Colours

Links

  • EDSM REST API used by the python script is defined here.
  • My script uses tricks presented in the Lee Phillips book titled "gnuplot 5".

edsn's People

Contributors

wawrzek avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

edsn's Issues

Add a check for installed modules

termcolor is not standard module

โ””[~/Private/edsn]> ./prepare_data.py
Traceback (most recent call last):
  File "./prepare_data.py", line 7, in <module>
    from termcolor import colored
ModuleNotFoundError: No module named 'termcolor'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.