⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 state.h

📁 UAV 自动驾驶的
💻 H
字号:
/* -*- indent-tabs-mode:T; c-basic-offset:8; tab-width:8; -*- vi: set ts=8: * $Id: state.h,v 2.3 2003/03/08 05:27:26 tramm Exp $ * * (c) Aaron Kahn * (c) Trammell Hudson * * State communication to and from the simulator.  It encapsualtes * the data that the simulator core math model outputs so that * each modular piece does not have to understand the protocol. * ************* * *  This file is part of the autopilot simulation package. * *  For more details: * *	http://autopilot.sourceforge.net/ * *  Autopilot is free software; you can redistribute it and/or modify *  it under the terms of the GNU General Public License as published by *  the Free Software Foundation; either version 2 of the License, or *  (at your option) any later version. * *  Autopilot is distributed in the hope that it will be useful, *  but WITHOUT ANY WARRANTY; without even the implied warranty of *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the *  GNU General Public License for more details. * *  You should have received a copy of the GNU General Public License *  along with Autopilot; if not, write to the Free Software *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA * */#ifndef _STATE_H_#define _STATE_H_#include "macros.h"#ifndef WIN32#include <stdint.h>#endif#include <sys/time.h>#include <sys/types.h>#define STATE_PROTOCOL		2struct sockaddr_in;#ifdef __cplusplusnamespace libstate{#endiftypedef struct {	/* Body frame linear accelerations */	double		ax;	double		ay;	double		az;	/* Body frame rotational rates */	double		p;	double		r;	double		q;	/* Position relative to the ground */	double		x;	double		y;	double		z;	/* Euler angles relative to the ground */	double		phi;	double		theta;	double		psi;	/* Velocity over the ground */	double		vx;	double		vy;	double		vz;	/* Moments on the rotor mass */	double		mx;	double		my;	/* End of line character to force flush with cat */	char		end_of_line;} state_t;#ifdef __cplusplusextern "C" {#endif/* *  If hostname == 0, the environment variable "SIMSERVER" will * be used, or "localhost" if no variable is set. * * If port == 0, the variable "SIMPORT" will be used, or 2002 if * no variable is set. */extern intconnect_state(	const char *		hostname,	int			port);extern inthost_lookup(	struct sockaddr_in *	addr,	const char *		hostname,	int			port);extern intset_parameter(	int			type,	double			value);extern intsend_command(	int			type);extern intread_state(	state_t *		state,	int			forever);extern doublestate_dt( void );	extern voidset_state_dt(	double			out_dt);#ifdef __cplusplus}}#endif#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -