Coder Social home page Coder Social logo

razican / space-settler-bigbang Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 1.14 MB

Big Bang for Space Settler, developed in Rust

Home Page: https://github.com/Razican/Space-Settler

License: BSD 3-Clause "New" or "Revised" License

Rust 98.59% Shell 1.41%

space-settler-bigbang's People

Contributors

razican avatar

Stargazers

 avatar

Watchers

 avatar  avatar

space-settler-bigbang's Issues

Multi-threaded galaxy creation

Since each star does not depend on the others, galaxy creation can be made in chunks, so that we use better multiple cores.

Testing

We must add unit testing and test coverages.

This is the list of needed tests:

  • Star creation:
    • Star getters
    • new() function (star and galaxy ids)
    • Class by class property correctness (with 10,000 examples of each)
      • Black hole
      • Neutron star
      • Quark star
      • White dwarf
      • Class O
      • Class B
      • Class A
      • Class F
      • Class G
      • Class K
      • Class M
    • Volume calculation
    • Density calculation
    • Luminosity calculation
    • Number of bodies calculation
    • Titius Bode calculation
  • Planet creation:
    • Planet getters
    • Orbit getters
    • Atmosphere getters
    • new() function (check star is being correctly passed)
    • Orbit period calculation
    • Rotation generation
    • Day length calculation
    • Apoapsis and periapsis calculations
    • Planet type by type creation correctness (with 10,000 examples of each)
    • Volume calculation
    • Density calculation
  • Utilities:
    • Degree to radian function
    • Radian to degree function
  • Constants

In some cases minimum temperature > maximum

It seems that in some cases the minimum temperature of a planet is higher than the maximum. An example here:

Created a new Planet:
    Star ID: 1
    Position in solar system: 4
    Planet type: rocky
    Bond albedo: 49.915736605348116%
    Geometric albedo: 51.11955714707308%
    Mass: 7.5398321632386125 M⊕
    Radius: 1.5524903506194163 R⊕
    Density: 11110.329917387337 kg/m³
    Minimum temperature: 695.1063716662267°C
    Average temperature: 691.6046330967672°C
    Maximum temperature: 191.6978480557462°C
    Orbit:
        Semimajor axis: 0.7543787417435925 AU
        Eccentricity: 0.018226849566306547
        Apoapsis: 0.7681286895853725 AU
        Periapsis: 0.7406287939018125 AU
        Orbital period: 2.02345124773945 days
        Day length: 2936.5704584658056 hours
        Axial tilt: 95.97025671732362°
    Atmosphere:
        Pressure: 27706917.10572779 Pa
        Carbon dioxide (CO₂): 83.4160366330642%
        Carbon monoxide (CO): 0.07319329598724224%
        Nitrogen (N₂): 0.8601116865288839%
        Oxygen (O₂): 4.745495130267396%
        Argon (Ar): 9.840939054655031%
        Sulfur dioxide (SO₂): 0.013447713930366962%
        Neon (Ne): 1.04768831241499%
        Methane (CH₄): 0.002501167826922495%
        Helium (He): 0.0000007790992079133665%

Negative temperatures

It seems that some planets get negative temperature (about 1 in 4 millions):

Created a new Planet:
    Star ID: 696508
    Position in solar system: 8
    Planet type: rocky
    Bond albedo: 30.00%
    Geometric albedo: 36.00%
    Mass: 7.177 M⊕
    Radius: 1.389 R⊕
    Density: 14760.88347818895 kg/m³
    Minimum temperature: -277.47°C
    Average temperature: -219.56°C
    Maximum temperature: 777.66°C
    Orbit:
        Semimajor axis: 25.289 AU
        Eccentricity: 0.0097
        Apoapsis: 25.535 AU
        Periapsis: 25.043 AU
        Orbital period: 1.000 days
        Day length: 1136615.499 hours
        Axial tilt: 77.986°
    Atmosphere:
        Pressure: 0.04 Pa
        Carbon dioxide (CO₂): 3.33%
        Carbon monoxide (CO): 0.97%
        Nitrogen (N₂): 80.33%
        Oxygen (O₂): 4.22%
        Argon (Ar): 8.46%
        Sulfur dioxide (SO₂): 0.64%
        Neon (Ne): 1.37%
        Methane (CH₄): 0.35%
        Helium (He): 0.13%

Better documentation

The current documentation is not complete. It should include much more documentation about entity modules and functions.

Use Gaussian distributions

In some cases, multiple ifs try to emulate Gaussian distributions. This should be avoided by using real Gaussian distributions instead.

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.