Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

Commit

Permalink
Updated DateTimeTest and TLETests with millisecond precision (#65)
Browse files Browse the repository at this point in the history
* Updated DateTimeTest and TLETests with millisecond precision

Added millisecond precision to the DateTimeTest.cs and TLETests.cs test case comparisons. Also updated the TargetFramework in IO.Astrodynamics.nuspec and IO.Astrodynamics.csproj from net6.0 to net8.0, and updated the version from 1.8.0 to 1.9.0. These changes are to ensure more accurate timezone conversion and increase compatibility with newer frameworks.

* Add precision parameter to Assert.Equal in TLETests

Updated the unit tests in TLETests.cs to include a precision parameter in the Assert.Equal method. This helps to avoid test failure due to floating point precision issues, specifically where minor differences in calculated orbital parameters could cause an otherwise valid test to fail.
  • Loading branch information
sylvain-guillet authored Nov 22, 2023
1 parent 5d1c488 commit 8d5e3ed
Show file tree
Hide file tree
Showing 14 changed files with 172 additions and 185 deletions.
127 changes: 59 additions & 68 deletions IO.Astrodynamics.Tests/APITest.cs

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions IO.Astrodynamics.Tests/Body/CelestialBodyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ public void FindOccultationsEclipse()
ShapeType.Ellipsoid, moon, ShapeType.Ellipsoid, OccultationType.Any, Aberration.None, TimeSpan.FromMinutes(1.0)).ToArray();
Assert.Single(res);

Assert.Equal(new DateTime(2001, 12, 14, 20, 10, 50, 573), res[0].StartDate);
Assert.Equal(new DateTime(2001, 12, 14, 21, 36, 33, 019), res[0].EndDate);
Assert.Equal(new DateTime(2001, 12, 14, 20, 10, 50, 573), res[0].StartDate, TimeSpan.FromMilliseconds(1));
Assert.Equal(new DateTime(2001, 12, 14, 21, 36, 33, 019), res[0].EndDate, TimeSpan.FromMilliseconds(1));
}

[Fact]
Expand All @@ -97,10 +97,10 @@ public void FindWindowsOnDistanceConstraint()
TestHelpers.MoonAtJ2000, RelationnalOperator.Greater, 400000000, Aberration.None, TimeSpan.FromSeconds(86400.0));
var windows = res as Window[] ?? res.ToArray();
Assert.Equal(4, windows.Count());
Assert.Equal("2007-01-08T00:11:07.6290000 (TDB)", windows.ElementAt(0).StartDate.ToFormattedString());
Assert.Equal("2007-01-13T06:37:47.9480000 (TDB)", windows.ElementAt(0).EndDate.ToFormattedString());
Assert.Equal("2007-02-04T07:02:35.2840000 (TDB)", windows.ElementAt(1).StartDate.ToFormattedString());
Assert.Equal("2007-02-10T09:31:01.8380000 (TDB)", windows.ElementAt(1).EndDate.ToFormattedString());
Assert.Equal("2007-01-08T00:11:07.6285910 (TDB)", windows.ElementAt(0).StartDate.ToFormattedString());
Assert.Equal("2007-01-13T06:37:47.9481440 (TDB)", windows.ElementAt(0).EndDate.ToFormattedString());
Assert.Equal("2007-02-04T07:02:35.2843758 (TDB)", windows.ElementAt(1).StartDate.ToFormattedString());
Assert.Equal("2007-02-10T09:31:01.8379404 (TDB)", windows.ElementAt(1).EndDate.ToFormattedString());
}

[Fact]
Expand All @@ -112,9 +112,9 @@ public void FindWindowsOnCoordinateConstraint()

