Update Drone.cs
This commit is contained in:
@ -474,7 +474,7 @@ namespace DroneSimulator
|
||||
|
||||
of.X = RealOF.result.X;
|
||||
of.Y = RealOF.result.Y;
|
||||
of.Time = RealBar.timer;
|
||||
of.Time = RealOF.timer;
|
||||
|
||||
MoveOF = Vector2.Zero;
|
||||
|
||||
@ -491,7 +491,7 @@ namespace DroneSimulator
|
||||
gps.Head.Time = (uint)(Stopwatch.GetTimestamp() / (Stopwatch.Frequency / 1000));
|
||||
|
||||
GPS.Point p = new GPS.Point();
|
||||
p.x = PosXYZ.Y; p.y= PosXYZ.X;
|
||||
p.x = RealPos.result.Y; p.y= RealPos.result.X;
|
||||
|
||||
GPS.GlobalCoords g = new GPS.GlobalCoords();
|
||||
g.latitude=GPS.Home.Lat; g.longitude=GPS.Home.Lon;
|
||||
@ -501,7 +501,7 @@ namespace DroneSimulator
|
||||
gps.Lat = g.latitude; gps.Lon = g.longitude;
|
||||
|
||||
gps.Speed = MathF.Sqrt(SpdXYZ.X * SpdXYZ.X + SpdXYZ.Y * SpdXYZ.Y + SpdXYZ.Z * SpdXYZ.Z);
|
||||
gps.Alt = GPS.Home.Alt + PosXYZ.Z;
|
||||
gps.Alt = GPS.Home.Alt + RealPos.result.Z;
|
||||
|
||||
DateTime tim = DateTime.Now;
|
||||
gps.UTC = tim.Second + tim.Minute * 100 + tim.Hour * 10000;
|
||||
@ -514,6 +514,8 @@ namespace DroneSimulator
|
||||
gps.Vdop = GPS.State.Vdop;
|
||||
gps.Pdop = GPS.State.Pdop;
|
||||
|
||||
gps.Time = RealPos.timer;
|
||||
|
||||
return getBytes(gps);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user