Struct nyx_space::io::formatter::StateFormatter
source · pub struct StateFormatter {
pub filename: String,
pub headers: Vec<StateHeader>,
/* private fields */
}
Expand description
A formatter for states
Fields§
§filename: String
§headers: Vec<StateHeader>
Implementations§
source§impl StateFormatter
impl StateFormatter
sourcepub fn from_headers(
headers: Vec<&str>,
filename: String,
cosm: Arc<Cosm>
) -> Result<Self, NyxError>
pub fn from_headers( headers: Vec<&str>, filename: String, cosm: Arc<Cosm> ) -> Result<Self, NyxError>
extern crate nyx_space as nyx;
use nyx::io::formatter::StateFormatter;
use nyx::cosmic::Cosm;
let cosm = Cosm::de438();
// In this case, we're initializing the formatter to output the AoL and the eccentric anomaly in the EME2000 frame.
let hdrs = vec!["AoL", "ea:eme2000"];
StateFormatter::from_headers(hdrs, "nope".to_string(), cosm);
sourcepub fn default(filename: String, cosm: Arc<Cosm>) -> Self
pub fn default(filename: String, cosm: Arc<Cosm>) -> Self
Default headers are [Epoch (GregorianTai), X, Y, Z, VX, VY, VZ], where position is in km and velocity in km/s.
pub fn fmt(&self, orbit: &Orbit) -> Vec<String> ⓘ
Trait Implementations§
source§impl Clone for StateFormatter
impl Clone for StateFormatter
source§fn clone(&self) -> StateFormatter
fn clone(&self) -> StateFormatter
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for StateFormatter
impl Send for StateFormatter
impl Sync for StateFormatter
impl Unpin for StateFormatter
impl !UnwindSafe for StateFormatter
Blanket Implementations§
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.