Skip to content

Commit a851405

Browse files
author
reed
committed
fixed error in Date Calculation
1 parent e713a27 commit a851405

File tree

7 files changed

+7
-26
lines changed

7 files changed

+7
-26
lines changed

.vs/One_Sgp4/v15/.suo

2 KB
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.

OneSGP4_Example/Program.cs

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ static void Main(string[] args)
1111
{
1212
//Parse three line element
1313
Tle tleISS = ParserTLE.parseTle(
14-
"1 25544U 98067A 18336.26376507 .00001452 00000-0 29279-4 0 9992",
15-
"2 25544 51.6401 261.1281 0005200 105.2271 353.1713 15.54045047144653",
14+
"1 25544U 98067A 19097.23063721 -.00000469 00000-0 00000+0 0 9999",
15+
"2 25544 51.6449 353.9503 0002279 151.1697 290.4275 15.52495932164239",
1616
"ISS 1");
1717

1818
//Parse tle from file
@@ -65,7 +65,7 @@ static void Main(string[] args)
6565
//TESTING MIR
6666

6767
//TEST ECI
68-
EpochTime T_eciTime= new EpochTime(09, 00, 00, 1995, 10, 1);
68+
EpochTime T_eciTime = new EpochTime(09, 00, 00, 1995, 10, 1);
6969
//Test GMST
7070
if (T_eciTime.getLocalSiderealTime() == 2.524218)
7171
{
@@ -87,26 +87,6 @@ static void Main(string[] args)
8787
var r = t_cord.toECI(t_time.getLocalSiderealTime());
8888

8989

90-
//TESTING
91-
92-
93-
//Calculate SubPoint of Satellite on ground
94-
while (true)
95-
{
96-
One_Sgp4.EpochTime time = new EpochTime(DateTime.UtcNow);
97-
var test = time.getEpoch();
98-
Console.Out.WriteLine(test);
99-
100-
var satpos = One_Sgp4.SatFunctions.getSatPositionAtTime(tleISS, time, Sgp4.wgsConstant.WGS_72);
101-
102-
Coordinate newC = new Coordinate(48.853333, 2.348611);
103-
var look = SatFunctions.calcSphericalCoordinate(newC, time, satpos);
104-
One_Sgp4.Coordinate satOnGround = One_Sgp4.SatFunctions.calcSatSubPoint(time, satpos, Sgp4.wgsConstant.WGS_72);
105-
Console.Out.WriteLine(satOnGround.toString() + " - Azimuth: " + look.y + " Elevation: " + look.z );
106-
Thread.Sleep(1000);
107-
}
108-
109-
11090
//Calculate if Satellite is Visible for a certain Observer on ground at certain timePoint
11191
bool satelliteIsVisible = One_Sgp4.SatFunctions.isSatVisible(observer, 0.0, startTime, resultDataList[0]);
11292

@@ -118,7 +98,7 @@ static void Main(string[] args)
11898
//for a location, Satellite, StartTime, Accuracy in Seconds = 15sec, MaxNumber of Days = 5 Days, Wgs constant = WGS_84
11999
//Returns pass with Location, StartTime of Pass, EndTime Of Pass, Max Elevation in Degrees
120100
List<Pass> passes = One_Sgp4.SatFunctions.CalculatePasses(observer, tleISS, new EpochTime(DateTime.UtcNow), 15, 5, Sgp4.wgsConstant.WGS_84);
121-
foreach(var p in passes)
101+
foreach (var p in passes)
122102
{
123103
Console.Out.WriteLine(p.ToString());
124104
}

One_Sgp4/EpochTime.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public double getDayOfYear()
198198
}
199199

200200
double doy = 0;
201-
for (int i = 1; i < month; i++)
201+
for (int i = 0; i < month-1; i++)
202202
{
203203
doy = doy + months[i];
204204
}

One_Sgp4/One_Sgp4.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919

2020
<PropertyGroup>
2121
<TargetFrameworks>netstandard2.0;net40;net45</TargetFrameworks>
22-
<Version>1.0.5</Version>
22+
<Version>1.0.6</Version>
2323
<PackageReleaseNotes>Included Net 4.0 and Net 4.5 as TargetFrameworks</PackageReleaseNotes>
24+
<AssemblyVersion>1.0.6.0</AssemblyVersion>
2425
</PropertyGroup>
2526

2627
</Project>

0 commit comments

Comments
 (0)