Satellite: Difference between revisions
Jump to navigation
Jump to search
Dvb-nomail (talk | contribs) No edit summary |
Dvb-nomail (talk | contribs) No edit summary |
||
Line 5: | Line 5: | ||
== What is a satellite? == | == What is a satellite? == | ||
A satellite consists of two draw objects; a satellite position object of type symbol and a satellite trajectory object of type line. Both object types are not required, but are usually used. | A satellite consists of two draw objects; a satellite position object of type symbol and a satellite trajectory object of type line. Both object types are not required, but are usually used. | ||
==== The TLE string ==== | ==== The TLE string ==== | ||
A satellite position and its trajectory is computed from a TLE string. The format of the TLE is described in https://www.space-track.org/documentation#/tle. | A satellite position and its trajectory is computed from a TLE string. The format of the TLE is described in https://www.space-track.org/documentation#/tle. | ||
<source lang="c#"> | |||
//Example of TLE text used in tests | |||
public static string TestTle() | |||
{ | |||
var tle = "0 ISS (ZARYA)"; | |||
tle += "\n1 25544U 98067A 20227.03014521 .00002523 00000-0 53627-4 0 9998"; | |||
tle += "\n2 25544 51.6461 62.1977 0001435 30.4470 104.2862 15.49164713240985"; | |||
return tle; | |||
} | |||
</source> | |||
==== How to create satellite objects ==== | |||
The satellite objects are first created and then added to the satellite layer. | |||
<source lang="c#"> | |||
//This test code create a satellite position object | |||
var satellite = new GeoFramework.SatelliteLayer.Satellite(); | |||
Assert.NotNull(satellite); | |||
var time = new DateTime(2020, 08, 14, 7, 55, 26, DateTimeKind.Utc); | |||
satellite.Tle = TestTle(); | |||
Assert.IsTrue(satellite.CreateSatellite(time)); | |||
Assert.AreEqual(1, satellite.Objects.Count); | |||
Assert.IsNotNull(satellite.Objects.First() as ISatellitePosition); | |||
</source> |
Revision as of 12:39, 13 January 2022
The GDK layer "Satellite" defined in the namespace TPG.GeoFramework.SatelliteLayer handles satellites, they can therefore easily be separated from other draw types. Satellite objects in this layer are controlled using the TPG.GeoFramework.SatelliteLayer.SatelliteLayerViewModel class.
What is a satellite?
A satellite consists of two draw objects; a satellite position object of type symbol and a satellite trajectory object of type line. Both object types are not required, but are usually used.
The TLE string
A satellite position and its trajectory is computed from a TLE string. The format of the TLE is described in https://www.space-track.org/documentation#/tle.
//Example of TLE text used in tests
public static string TestTle()
{
var tle = "0 ISS (ZARYA)";
tle += "\n1 25544U 98067A 20227.03014521 .00002523 00000-0 53627-4 0 9998";
tle += "\n2 25544 51.6461 62.1977 0001435 30.4470 104.2862 15.49164713240985";
return tle;
}
How to create satellite objects
The satellite objects are first created and then added to the satellite layer.
//This test code create a satellite position object
var satellite = new GeoFramework.SatelliteLayer.Satellite();
Assert.NotNull(satellite);
var time = new DateTime(2020, 08, 14, 7, 55, 26, DateTimeKind.Utc);
satellite.Tle = TestTle();
Assert.IsTrue(satellite.CreateSatellite(time));
Assert.AreEqual(1, satellite.Objects.Count);
Assert.IsNotNull(satellite.Objects.First() as ISatellitePosition);