Comments (3)
I kinda need the two body dynamics right now, so I'll be creating a branch called issue-5a
which only tackles that. It'll likely require some changes in the propagators, but I'll try to keep these changes as minimal as possible, while also making the use of a Dynamics
trait as simple as possible.
from nyx.
Progress report
Proof of concept works. However, there is a need to do a closure to provide the eom
to derive
of the Propagator. That's kinda ugly, and really should be avoided. So I need to find a nice way to rewrite the following to avoid boilerplate (and arguably confusing) code:
let (t, state) = prop.derive(dyn.time(), dyn.state(), |t_: f64, state_: &Vector6<f64>| {
dyn.eom(t_, state_)
});
dyn.set_state(t, &state);
I'll probably want something like prop.derive_dynamics(dyn);
. I'll have to make sure to avoid circular imports (not sure that's a thing in Rust).
Potential issues to keep in mind
- The
eom
function stores the equations of motion. This might make the code incredibly confusing since so much stuff might happen here. That said, the current structure does allow combination of different dynamics, so that should help. - Since we use a closure, we cannot modify anything at all in the
eom
(i.e. if the engineer usesfn eom(&mut self, ...
instead offn eom(&self, ...
the compiler will refuse to build (because the trait has it as immutable). This means that the stuff like closed loop control might be confusing to handle at first... But in exchange for this potential source of confusion, it forces the equations of motion to be applied strictly for a given state and as such it avoid errors like applying the J2 at one half step later (which was one of my main pitfalls insmd
).
TO-DO:
Even for simply subtask 1, the following need to be done:
-
TwoBody
needs to have an initializer via aCelestialObject
(so that themu
is automatically set). -
CelestialObject
needs to exist, and probably as a trait (not sure). I'll also need to create several objects of the solar system as they are defined in GMAT. - Initial implementation of #7 / Attitude module. This is solely to demonstrate the combination of a spacecraft position and velocity and its attitude. I'll likely use quaternions since they're currently available in
nalgebra
. - Extensive documentation.
from nyx.
Is there a way to simply combine dynamics? For example let my_dyn = TwoBody::from_state_vec::<EARTH>(init_vec) + SRP(init_time)
and automatically have a struct which combines both correctly? There should be a strict check that the Self::StateSize
is correct. To "extend" dynamics, e.g. add angular momentum to some body dynamics, the operator could be &
: let my_dyn = TwoBody::from_state_vec::EARTH>(init_vec) & AngularMom::from_tensor_matrix(&tensor, &omega)
.
I think this would allow the library to be less "scary" at first sight. However, this makes it significantly harder to implement some control function which varies with time (such as including coasting orbits, thrusting with different efficiencies determined by some genetic algorithm, etc.).
from nyx.
Related Issues (20)
- Measure performance in Github workflow
- Fix MacOS Python build HOT 1
- (Python) SpacecraftDynamics can only be loaded from file HOT 4
- Python API to expose SNC and max step configuration in orbit determination HOT 1
- Revamp tracking config / schedule
- Two way range and doppler measurements with different senders and receivers
- frame_find_path_for_orientation seems broken HOT 2
- Replace rstats
- Trajectory search to use argmin
- Old GitLab repo listed in `Cargo.toml` file
- Reenable WASM HOT 2
- Units issue in drag equations HOT 3
- Fix hifitime-v4 core dependency HOT 2
- Refactor Nyx in Python HOT 1
- Nyx shall switch to the principal axes frame of the Moon for harmonics computations
- Post ANISE merge cleanup
- Albedo radiation pressure modeling
- High fidelity drag modeling HOT 3
- Examples / howtos
- Support estimation of ground station biases HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nyx.