#equation-solver #problem #variables #solving #mechanics #built #orbital

s5

Simple equation solver written in Rust, built for solving some homework-style problems in orbital mechanics

1 unstable release

0.1.0 Nov 10, 2019

#1037 in Math

MIT license

52KB
1K SLoC

Build Status

Super Slick Simple Substitution Solver (S5)

S5 is a simple equation solver written in Rust for the purpose of solving some homework-style problems in orbital mechanics. It can be used for any system of equations though (not necessarily modelling orbital mechanics).

How it works

It works by taking all known variables, finding an equation with exactly one unknown variable, solving for it in terms of the knowns, and finally calculating the solution (hence the term "substitution" in the name).

Organization

This repo is a Rust workspace comprising of two crates:

  • s5 - the solver library
  • problems - a crate using s5 as a dependency to solve problems in the text Fundamentals of Astrodynamics.

The s3 crate is what your project would use; problems is just an example crate and is not required to use S5.

Installation

The solver is distributed as a Rust library and can be added to any Rust project by adding this to Cargo.toml:

s5 = "0.1.0"

Usage

Please see the docs here

Contributing

There are three ways of contributing to S5:

  1. Improving the solver itself (look for TODOs)
  2. Improving documentation
  3. Completing the problems crate (intends to solve all problems in Fundamentals of Astrodynamics using S5)

License

MIT. Refer to LICENSE.txt.


lib.rs:

A very basic equation s5 for physics problems.

This crate implements a s5 that consumes a set of equations modelling some system plus known variable values and deduces values for as many other system variables as possible. See solver_state for API usage and the problems crate for example usage for solving problems from the text book Fundamentals of Astrodynamics.

Organization

The modules constants, variables and formulas contain the types used for constructing the equations that model your physics system, as well as providing known values for your problem variables. See formulas for examples on building formulas.

The solver_state module implements the s5 itself.

No runtime deps