Skip to content

Commit

Permalink
Remove observer from Illumination
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvain-guillet committed Oct 11, 2024
1 parent 1526b75 commit 88f9da1
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<FileVersion>0.0.1</FileVersion>
<PackAsTool>true</PackAsTool>
<ToolCommandName>astro</ToolCommandName>
<Version>0.6.1</Version>
<Version>0.6.2</Version>
<Title>Astrodynamics command line interface</Title>
<Authors>Sylvain Guillet</Authors>
<Description>This CLI allows end user to exploit IO.Astrodynamics framework </Description>
Expand Down
2 changes: 1 addition & 1 deletion IO.Astrodynamics.Net/IO.Astrodynamics.Tests/APITest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void ExecuteLaunchScenario()
new Vector3(-3708.6305608890916, 4266.2914313011433, 6736.8538488755494), TestHelpers.EarthAtJ2000,
start, Frames.Frame.ICRF);

var sunset_rise = launchSite.FindWindowsOnIlluminationConstraint(window, TestHelpers.Sun, IlluminationAngle.Incidence, RelationnalOperator.Lower,
var sunset_rise = launchSite.FindWindowsOnIlluminationConstraint(window, IlluminationAngle.Incidence, RelationnalOperator.Lower,
Astrodynamics.Constants.PI2 - Astrodynamics.Constants.CivilTwilight, 0.0, Aberration.CNS, TimeSpan.FromHours(6.0), TestHelpers.Sun);
//Create launch object
Launch launch = new Launch(launchSite, launchSite, parkingOrbit, IO.Astrodynamics.Constants.CivilTwilight,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ public void FindWindowsOnIlluminationConstraint()
Site site = new Site(13, "DSS-13", TestHelpers.EarthAtJ2000,
new Planetodetic(-116.79445837 * Astrodynamics.Constants.Deg2Rad, 35.24716450 * Astrodynamics.Constants.Deg2Rad, 1070.85059));

var res = site.FindWindowsOnIlluminationConstraint(new Window(TimeSystem.Time.CreateTDB(674524800), TimeSystem.Time.CreateTDB(674611200)), TestHelpers.Sun,
var res = site.FindWindowsOnIlluminationConstraint(new Window(TimeSystem.Time.CreateTDB(674524800), TimeSystem.Time.CreateTDB(674611200)),
IlluminationAngle.Incidence, RelationnalOperator.Lower, System.Math.PI * 0.5 - (-0.8 * IO.Astrodynamics.Constants.Deg2Rad), 0.0, Aberration.LTS,
TimeSpan.FromSeconds(3600), TestHelpers.Sun);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<id>IO.Astrodynamics</id>
<authors>Sylvain Guillet</authors>
<copyright>Sylvain Guillet</copyright>
<version>6.1.1</version>
<version>6.1.2</version>
<title>Astrodynamics framework</title>
<icon>images\dragonfly-dark-trans.png</icon>
<readme>docs\README.md</readme>
Expand Down
8 changes: 4 additions & 4 deletions IO.Astrodynamics.Net/IO.Astrodynamics/Surface/Site.cs
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ public IEnumerable<Window> FindWindowsOnCoordinateConstraint(in Window searchWin
/// <param name="illuminationSource"></param>
/// <param name="method"></param>
/// <returns></returns>
public IEnumerable<Window> FindWindowsOnIlluminationConstraint(in Window searchWindow, ILocalizable observer, IlluminationAngle illuminationType,
public IEnumerable<Window> FindWindowsOnIlluminationConstraint(in Window searchWindow, IlluminationAngle illuminationType,
RelationnalOperator relationalOperator, double value, double adjustValue, Aberration aberration, in TimeSpan stepSize, ILocalizable illuminationSource,
string method = "Ellipsoid")
{
Expand All @@ -388,13 +388,13 @@ public IEnumerable<Window> FindWindowsOnIlluminationConstraint(in Window searchW
switch (illuminationType)
{
case IlluminationAngle.Phase:
evaluateIllumination = date => IlluminationPhase(date, illuminationSource, observer, aberration);
evaluateIllumination = date => IlluminationPhase(date, illuminationSource, this, aberration);
break;
case IlluminationAngle.Incidence:
evaluateIllumination = date => IlluminationIncidence(date, illuminationSource, aberration);
break;
case IlluminationAngle.Emission:
evaluateIllumination = date => IlluminationEmission(date, observer, aberration);
evaluateIllumination = date => IlluminationEmission(date, this, aberration);
break;
default:
throw new ArgumentOutOfRangeException(nameof(illuminationType), illuminationType, null);
Expand Down Expand Up @@ -483,7 +483,7 @@ public void WriteEphemeris(Window window, FileInfo outputFile)
public IEnumerable<Window> FindDayWindows(in Window searchWindow, double twilight)
{
var sun = Stars.SUN_BODY;
return FindWindowsOnIlluminationConstraint(searchWindow, sun, IlluminationAngle.Incidence, RelationnalOperator.Lower, Constants.PI2 + twilight, 0.0,
return FindWindowsOnIlluminationConstraint(searchWindow, IlluminationAngle.Incidence, RelationnalOperator.Lower, Constants.PI2 + twilight, 0.0,
Aberration.LTS, TimeSpan.FromMinutes(1.0), sun);
}

Expand Down

0 comments on commit 88f9da1

Please sign in to comment.