#ifndef COORDINATE_CTRL_TARGET_H
#define COORDINATE_CTRL_TARGET_H

/*!
  \file
  \brief 座標系の定義と、座標系の変換

  \author Satofumi KAMIMURA

  $Id: coordinateCtrl_target.h 286 2008-10-20 09:40:22Z satofumi $
*/


/*!
  \brief 位置の管理情報
*/
typedef struct {
  int km[2];
  int m[2];
  int mm[2];
  int mm256[2];
  unsigned short div16;
} coordinateInfo_t;


enum {
  COORD_X = 0,
  COORD_Y = 1,
};


extern void initCoordinateInfo(coordinateInfo_t *crd);
extern int getSignedDiv16(short div16);
extern void adjustCoordinateRange(coordinateInfo_t *crd);
extern void get_mmCoordinate(coordinateInfo_t *crd, int *x_mm, int *y_mm);
extern void convertCoordinateInfo(coordinateInfo_t *crd,
				  coordinateInfo_t *offset);

#endif /* !COORDINATE_CTRL_TARGET_H */
