一、载体坐标系简称
载体坐标系是指基于机体坐标(或称为平台坐标)确定的以机体中心为坐标原点的惯性坐标系,简称为PC系。
/**
* 载体坐标系简称PC系
* 以机体中心为坐标原点的惯性坐标系
* @param {array} pc 坐标原点的坐标值[x,y,z]
*/
function PC(pc) {
this.pc = pc;
// 其他方法和属性
}
二、载体坐标系到东北天坐标
载体坐标系到东北天坐标的转化需引入大地坐标系下的经纬度作为参数,对载体坐标系下的各个方向向量进行坐标变换得到东北天坐标系下的对应方向向量。
/**
* 载体坐标系到东北天坐标
* @param {array} pc 坐标原点的坐标值[x,y,z]
* @param {number} latitude 纬度值
* @param {number} longitude 经度值
* @param {number} altitude 高度值
*/
function PC2NED(pc, latitude, longitude, altitude) {
const N = [-Math.sin(latitude)*Math.cos(longitude), -Math.sin(latitude)*Math.sin(longitude), Math.cos(latitude)];
const E = [-Math.sin(longitude), Math.cos(longitude), 0];
const D = [-Math.cos(latitude)*Math.cos(longitude), -Math.cos(latitude)*Math.sin(longitude), -Math.sin(latitude)];
// 将PC系下的各个方向向量进行坐标变换得到NED系下的对应方向向量
const n = [N[0]*pc[0] + N[1]*pc[1] + N[2]*pc[2], E[0]*pc[0] + E[1]*pc[1] + E[2]*pc[2], D[0]*pc[0] + D[1]*pc[1] + D[2]*pc[2]];
return n;
}
三、载体坐标系英语
载体坐标系的英文名称是 Platform Coordinate System,简称PC coordinate system。
const PC_COORDINATE_SYSTEM = "Platform Coordinate System";
四、载体坐标系定义
载体坐标系是一种惯性坐标系,以飞行器自身的参考系为基础,不随外部环境的变化而发生改变。
const PC_DEFINITION = "Platform Coordinate System is an inertial coordinate system based on the reference frame of the aircraft itself, and it does not change with the change of the external environment.";
五、载体坐标系方向定义
载体坐标系的x轴正方向指向飞行方向,y轴正方向指向右侧,z轴正方向指向下方。
const PC_DIRECTION_DEFINITION = "The positive direction of x-axis in the platform coordinate system points to the flight direction, the positive direction of y-axis points to the right side, and the positive direction of z-axis points to the downward direction.";
六、载体坐标系和导航坐标系
载体坐标系和导航坐标系之间需要进行坐标变换。在导航坐标系下,机头指向正北,机侧指向东,垂线于地面的方向指向上。而在载体坐标系下,这些方向的定义是不固定的,需要根据载体的运动状态进行确定。
/**
* 坐标系变换:载体坐标系到导航坐标系
* @param {array} pc 坐标原点的坐标值[x,y,z]
* @param {number} roll 横滚角
* @param {number} pitch 俯仰角
* @param {number} yaw 航向角
*/
function PC2Nav(pc, roll, pitch, yaw) {
// 坐标变换公式
// 根据载体的运动状态确定各个方向的定义
const N = [-Math.cos(pitch)*Math.sin(yaw), Math.cos(pitch)*Math.cos(yaw), -Math.sin(pitch)];
const E = [-Math.cos(roll)*Math.cos(yaw) + Math.sin(pitch)*Math.sin(roll)*Math.sin(yaw), Math.cos(roll)*Math.sin(yaw) + Math.sin(pitch)*Math.sin(roll)*Math.cos(yaw), Math.cos(pitch)*Math.sin(roll)];
const D = [Math.sin(roll)*Math.cos(yaw) + Math.sin(pitch)*Math.cos(roll)*Math.sin(yaw), -Math.sin(roll)*Math.sin(yaw) + Math.sin(pitch)*Math.cos(roll)*Math.cos(yaw), Math.cos(pitch)*Math.cos(roll)];
// 将PC系下的各个方向向量进行坐标变换得到导航坐标系下的对应方向向量
const n = [N[0]*pc[0] + N[1]*pc[1] + N[2]*pc[2], E[0]*pc[0] + E[1]*pc[1] + E[2]*pc[2], D[0]*pc[0] + D[1]*pc[1] + D[2]*pc[2]];
return n;
}
七、载体坐标系俯仰角计算
载体坐标系的俯仰角是指其y-z投影量的夹角,用于描述载体相对于水平面的倾斜程度。
/**
* 计算载体坐标系下的俯仰角
* @param {array} n10 垂线于地面的方向向量
*/
function calcPitch(n10) {
const { x, y, z } = { x: n10[0], y: n10[1], z: n10[2] };
let pitch = Math.atan2(-x, Math.sqrt(y*y + z*z));
return pitch;
}
八、载体坐标系到地理坐标系转换
载体坐标系到地理坐标系的转换需要引入大地坐标系下的经纬度作为参数,通过将载体坐标系下的各点坐标进行坐标变换得到地理坐标系下的对应点坐标。
/**
* 坐标系变换:载体坐标系到地理坐标系
* @param {array} pc 坐标原点的坐标值[x,y,z]
* @param {number} latitude 纬度值
* @param {number} longitude 经度值
* @param {number} altitude 高度值
* @param {number} roll 横滚角
* @param {number} pitch 俯仰角
* @param {number} yaw 航向角
*/
function PC2Geo(pc, latitude, longitude, altitude, roll, pitch, yaw) {
// 将载体坐标系下各点坐标进行坐标变换得到地理坐标系下的对应点坐标
const n = PC2Nav(pc, roll, pitch, yaw);
const n10 = [n[0], n[1], 0];
const pitch_n10 = calcPitch(n10);
const C_en = CalcC_en(latitude, longitude);
const en = MatrixMultiply(C_en, n);
const pitch_en = calcPitch(en);
const geodetic = CalcGeodetic(latitude, longitude, altitude, en);
return geodetic;
}
九、导航坐标系
导航坐标系是一种惯性坐标系,以地球为基础,以某一导航引导信号的参考方向和涵盖区域为基础建立。
/** * 导航坐标系简介 */ const NAV_COORDINATE_SYSTEM = "Navigation Coordinate System is an inertial coordinate system, which is established based on the direction and coverage area of a navigation guidance signal with the Earth as the basis.";
十、平台坐标系选取
平台坐标系的选取需要考虑飞行器的运动特点并确定坐标系的原点以及各方向的定义。
/**
* 平台坐标系选取和定义
* @param {array} pc 坐标原点的坐标值[x,y,z]
* @param {number} roll 横滚角
* @param {number} pitch 俯仰角
* @param {number} yaw 航向角
*/
function selectPlatformCoordinateSystem(pc, roll, pitch, yaw) {
// 根据飞行器的运动特点确定坐标系的原点以及各方向的定义
const N = [1, 0, 0];
const E = [0, 1, 0];
const D = [0, 0, 1];
// 将PC系下的各个方向向量进行坐标变换得到导航坐标系下的对应方向向量
const n = [N[0]*pc[0] + N[1]*pc[1] + N[2]*pc[2], E[0]*pc[0] + E[1]*pc[1] + E[2]*pc[2], D[0]*pc[0] + D[1]*pc[1] + D[2]*pc[2]];
const nav = PC2Nav(pc, roll, pitch, yaw);
// 比较n和nav向量的夹角大小,选择夹角小的作为平台坐标系的x轴正方向
const dotRes = DotProduct(n, nav);
if (dotRes > 0) {
return new PlatformCoordinateSystem(pc, N, E, D);
} else {
return new PlatformCoordinateSystem(pc, nav, CrossProduct(nav, N), CrossProduct(nav, CrossProduct(nav, N)));
}
}
十一、总结
通过对载体坐标系的详细阐述,我们了解了其定义和英文名称,以及和其他坐标系的转换方法,以及俯仰角计算和平台坐标系的选取等方面内容,这些都在航天航空的领域有着广泛的应用。
原创文章,作者:小蓝,如若转载,请注明出处:https://www.506064.com/n/238628.html
微信扫一扫
支付宝扫一扫