void ned_of_ecef_point_i(struct NedCoor_i* ned, struct LtpDef_i* def, struct EcefCoor_i* ecef) { struct EnuCoor_i enu; enu_of_ecef_point_i(&enu, def, ecef); ENU_OF_TO_NED(*ned, enu); }
void ned_of_ecef_point_i(struct NedCoor_i* ned, struct LtpDef_i* def, struct EcefCoor_i* ecef) { struct EnuCoor_i enu; enu_of_ecef_point_i(&enu, def, ecef);//先得到enu坐标信息 ENU_OF_TO_NED(*ned, enu);//enu坐标转换到ned坐标,z轴取反即可 }
static void send_wind(struct transport_tx *trans, struct link_device *dev) { struct NedCoor_f wind_ned = ins_mekf_wind_get_wind_ned(); struct EnuCoor_f wind_enu; ENU_OF_TO_NED(wind_enu, wind_ned); float va = ins_mekf_wind_get_airspeed_norm(); uint8_t flags = 7; // 3D wind + airspeed pprz_msg_send_WIND_INFO_RET(trans, dev, AC_ID, &flags, &wind_enu.x, &wind_enu.y, &wind_enu.z, &va); }
void ecef_of_ned_point_i(struct EcefCoor_i* ecef, struct LtpDef_i* def, struct NedCoor_i* ned) { struct EnuCoor_i enu; ENU_OF_TO_NED(enu, *ned); ecef_of_enu_point_i(ecef, def, &enu); }
void ned_of_ecef_vect_f(struct NedCoor_f* ned, struct LtpDef_f* def, struct EcefCoor_f* ecef) { struct EnuCoor_f enu; enu_of_ecef_vect_f(&enu, def, ecef); ENU_OF_TO_NED(*ned, enu); }
void ecef_of_ned_vect_f(struct EcefCoor_f* ecef, struct LtpDef_f* def, struct NedCoor_f* ned) { struct EnuCoor_f enu; ENU_OF_TO_NED(enu, *ned); ecef_of_enu_vect_f(ecef, def, &enu); }
void ecef_of_ned_vect_i(struct EcefCoor_i* ecef, struct LtpDef_i* def, struct NedCoor_i* ned) { struct EnuCoor_i enu; ENU_OF_TO_NED(enu, *ned);//先将ned转换城enu ecef_of_enu_vect_i(ecef, def, &enu);////将enu转换为ecef }
void ned_of_ecef_vect_i(struct NedCoor_i* ned, struct LtpDef_i* def, struct EcefCoor_i* ecef) { struct EnuCoor_i enu; enu_of_ecef_vect_i(&enu, def, ecef); ENU_OF_TO_NED(*ned, enu);//取反得到NED的向量坐标 }
void ecef_of_ned_vect_d(struct EcefCoor_d* ecef, struct LtpDef_d* def, struct NedCoor_d* ned) { struct EnuCoor_d enu; ENU_OF_TO_NED(enu, *ned); ecef_of_enu_vect_d(ecef, def, &enu); }
void ned_of_ecef_vect_d(struct NedCoor_d* ned, struct LtpDef_d* def, struct EcefCoor_d* ecef) { struct EnuCoor_d enu; enu_of_ecef_vect_d(&enu, def, ecef); ENU_OF_TO_NED(*ned, enu); }