-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wise fov rotation #110
Wise fov rotation #110
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
//! # WISE Fov definitions. | ||
use core::f64; | ||
|
||
use super::{Contains, FovLike, Frame, OnSkyRectangle, SkyPatch, FOV}; | ||
use crate::constants::WISE_WIDTH; | ||
use crate::prelude::*; | ||
|
@@ -42,6 +44,23 @@ impl WiseCmos { | |
scan_id, | ||
} | ||
} | ||
|
||
/// Create a Wise fov from corners | ||
pub fn from_corners( | ||
corners: [Vector3<f64>; 4], | ||
observer: State, | ||
frame_num: u64, | ||
scan_id: Box<str>, | ||
) -> Self { | ||
let patch = OnSkyRectangle::from_corners(corners, observer.frame); | ||
Self { | ||
patch, | ||
observer, | ||
frame_num, | ||
rotation: f64::NAN, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would have like to removed this variable, but backwards compatibility makes this not possible currently. |
||
scan_id, | ||
} | ||
} | ||
} | ||
|
||
impl FovLike for WiseCmos { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -180,7 +180,7 @@ where | |
integrator.metadata, | ||
)); | ||
} | ||
let mut next_step_size: f64 = 1.0_f64.copysign(integrator.final_time - integrator.cur_time); | ||
let mut next_step_size: f64 = 0.1_f64.copysign(integrator.final_time - integrator.cur_time); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This tiny adjustment let to a reduction in 50km discretization noise on propagation near earth. |
||
|
||
let mut step_failures = 0; | ||
loop { | ||
|
@@ -190,7 +190,7 @@ where | |
match integrator.step(next_step_size) { | ||
Ok(s) => { | ||
next_step_size = s; | ||
if integrator.cur_time == integrator.final_time { | ||
if (integrator.cur_time - integrator.final_time).abs() < 1e-12 { | ||
return Ok(( | ||
integrator.cur_state, | ||
integrator.cur_state_der, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keeping the old constructor, but downgrading it from the main constructor to just 'from_pointing'.