var windows = res as Window[] ?? res.ToArray();
Assert.Equal(2, windows.Length);
Assert.Equal("2005-10-03T17:24:29.0990000 (TDB)", windows[0].StartDate.ToFormattedString());
Assert.Equal("2005-10-16T17:50:20.7050000 (TDB)", windows[0].EndDate.ToFormattedString());
Assert.Equal("2005-10-31T00:27:02.6710000 (TDB)", windows[1].StartDate.ToFormattedString());
Assert.Equal("2005-10-03T17:24:29.0992341 (TDB)", windows[0].StartDate.ToFormattedString());
Assert.Equal("2005-10-16T17:50:20.7049530 (TDB)", windows[0].EndDate.ToFormattedString());
Assert.Equal("2005-10-31T00:27:02.6705884 (TDB)", windows[1].StartDate.ToFormattedString());
Assert.Equal("2005-11-03T00:00:00.0000000 (TDB)", windows[1].EndDate.ToFormattedString());
}

Expand Down
4 changes: 2 additions & 2 deletions IO.Astrodynamics.Tests/Body/InstrumentTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ public void FindWindowInFieldOfView()
//Read results
Assert.Equal(2, res.Count());
Assert.Equal("2021-06-10T00:00:00.0000000 (TDB)", res.ElementAt(0).StartDate.ToFormattedString());
Assert.Equal("2021-06-10T00:29:05.3690000 (TDB)", res.ElementAt(0).EndDate.ToFormattedString());
Assert.Equal("2021-06-10T01:03:45.4720000 (TDB)", res.ElementAt(1).StartDate.ToFormattedString());
Assert.Equal("2021-06-10T00:29:05.3691494 (TDB)", res.ElementAt(0).EndDate.ToFormattedString());
Assert.Equal("2021-06-10T01:03:45.4719345 (TDB)", res.ElementAt(1).StartDate.ToFormattedString());
Assert.Equal("2021-06-10T01:47:27.0000000 (TDB)", res.ElementAt(1).EndDate.ToFormattedString());

