Struct SpaceNavigationSystem

Source
pub struct SpaceNavigationSystem<T: AstronomicalDataProvider> {
    pub planner: NavigationPlanner<T>,
    pub data_provider: Arc<T>,
}
Expand description

Navigation system for interplanetary travel calculations

Fields§

§planner: NavigationPlanner<T>§data_provider: Arc<T>

Implementations§

Source§

impl<T: AstronomicalDataProvider> SpaceNavigationSystem<T>

Source

pub fn new(data_provider: T) -> Self

Create a new space navigation system with the given data provider

Source

pub fn set_position_local( &mut self, container_name: &str, local_x: f64, local_y: f64, local_z: f64, )

Set current position using local coordinates relative to an object container

Source

pub fn update_position(&mut self, x: f64, y: f64, z: f64)

Update position with absolute coordinates

Source

pub fn plan_navigation(&self, destination_name: &str) -> Option<NavigationPlan>

Plan navigation to a destination

Source

pub fn format_navigation_instructions(&self, plan: &NavigationPlan) -> String

Format navigation plan as human-readable instructions

Source

pub fn find_nearby_pois(&self, limit: usize) -> Vec<NamedDistance>

Find nearby points of interest

Source

pub fn plan_navigation_to_coordinates( &self, container_name: Option<&str>, pos_x: f64, pos_y: f64, pos_z: f64, system_name: Option<&str>, ) -> Option<NavigationPlan>

Plan navigation to specific coordinates, either global or relative to a container

Source

pub fn get_current_solar_system(&self, plan: Option<&NavigationPlan>) -> System

Determine current solar system

Source

pub fn get_current_position(&self) -> Option<Vector3>

Get the current position if available

Source

pub fn get_current_object_container(&self) -> Option<ObjectContainer>

Get the current object container (planet/moon/station) if available

Source

pub fn find_nearby_pois_in_radius(&self, radius: f64) -> Vec<NamedDistance>

Find nearby points of interest within a specific radius

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.