Ejemplo n.º 1
0
    /**********************
     * Static methods
     * **********************/

    /// <summary>
    /// This method allows to set a Geopoint as extension to the current trace.
    /// </summary>
    /// <param name="t">tracker to use</param>
    /// <param name="lat">latitude</param>
    /// <param name="lon">longitude</param>
    public static void setGeopoint(this Tracker t, float lat, float lon)
    {
        if (TR == null)
        {
            TR = new ExtensionTransformations();
        }

        t.setVar(Extension.Geopoint.ToString().ToLower(), lat + "," + lon);
    }
Ejemplo n.º 2
0
        /**********************
         * Static methods
         * **********************/

        /// <summary>
        /// This method allows to set a Geopoint as extension to the current trace.
        /// </summary>
        /// <param name="t">tracker to use</param>
        /// <param name="lat">latitude</param>
        /// <param name="lon">longitude</param>
        public static void setPosition(this TrackerAsset t, double lat, double lon)
        {
            if (TR == null)
            {
                TR = new ExtensionTransformations();
            }

            t.setVar(Extension.Location.ToString().ToLower(), lat + "," + lon);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// This method allows to set a Geopoint as extension to the current trace.
        /// </summary>
        /// <param name="t">tracker to use</param>
        /// <param name="lat">latitude</param>
        /// <param name="lon">longitude</param>
        public static void setGuide(this TrackerAsset t, string[] indications)
        {
            if (TR == null)
            {
                TR = new ExtensionTransformations();
            }

            t.setVar(Extension.Guide.ToString().ToLower(),
                     "[" + indications.Select(i => "\"" + i + "\"").Aggregate((i1, i2) => i1 + ", " + i2) + "]");
        }
Ejemplo n.º 4
0
        /// <summary>
        /// This method allows to set a orientation extension to the current trace
        /// </summary>
        /// <param name="t">tracker to use</param>
        /// <param name="yaw">Yaw in radians (vertical torsion)</param>
        /// <param name="pitch">Pitch in radians (horizontal torsion)</param>
        /// <param name="roll">Roll in radians (straight torsion)</param>
        public static void setOrientation(this TrackerAsset t, double yaw, double pitch, double roll)
        {
            if (TR == null)
            {
                TR = new ExtensionTransformations();
            }

            t.setVar(Extension.Orientation.ToString().ToLower(),
                     "{\"yaw\":" + yaw + ", \"pitch\": " + pitch + ", \"roll\": " + roll + "}");
        }