Assert.Throws<ArgumentNullException>(() => spacecraft.Intruments.First().FindWindowsInFieldOfViewConstraint(
Expand Down
11 changes: 6 additions & 5 deletions IO.Astrodynamics.Tests/IO.Astrodynamics.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>disable</Nullable>

<IsPackable>false</IsPackable>

<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.2">
<PackageReference Include="coverlet.collector" Version="6.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
24 changes: 12 additions & 12 deletions IO.Astrodynamics.Tests/Maneuvers/LaunchTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,16 @@ public void FindLaunchWindows()
var launchWindows = res as LaunchWindow[] ?? res.ToArray();
Assert.Equal(2, launchWindows.Count());
var firstWindow = launchWindows.ElementAt(0);
Assert.Equal(Convert.ToDateTime("2021-06-02T02:51:10.7080000"), firstWindow.Window.StartDate);
Assert.Equal(Convert.ToDateTime("2021-06-02T02:51:10.7080000"), firstWindow.Window.EndDate);
Assert.Equal(Convert.ToDateTime("2021-06-02T02:51:10.7077003"), firstWindow.Window.StartDate);
Assert.Equal(Convert.ToDateTime("2021-06-02T02:51:10.7077003"), firstWindow.Window.EndDate);
Assert.Equal(135.195514, firstWindow.InertialAzimuth * IO.Astrodynamics.Constants.Rad2Deg, 6);
Assert.Equal(137.447953, firstWindow.NonInertialAzimuth * IO.Astrodynamics.Constants.Rad2Deg, 6);
Assert.Equal(7667.02685, firstWindow.InertialInsertionVelocity, 6);
Assert.Equal(7384.478859, firstWindow.NonInertialInsertionVelocity, 6);

var secondWindow = launchWindows.ElementAt(1);
Assert.Equal(Convert.ToDateTime("2021-06-02T18:11:30.8360000"), secondWindow.Window.StartDate);
Assert.Equal(Convert.ToDateTime("2021-06-02T18:11:30.8360000"), secondWindow.Window.EndDate);
Assert.Equal(Convert.ToDateTime("2021-06-02T18:11:30.8362882"), secondWindow.Window.StartDate);
Assert.Equal(Convert.ToDateTime("2021-06-02T18:11:30.8362882"), secondWindow.Window.EndDate);
Assert.Equal(44.804486, secondWindow.InertialAzimuth * IO.Astrodynamics.Constants.Rad2Deg, 6);
Assert.Equal(42.552047, secondWindow.NonInertialAzimuth * IO.Astrodynamics.Constants.Rad2Deg, 6);
Assert.Equal(7667.02685, secondWindow.InertialInsertionVelocity, 6);
Expand All @@ -96,8 +96,8 @@ public void FindLaunchWindowsByDay()
var res = launch.FindLaunchWindows(new Window(epoch, TimeSpan.FromDays(1.0)), Constants.OutputPath);
Assert.Single(res);
var firstWindow = res.ElementAt(0);
Assert.Equal(Convert.ToDateTime("2021-06-02T18:10:50.5970000"), firstWindow.Window.StartDate);
Assert.Equal(Convert.ToDateTime("2021-06-02T18:10:50.5970000"), firstWindow.Window.EndDate);
Assert.Equal(Convert.ToDateTime("2021-06-02T18:10:50.5974783"), firstWindow.Window.StartDate);
Assert.Equal(Convert.ToDateTime("2021-06-02T18:10:50.5974783"), firstWindow.Window.EndDate);
Assert.Equal(44.804486, firstWindow.InertialAzimuth * IO.Astrodynamics.Constants.Rad2Deg, 6);
Assert.Equal(42.552047, firstWindow.NonInertialAzimuth * IO.Astrodynamics.Constants.Rad2Deg, 6);
Assert.Equal(7667.02685, firstWindow.InertialInsertionVelocity, 6);
Expand All @@ -121,8 +121,8 @@ public void FindSouthLaunchWindowsByDay()
var res = launch.FindLaunchWindows(new Window(epoch, TimeSpan.FromDays(1.0)), Constants.OutputPath);
Assert.Single(res);
var firstWindow = res.ElementAt(0);
Assert.Equal(Convert.ToDateTime("2021-06-02T15:09:47.4760000"), firstWindow.Window.StartDate);
Assert.Equal(Convert.ToDateTime("2021-06-02T15:09:47.4760000"), firstWindow.Window.EndDate);
Assert.Equal(Convert.ToDateTime("2021-06-02T15:09:47.4760643"), firstWindow.Window.StartDate);
Assert.Equal(Convert.ToDateTime("2021-06-02T15:09:47.4760643"), firstWindow.Window.EndDate);
Assert.Equal(55.142078, firstWindow.InertialAzimuth * IO.Astrodynamics.Constants.Rad2Deg, 6);
Assert.Equal(53.582359, firstWindow.NonInertialAzimuth * IO.Astrodynamics.Constants.Rad2Deg, 6);
Assert.Equal(7667.02685, firstWindow.InertialInsertionVelocity, 6);
Expand All @@ -146,16 +146,16 @@ public void FindSouthLaunchWindows()
var res = launch.FindLaunchWindows(new Window(epoch, TimeSpan.FromDays(1.0)), Constants.OutputPath);
Assert.Equal(2, res.Count());
var firstWindow = res.ElementAt(0);
Assert.Equal(Convert.ToDateTime("2021-06-02T08:55:43.6080000"), firstWindow.Window.StartDate);
Assert.Equal(Convert.ToDateTime("2021-06-02T08:55:43.6080000"), firstWindow.Window.EndDate);
Assert.Equal(Convert.ToDateTime("2021-06-02T08:55:43.6080970"), firstWindow.Window.StartDate);
Assert.Equal(Convert.ToDateTime("2021-06-02T08:55:43.6080970"), firstWindow.Window.EndDate);
Assert.Equal(124.857922, firstWindow.InertialAzimuth * IO.Astrodynamics.Constants.Rad2Deg, 6);
Assert.Equal(126.417641, firstWindow.NonInertialAzimuth * IO.Astrodynamics.Constants.Rad2Deg, 6);
Assert.Equal(7667.02685, firstWindow.InertialInsertionVelocity, 6);
Assert.Equal(7381.311323, firstWindow.NonInertialInsertionVelocity, 6);

var secondWindow = res.ElementAt(1);
Assert.Equal(Convert.ToDateTime("2021-06-02T15:08:24.8030000"), secondWindow.Window.StartDate);
Assert.Equal(Convert.ToDateTime("2021-06-02T15:08:24.8030000"), secondWindow.Window.EndDate);
Assert.Equal(Convert.ToDateTime("2021-06-02T15:08:24.8033092"), secondWindow.Window.StartDate);
Assert.Equal(Convert.ToDateTime("2021-06-02T15:08:24.8033092"), secondWindow.Window.EndDate);
Assert.Equal(55.142078, secondWindow.InertialAzimuth * IO.Astrodynamics.Constants.Rad2Deg, 6);
Assert.Equal(53.582359, secondWindow.NonInertialAzimuth * IO.Astrodynamics.Constants.Rad2Deg, 6);
Assert.Equal(7667.02685, secondWindow.InertialInsertionVelocity, 6);
Expand Down
89 changes: 42 additions & 47 deletions IO.Astrodynamics.Tests/Mission/ScenarioTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,61 +110,56 @@ public void Propagate()

// Read maneuver results
var maneuver = spacecraft.StandbyManeuver;
Assert.Equal("2021-03-04T00:32:49.8180000 (TDB)", maneuver.ManeuverWindow.StartDate.ToFormattedString());
Assert.Equal("2021-03-04T00:32:58.2100000 (TDB)", maneuver.ManeuverWindow.EndDate.ToFormattedString());
Assert.Equal("2021-03-04T00:32:49.8180000 (TDB)", maneuver.ThrustWindow.StartDate.ToFormattedString());
Assert.Equal("2021-03-04T00:32:58.2100000 (TDB)", maneuver.ThrustWindow.EndDate.ToFormattedString());
Assert.Equal(8.392, maneuver.ThrustWindow.Length.TotalSeconds);
Assert.Equal(
new Vector3(-97.07142021113363, 107.83054000114183, -119.89750368038308),
((ImpulseManeuver)maneuver).DeltaV);


Assert.Equal(419.6270875080256, maneuver.FuelBurned);

maneuver = maneuver.NextManeuver;

Assert.Equal("2021-03-04T01:15:39.8410000 (TDB)", maneuver.ManeuverWindow.StartDate.ToFormattedString());
Assert.Equal("2021-03-04T01:16:02.1870000 (TDB)", maneuver.ManeuverWindow.EndDate.ToFormattedString());
Assert.Equal("2021-03-04T01:15:39.8410000 (TDB)", maneuver.ThrustWindow.StartDate.ToFormattedString());
Assert.Equal("2021-03-04T01:16:02.1870000 (TDB)", maneuver.ThrustWindow.EndDate.ToFormattedString());
Assert.Equal(22.346, maneuver.ThrustWindow.Length.TotalSeconds);
Assert.Equal(new Vector3(-462.37361865043476, -165.7923214353268, 234.3316344286659),
((ImpulseManeuver)maneuver).DeltaV);
Assert.Equal(1117.349455081975, maneuver.FuelBurned);

maneuver = maneuver.NextManeuver;

Assert.Equal("2021-03-04T01:16:13.2430000 (TDB)", maneuver.ManeuverWindow.StartDate.ToFormattedString());
Assert.Equal("2021-03-04T04:59:20.7690000 (TDB)", maneuver.ManeuverWindow.EndDate.ToFormattedString());
Assert.Equal("2021-03-04T01:16:13.2430000 (TDB)", maneuver.ThrustWindow.StartDate.ToFormattedString());
Assert.Equal("2021-03-04T01:16:22.7850000 (TDB)", maneuver.ThrustWindow.EndDate.ToFormattedString());
Assert.Equal(9.542, maneuver.ThrustWindow.Length.TotalSeconds);
Assert.Equal(new Vector3(-139.4953930672767, 85.72345306943599, 194.88266433187357),
((ImpulseManeuver)maneuver).DeltaV);
Assert.Equal(477.1217927049922, maneuver.FuelBurned);

maneuver = maneuver.NextManeuver;

Assert.Equal("2021-03-04T05:23:58.7300000 (TDB)", maneuver.ManeuverWindow.StartDate.ToFormattedString());
Assert.Equal("2021-03-04T05:24:07.2980000 (TDB)", maneuver.ManeuverWindow.EndDate.ToFormattedString());
Assert.Equal("2021-03-04T05:23:58.7300000 (TDB)", maneuver.ThrustWindow.StartDate.ToFormattedString());
Assert.Equal("2021-03-04T05:24:07.2980000 (TDB)", maneuver.ThrustWindow.EndDate.ToFormattedString());
Assert.Equal(8.568, maneuver.ThrustWindow.Length.TotalSeconds);
Assert.Equal(new Vector3(134.22725061486776, -81.4515454171397, -183.87034411714475),
((ImpulseManeuver)maneuver).DeltaV);
Assert.Equal(428.43642901863194, maneuver.FuelBurned);
Assert.Equal("2021-03-04T00:32:49.8175394 (TDB)", maneuver.ManeuverWindow.StartDate.ToFormattedString());
Assert.Equal("2021-03-04T00:32:58.2100803 (TDB)", maneuver.ManeuverWindow.EndDate.ToFormattedString());
Assert.Equal("2021-03-04T00:32:49.8175394 (TDB)", maneuver.ThrustWindow.StartDate.ToFormattedString());
Assert.Equal("2021-03-04T00:32:58.2100803 (TDB)", maneuver.ThrustWindow.EndDate.ToFormattedString());
Assert.Equal(8.3925409000000002, maneuver.ThrustWindow.Length.TotalSeconds, 3);
Assert.Equal(new Vector3(-97.0714098295484, 107.8305292474044, -119.8974902969949), ((ImpulseManeuver)maneuver).DeltaV);


Assert.Equal(419.62704377403645, maneuver.FuelBurned);

maneuver = maneuver.NextManeuver;

Assert.Equal("2021-03-04T01:15:39.8402441 (TDB)", maneuver.ManeuverWindow.StartDate.ToFormattedString());
Assert.Equal("2021-03-04T01:16:02.1873755 (TDB)", maneuver.ManeuverWindow.EndDate.ToFormattedString());
Assert.Equal("2021-03-04T01:15:39.8402441 (TDB)", maneuver.ThrustWindow.StartDate.ToFormattedString());
Assert.Equal("2021-03-04T01:16:02.1873755 (TDB)", maneuver.ThrustWindow.EndDate.ToFormattedString());
Assert.Equal(22.347131399999999, maneuver.ThrustWindow.Length.TotalSeconds, 3);
Assert.Equal(new Vector3(-462.3769514474425, -165.79592575424203, 234.3310697732304), ((ImpulseManeuver)maneuver).DeltaV);
Assert.Equal(1117.3565715207112, maneuver.FuelBurned, 3);

maneuver = maneuver.NextManeuver;

Assert.Equal("2021-03-04T01:16:13.2426029 (TDB)", maneuver.ManeuverWindow.StartDate.ToFormattedString());
Assert.Equal("2021-03-04T04:59:20.7658396 (TDB)", maneuver.ManeuverWindow.EndDate.ToFormattedString());
Assert.Equal("2021-03-04T01:16:13.2426029 (TDB)", maneuver.ThrustWindow.StartDate.ToFormattedString());
Assert.Equal("2021-03-04T01:16:22.7850168 (TDB)", maneuver.ThrustWindow.EndDate.ToFormattedString());
Assert.Equal(9.5424138999999997, maneuver.ThrustWindow.Length.TotalSeconds, 3);
Assert.Equal(new Vector3(-139.4951793647351, 85.72332642451474, 194.88236993709975), ((ImpulseManeuver)maneuver).DeltaV);
Assert.Equal(477.12069491886507, maneuver.FuelBurned, 3);

maneuver = maneuver.NextManeuver;

Assert.Equal("2021-03-04T05:23:58.7294586 (TDB)", maneuver.ManeuverWindow.StartDate.ToFormattedString());
Assert.Equal("2021-03-04T05:24:07.2981610 (TDB)", maneuver.ManeuverWindow.EndDate.ToFormattedString());
Assert.Equal("2021-03-04T05:23:58.7294586 (TDB)", maneuver.ThrustWindow.StartDate.ToFormattedString());
Assert.Equal("2021-03-04T05:24:07.2981610 (TDB)", maneuver.ThrustWindow.EndDate.ToFormattedString());
Assert.Equal(8.5687023999999994, maneuver.ThrustWindow.Length.TotalSeconds, 3);
Assert.Equal(new Vector3(134.22795291868337, -81.45016347177679, -183.86968653289438), ((ImpulseManeuver)maneuver).DeltaV);
Assert.Equal(428.43511797710403, maneuver.FuelBurned, 3);

Assert.Equal(scenario.Window, summary.Window);
Assert.Single(summary.SpacecraftSummaries);
var maneuverWindow = summary.SpacecraftSummaries.First().ManeuverWindow;
if (maneuverWindow != null)
{
Assert.Equal(new DateTime(2021, 3, 4, 0, 32, 49, 818, DateTimeKind.Unspecified), maneuverWindow.Value.StartDate);
Assert.Equal(new DateTime(2021, 3, 4, 5, 27, 13, 014, DateTimeKind.Unspecified), maneuverWindow.Value.EndDate);
Assert.Equal(new DateTime(2021, 3, 4, 0, 32, 49, 818, DateTimeKind.Unspecified), maneuverWindow.Value.StartDate, TimeSpan.FromMilliseconds(1));
Assert.Equal(new DateTime(2021, 3, 4, 5, 27, 13, 014, DateTimeKind.Unspecified), maneuverWindow.Value.EndDate, TimeSpan.FromMilliseconds(1));
}

Assert.Equal(2442.5347643136247, summary.SpacecraftSummaries.First().FuelConsumption);
Assert.Equal(2442.5394281907165, summary.SpacecraftSummaries.First().FuelConsumption, 3);
}

[Fact]
Expand Down
18 changes: 9 additions & 9 deletions IO.Astrodynamics.Tests/OrbitalParameters/TLETests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void Create()
Assert.Equal(6.1615568022666061, tle.AscendingNode(), 6);
Assert.Equal(5.6003339639830649, tle.ArgumentOfPeriapsis(), 6);
Assert.Equal(0.68479738531249512, tle.MeanAnomaly(), 6);
Assert.Equal(664419082.848, tle.Epoch.SecondsFromJ2000TDB(), 6);
Assert.Equal(664419082.84759104, tle.Epoch.SecondsFromJ2000TDB(), 6);
Assert.Equal(5.06539394194257e-10, tle.BalisticCoefficient, 6);
Assert.Equal(0.0001027, tle.DragTerm, 6);
Assert.Equal(0.0, tle.SecondDerivativeMeanMotion, 6);
Expand All @@ -52,16 +52,16 @@ public void ToStateVector()
DateTime epoch = DateTimeExtension.CreateTDB(664440682.84760022);
var stateVector = tle.AtEpoch(epoch).ToStateVector();

Assert.Equal(stateVector,tle.ToStateVector(epoch));
Assert.Equal(4363671.582661493, stateVector.Position.X);
Assert.Equal(-3627808.882567273, stateVector.Position.Y);
Assert.Equal(-3747413.757453838, stateVector.Position.Z);
Assert.Equal(5805.8219727938695, stateVector.Velocity.X);
Assert.Equal(2575.7244807830643, stateVector.Velocity.Y);
Assert.Equal(4271.59936530876, stateVector.Velocity.Z);
Assert.Equal(stateVector, tle.ToStateVector(epoch));
Assert.Equal(4363669.261337338, stateVector.Position.X, 3);
Assert.Equal(-3627809.912410662, stateVector.Position.Y, 3);
Assert.Equal(-3747415.4653566754, stateVector.Position.Z, 3);
Assert.Equal(5805.8241824895995, stateVector.Velocity.X, 3);
Assert.Equal(2575.722643716163, stateVector.Velocity.Y, 3);
Assert.Equal(4271.5974622410786, stateVector.Velocity.Z, 3);
Assert.Equal("J2000", stateVector.Frame.Name);
Assert.Equal(399, stateVector.Observer.NaifId);
Assert.Equal(664440682.848, stateVector.Epoch.SecondsFromJ2000TDB());
Assert.Equal(664440682.84760022, stateVector.Epoch.SecondsFromJ2000TDB(),3);
}

[Fact]
Expand Down
Loading

0 comments on commit 8d5e3ed

Please sign in to comment.