Exemple #1
0
 private void NewGspPosition(gps.parser.GpsPosition pos)
 { // access: pos.x, pos.y, pos.speed, pos.course, pos.hdop, etc.
     // all data are in metric system ...
     Data.InputAI[5]  = pos.x;
     Data.InputAI[6]  = pos.y;
     Data.InputAI[4]  = pos.speed / 1.852;
     Data.ShipSpeed   = Data.InputAI[4];
     Data.GPSCounter  = 0;
     Data.InputAI[30] = Data.InputAI[4]; //Speed
     Data.InputAI[31] = Data.InputAI[6]; //N
     Data.InputAI[32] = Data.InputAI[5]; //E
 }
 public void Init(GpsPosition other)
 {
     if(object.ReferenceEquals(this, other))
     {
         return;
     }
     this.x = other.x;
     this.y = other.y;
     this.speed = other.speed;
     this.course = other.course;
     this.date = other.date;
     this.time = other.time;
     this.positionFixIndicator = other.positionFixIndicator;
     this.satelites = other.satelites;
     this.hdop = other.hdop;
 }
 public void Init(GpsPosition other)
 {
     if (object.ReferenceEquals(this, other))
     {
         return;
     }
     this.x      = other.x;
     this.y      = other.y;
     this.speed  = other.speed;
     this.course = other.course;
     this.date   = other.date;
     this.time   = other.time;
     this.positionFixIndicator = other.positionFixIndicator;
     this.satelites            = other.satelites;
     this.hdop = other.hdop;
 }
 private void FireNewPosition()
 {
     if(NewGspPosition != null)
     {
         GpsPosition pos = new GpsPosition();
         pos.Init(this.position);
         NewGspPosition(pos);
     }
 }
 private void NewGspPosition(gps.parser.GpsPosition pos)
 {
     outFile.WriteLine(pos.x.ToString().Replace(',', '.'));
     outFile.WriteLine(pos.y.ToString().Replace(',', '.'));
 }