pub struct ICRSPosition { /* private fields */ }Implementations§
Source§impl ICRSPosition
impl ICRSPosition
pub fn new(ra: Angle, dec: Angle) -> CoordResult<Self>
pub fn with_distance( ra: Angle, dec: Angle, distance: Distance, ) -> CoordResult<Self>
pub fn from_degrees(ra_deg: f64, dec_deg: f64) -> CoordResult<Self>
pub fn from_degrees_with_distance( ra_deg: f64, dec_deg: f64, distance: Distance, ) -> CoordResult<Self>
pub fn from_hours_degrees(ra_hours: f64, dec_deg: f64) -> CoordResult<Self>
pub fn ra(&self) -> Angle
pub fn dec(&self) -> Angle
pub fn distance(&self) -> Option<Distance>
pub fn set_distance(&mut self, distance: Distance)
pub fn remove_distance(&mut self)
pub fn unit_vector(&self) -> Vector3
pub fn position_vector(&self) -> CoordResult<Vector3>
pub fn from_unit_vector(unit: Vector3) -> CoordResult<Self>
pub fn from_position_vector(pos: Vector3) -> CoordResult<Self>
pub fn angular_separation(&self, other: &Self) -> Angle
pub fn is_near_pole(&self) -> bool
Sourcepub fn position_uncertainty_arcsec(
&self,
parallax_error_mas: f64,
) -> Option<f64>
pub fn position_uncertainty_arcsec( &self, parallax_error_mas: f64, ) -> Option<f64>
Calculate angular position uncertainty from parallax measurement error.
This method simply converts parallax error to angular uncertainty (they have the same magnitude). The stored distance value is not used in the calculation - distance is only checked for presence to ensure this is a parallax-derived position.
Important: This returns the angular uncertainty on the sky, not the linear distance uncertainty. For distance uncertainty in physical units (parsecs, AU, etc.), calculate separately using error propagation: Δd = d² × Δπ (where π is parallax).
§Arguments
parallax_error_mas- Parallax measurement error in milliarcseconds
§Returns
Angular position uncertainty in arcseconds, or None if no distance is set
§Example
// Gaia DR3 typical parallax error: 0.02 mas → 0.00002 arcsec angular uncertainty
let uncertainty = pos.position_uncertainty_arcsec(0.02);Sourcepub fn distance_uncertainty_parsecs(
&self,
parallax_error_mas: f64,
) -> Option<f64>
pub fn distance_uncertainty_parsecs( &self, parallax_error_mas: f64, ) -> Option<f64>
Calculate physical distance uncertainty from parallax measurement error
For a star at distance d with parallax π ± σ_π:
- Fractional distance error: σ_d/d = σ_π/π
- Absolute distance error: σ_d = d × (σ_π/π)
§Arguments
parallax_error_mas- Parallax measurement error in milliarcseconds
§Returns
Distance uncertainty in parsecs, or None if no distance is set
Source§impl ICRSPosition
impl ICRSPosition
pub fn to_galactic(&self, epoch: &TT) -> CoordResult<GalacticPosition>
pub fn to_ecliptic(&self, epoch: &TT) -> CoordResult<EclipticPosition>
Trait Implementations§
Source§impl Clone for ICRSPosition
impl Clone for ICRSPosition
Source§fn clone(&self) -> ICRSPosition
fn clone(&self) -> ICRSPosition
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more