import { defaultValue } from '../util'
import Zondy from './Zondy'
/**
* 相机内外参数
* @typedef CameraParam
* @type {Object}
* @property {Number[]} cameraPosition
* @property {Object} orientation
* @property {Number} [orientation.heading]
* @property {Number} [orientation.pitch]
* @property {Number} [orientation.roll]
* @property {Number} hFOV
* @property {Number} vFOV
*/
/**
* 标定配准参数
* @typedef GroundControlPoint
* @type {Object}
* @property {String} id 控制点标识
* @property {String} description 控制的描述
* @property {Number} pixelX 控制点在图像上的像素坐标x分量
* @property {Number} pixelY 控制点在图像上的像素坐标y分量
* @property {Number} x 控制点的地理坐标x分量
* @property {Number} y 控制点的地理坐标y分量
* @property {Number} z 控制点的地理坐标高程
*/
/**
* 标定参数
* @typedef CalibrationParam
* @type {Object}
* @property {GroundControlPoint[]} groundControlPointList
*/
/**
* 视频配准参数
* @class VideoRegistrationParam
* @classdesc 视频配准参数
* @param {Object} options 构造参数
* @param {String} [options.videoRegistrationType] 视频配准的类型
* @param {CalibrationParam} [options.calibrationParam] 标定参数
* @param {CameraParam} [options.cameraParam] 相机内外参数
*/
class VideoRegistrationParam {
constructor(options) {
options = defaultValue(options, {})
this._videoRegisrationType = defaultValue(
options.videoRegistrationType,
null
)
this._calibrationParam = defaultValue(options.calibrationParam, undefined)
this._cameraParam = defaultValue(options.cameraParam, undefined)
}
/**
* 视频配准类型
* @type {String}
*/
get videoRegistrationType() {
return this._videoRegisrationType
}
/**
* 标定配准参数
* @type {CalibrationParam}
*/
get calibrationParam() {
return this._calibrationParam
}
/**
* 相机内外参数
* @type {CameraParam}
*/
get cameraParam() {
return this._cameraParam
}
}
Zondy.VideoRegistrationParam = VideoRegistrationParam
export default VideoRegistrationParam