Ejemplo n.º 1
0
 public Position(AngleUnits angles, AltitudeUnits alts)
 {
     latitude       = 0;
     longitude      = 0;
     altitude       = 0;
     altitude_units = alts;
     angle_units    = angles;
 }
Ejemplo n.º 2
0
 public Position()
 {
     latitude       = 0;
     longitude      = 0;
     altitude       = 0;
     altitude_units = AltitudeUnits.Feet;
     angle_units    = AngleUnits.Degrees;
 }
Ejemplo n.º 3
0
 public Position()
 {
     this.latitude       = 0;
     this.longitude      = 0;
     this.altitude       = 0;
     this.altitude_units = AltitudeUnits.Feet;
     this.angle_units    = AngleUnits.Degrees;
 }
Ejemplo n.º 4
0
 public Position(AngleUnits angles, AltitudeUnits alts)
 {
     this.latitude       = 0;
     this.longitude      = 0;
     this.altitude       = 0;
     this.altitude_units = alts;
     this.angle_units    = angles;
 }
Ejemplo n.º 5
0
 public Position()
 {
     this.latitude = 0;
     this.longitude = 0;
     this.altitude = 0;
     this.altitude_units = AltitudeUnits.Feet;
     this.angle_units = AngleUnits.Degrees;
 }
Ejemplo n.º 6
0
 public Position(AngleUnits angles, AltitudeUnits alts)
 {
     this.latitude = 0;
     this.longitude = 0;
     this.altitude = 0;
     this.altitude_units = alts;
     this.angle_units = angles;
 }
        public ThunderBolt(string portName, AngleUnits au, AltitudeUnits tu, OutputPort activityLed)
        {
            _activityLed = activityLed;
            PacketQueue = new FixedSizedQueue(10);

            PacketProcessing = new Thread(new ThreadStart(worker_thread));

            position = new Position(au, tu);
            last_position = new Position(au, tu);
            m_port = new SerialPort(portName, 9600, Parity.None, 8, StopBits.One);
            m_port.DataReceived += new SerialDataReceivedEventHandler(m_port_DataReceived);
            m_port.ErrorReceived += new SerialErrorReceivedEventHandler(m_port_ErrorReceived);
            for (int i = 0; i < 32; i++)
                Satellites[i] = new SatInfo();
        }
Ejemplo n.º 8
0
 public static void SetDefaultAltitudeUnits(AltitudeUnits units)
 {
     DefaultAltitudeUnits = units;
 }
Ejemplo n.º 9
0
 public static string ToAxsPoint(this GeoWaypoint gwp, string datumName, string utmZone, AltitudeUnits units)
 {
     var utmCoords = gwp.Coordinates.ToUtm(Datum.GetInstance(datumName), utmZone);
     return string.Format(NumberFormatInfo.InvariantInfo, "point {0}=sutm({1:0.0},{2:0.0},{3:0.0}{4}) waypoint(lime)",
         gwp.Name,
         utmCoords.Easting, utmCoords.Northing,
         units == AltitudeUnits.Meters ? utmCoords.Altitude : utmCoords.Altitude * Physics.METERS2FEET,
         units == AltitudeUnits.Meters ? "m" : "ft"
         );
 }
Ejemplo n.º 10
0
        public static PdfWaypoint ToPdfWaypoint(this GeoWaypoint gwp, string datumName, string utmZone, AltitudeUnits units)
        {
            var utmCoords = gwp.Coordinates.ToUtm(Datum.GetInstance(datumName), utmZone);
            var altitude = utmCoords.Altitude;
            var wp = new AXWaypoint(gwp.Name, gwp.Time, utmCoords.Easting, utmCoords.Northing, altitude);

            return new PdfWaypoint()
            {
                Name = wp.Name,
                CompetitionCoords = wp.ToString(AXPointInfo.CompetitionCoords8).Replace("/", " / "),
                Altitude = wp.ToString(units == AltitudeUnits.Meters ? AXPointInfo.AltitudeInMeters : AXPointInfo.AltitudeInFeet)
            };
        }