Beispiel #1
0
        public IList <TableEntry> GetEntires(BodyId bodyId, double longitude, double latitude, double altitude, DateTime startTime, DateTime endTime, int intervalSize, IntervalUnit intervalUnit)
        {
            using (var client = new TcpClient("horizons.jpl.nasa.gov", 6775))
            {
                var stream       = client.GetStream();
                var inputStream  = new StreamReader(stream);
                var outputStream = new StreamWriter(stream);

                inputStream.ReadStartText();
                outputStream.SelectBody(inputStream, bodyId);
                outputStream.SelectEphemeris(inputStream);
                outputStream.SelectObserver(inputStream);
                outputStream.SelectCoordinateCenter(inputStream);
                outputStream.SelectGeodeticCoordinateSystem(inputStream);
                outputStream.SelectGeodeticPosition(inputStream, longitude, latitude, altitude);
                outputStream.SelectStartTime(inputStream, startTime);
                outputStream.SelectEndTime(inputStream, endTime);
                outputStream.SelectInterval(inputStream, intervalSize, intervalUnit);
                outputStream.SelectDefault(inputStream);
                var result = outputStream.SelectObserverTable(inputStream, TableQuantities.LocalApparentSiderealTime, TableQuantities.ObserverEclipticLongitudeLatitude);

                return(TableResultParser.Parse(result));
            }
        }
Beispiel #2
0
 public static extern void SetBodyMassAndInertia(BodyId bodyId, float mass);
Beispiel #3
0
 public static extern float GetBodyMass(BodyId bodyId);
Beispiel #4
0
 public static extern void SetBodyShape(BodyId bodyId, ShapeId shapeId);
Beispiel #5
0
 public static extern ShapeId GetBodyShape(BodyId bodyId);
Beispiel #6
0
 public static extern void ReleaseBody(BodyId bodyId);
Beispiel #7
0
 public static extern void RemoveBody(SceneId sceneId, BodyId bodyId);
Beispiel #8
0
 public static extern void AddBody(SceneId sceneId, BodyId bodyId);
Beispiel #9
0
 public static void SelectBody(this StreamWriter streamWriter, StreamReader streamReader, BodyId bodyId)
 {
     streamWriter.WriteWithNewLine(((int)bodyId).ToString());
     streamReader.TerminatedRead(TelnetConstants.BodySelectionTerminationString);
 }