forked from RemoteTechnologiesGroup/RemoteTech
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDelayedCommand.cs
More file actions
50 lines (44 loc) · 1.36 KB
/
Copy pathDelayedCommand.cs
File metadata and controls
50 lines (44 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System;
using System.Text;
using UnityEngine;
namespace RemoteTech.FlightComputer
{
public class DelayedFlightCtrlState : IComparable<DelayedFlightCtrlState>
{
public FlightCtrlState State { get; private set; }
public double TimeStamp { get; set; }
public DelayedFlightCtrlState(FlightCtrlState fcs)
{
State = new FlightCtrlState();
State.CopyFrom(fcs);
TimeStamp = RTUtil.GameTime;
}
public int CompareTo(DelayedFlightCtrlState dfcs)
{
return TimeStamp.CompareTo(dfcs.TimeStamp);
}
}
public class DelayedManeuver : IComparable<DelayedManeuver>
{
public ManeuverNode Node { get; set; }
public double TimeStamp { get; set; }
public DelayedManeuver(ManeuverNode node)
{
Node = new ManeuverNode()
{
DeltaV = node.DeltaV,
patch = node.patch,
solver = node.solver,
scaledSpaceTarget = node.scaledSpaceTarget,
nextPatch = node.nextPatch,
UT = node.UT,
nodeRotation = node.nodeRotation,
};
TimeStamp = RTUtil.GameTime;
}
public int CompareTo(DelayedManeuver dm)
{
return TimeStamp.CompareTo(dm.TimeStamp);
}
}
}