コード例 #1
0
    /**
     * <summary>
     *   Changes the compass and tilt sensor frame of reference.
     * <para>
     *   The magnetic compass
     *   and the tilt sensors (pitch and roll) naturally work in the plane
     *   parallel to the earth surface. In case the device is not installed upright
     *   and horizontally, you must select its reference orientation (parallel to
     *   the earth surface) so that the measures are made relative to this position.
     * </para>
     * <para>
     * </para>
     * </summary>
     * <param name="position">
     *   a value among the <c>YRefFrame.MOUNTPOSITION</c> enumeration
     *   (<c>YRefFrame.MOUNTPOSITION_BOTTOM</c>,   <c>YRefFrame.MOUNTPOSITION_TOP</c>,
     *   <c>YRefFrame.MOUNTPOSITION_FRONT</c>,    <c>YRefFrame.MOUNTPOSITION_RIGHT</c>,
     *   <c>YRefFrame.MOUNTPOSITION_REAR</c>,     <c>YRefFrame.MOUNTPOSITION_LEFT</c>),
     *   corresponding to the installation in a box, on one of the six faces.
     * </param>
     * <param name="orientation">
     *   a value among the enumeration <c>YRefFrame.MOUNTORIENTATION</c>
     *   (<c>YRefFrame.MOUNTORIENTATION_TWELVE</c>, <c>YRefFrame.MOUNTORIENTATION_THREE</c>,
     *   <c>YRefFrame.MOUNTORIENTATION_SIX</c>,     <c>YRefFrame.MOUNTORIENTATION_NINE</c>)
     *   corresponding to the orientation of the "X" arrow on the device,
     *   as on a clock dial seen from an observer in the center of the box.
     *   On the bottom face, the 12H orientation points to the front, while
     *   on the top face, the 12H orientation points to the rear.
     * </param>
     * <para>
     *   Remember to call the <c>saveToFlash()</c>
     *   method of the module if the modification must be kept.
     * </para>
     * <para>
     *   On failure, throws an exception or returns a negative error code.
     * </para>
     */
    public virtual int set_mountPosition(MOUNTPOSITION position, MOUNTORIENTATION orientation)
    {
        int pos = 0;

        pos = (((int)position) << (2)) + (int)orientation;
        return(this.set_mountPos(pos));
    }
コード例 #2
0
 /**
  * <summary>
  *   Changes the compass and tilt sensor frame of reference.
  * <para>
  *   The magnetic compass
  *   and the tilt sensors (pitch and roll) naturally work in the plane
  *   parallel to the earth surface. In case the device is not installed upright
  *   and horizontally, you must select its reference orientation (parallel to
  *   the earth surface) so that the measures are made relative to this position.
  * </para>
  * <para>
  * </para>
  * </summary>
  * <param name="position">
  *   a value among the <c>YRefFrame.MOUNTPOSITION</c> enumeration
  *   (<c>YRefFrame.MOUNTPOSITION_BOTTOM</c>,   <c>YRefFrame.MOUNTPOSITION_TOP</c>,
  *   <c>YRefFrame.MOUNTPOSITION_FRONT</c>,    <c>YRefFrame.MOUNTPOSITION_RIGHT</c>,
  *   <c>YRefFrame.MOUNTPOSITION_REAR</c>,     <c>YRefFrame.MOUNTPOSITION_LEFT</c>),
  *   corresponding to the installation in a box, on one of the six faces.
  * </param>
  * <param name="orientation">
  *   a value among the enumeration <c>YRefFrame.MOUNTORIENTATION</c>
  *   (<c>YRefFrame.MOUNTORIENTATION_TWELVE</c>, <c>YRefFrame.MOUNTORIENTATION_THREE</c>,
  *   <c>YRefFrame.MOUNTORIENTATION_SIX</c>,     <c>YRefFrame.MOUNTORIENTATION_NINE</c>)
  *   corresponding to the orientation of the "X" arrow on the device,
  *   as on a clock dial seen from an observer in the center of the box.
  *   On the bottom face, the 12H orientation points to the front, while
  *   on the top face, the 12H orientation points to the rear.
  * </param>
  * <para>
  *   Remember to call the <c>saveToFlash()</c>
  *   method of the module if the modification must be kept.
  * </para>
  * <para>
  *   On failure, throws an exception or returns a negative error code.
  * </para>
  */
 public virtual int set_mountPosition(MOUNTPOSITION position, MOUNTORIENTATION orientation)
 {
     int mixedPos;
     mixedPos = (((int)position) << (2)) + (int)orientation;
     return this.set_mountPos(mixedPos);
 }