Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
nyx
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
3
Snippets
Groups
Projects
Show more breadcrumbs
nyx-space
nyx
Commits
e180262d
There was an error fetching the commit references. Please try again later.
Commit
e180262d
authored
3 years ago
by
Christopher Rabotin
Browse files
Options
Downloads
Plain Diff
Merge branch '206-compare-nyx-eclipse-model-to-bsk' into 'master'
One minus fraction slightly decreases SRP error Closes
#206
See merge request
!126
parents
2fea8cf4
5e76f593
No related branches found
No related tags found
1 merge request
!126
One minus fraction slightly decreases SRP error
Pipeline
#315843829
passed
3 years ago
Stage: test
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/celestia/eclipse.rs
+3
-2
3 additions, 2 deletions
src/celestia/eclipse.rs
tests/mission_design/force_models.rs
+4
-4
4 additions, 4 deletions
tests/mission_design/force_models.rs
with
7 additions
and
6 deletions
src/celestia/eclipse.rs
+
3
−
2
View file @
e180262d
...
...
@@ -16,9 +16,10 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
pub
use
super
::{
Cosm
,
Frame
,
LTCorr
,
Orbit
,
Spacecraft
};
pub
use
super
::{
Bodies
,
Cosm
,
Frame
,
LTCorr
,
Orbit
,
Spacecraft
};
use
crate
::
md
::
EventEvaluator
;
use
crate
::
time
::{
Duration
,
TimeUnit
};
use
crate
::
TimeTagged
;
use
std
::
cmp
::{
Eq
,
Ord
,
Ordering
,
PartialOrd
};
use
std
::
fmt
;
use
std
::
sync
::
Arc
;
...
...
@@ -335,7 +336,7 @@ pub fn eclipse_state(
// Compute the nominal area of the light source
let
nominal_area
=
std
::
f64
::
consts
::
PI
*
r_ls_prime
.powi
(
2
);
// And return the percentage (between 0 and 1) of the eclipse.
EclipseState
::
Penumbra
(
(
nominal_area
-
shadow_area
)
/
nominal_area
)
EclipseState
::
Penumbra
(
1.0
-
shadow_area
/
nominal_area
)
}
else
{
// Annular eclipse.
// If r_eb_prime is very small, then the fraction is very small: however, we note a penumbra close to 1.0 as near full light source visibility, so let's subtract one from this.
...
...
This diff is collapsed.
Click to expand it.
tests/mission_design/force_models.rs
+
4
−
4
View file @
e180262d
...
...
@@ -48,7 +48,7 @@ fn srp_earth_full_vis() {
let
(
err_r
,
err_v
)
=
rss_orbit_vec_errors
(
&
final_state
.orbit
.to_cartesian_vec
(),
&
rslt
);
println!
(
"Error accumulated in full sunlight over {} : {:.
3
} m
\t
{:.
3
} m/s"
,
"Error accumulated in full sunlight over {} : {:.
6
} m
\t
{:.
6
} m/s"
,
prop_time
,
err_r
*
1e3
,
err_v
*
1e3
...
...
@@ -58,7 +58,7 @@ fn srp_earth_full_vis() {
}
#[test]
fn
srp_earth_
penumbra
()
{
fn
srp_earth_
leo
()
{
let
cosm
=
Cosm
::
de438_gmat
();
let
eme2k
=
cosm
.frame
(
"EME2000"
);
...
...
@@ -98,7 +98,7 @@ fn srp_earth_penumbra() {
let
(
err_r
,
err_v
)
=
rss_orbit_vec_errors
(
&
final_state
.orbit
.to_cartesian_vec
(),
&
rslt
);
println!
(
"Error accumulated in circular equatorial LEO (with penumbras) over {} : {:.
3
} m
\t
{:.
3
} m/s"
,
"Error accumulated in circular equatorial LEO (with penumbras) over {} : {:.
6
} m
\t
{:.
6
} m/s"
,
prop_time
,
err_r
*
1e3
,
err_v
*
1e3
...
...
@@ -148,7 +148,7 @@ fn srp_earth_meo_ecc_inc() {
let
(
err_r
,
err_v
)
=
rss_orbit_vec_errors
(
&
final_state
.orbit
.to_cartesian_vec
(),
&
rslt
);
println!
(
"Error accumulated in ecc+inc MEO (with penumbras) over {} : {:.
3
} m
\t
{:.
3
} m/s"
,
"Error accumulated in ecc+inc MEO (with penumbras) over {} : {:.
6
} m
\t
{:.
6
} m/s"
,
prop_time
,
err_r
*
1e3
,
err_v
*
1e3
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment