Starting to build generic flight model interface.
This commit is contained in:
parent
e44b3cb2c3
commit
c994ed7feb
2 changed files with 32 additions and 8 deletions
11
FDM/Makefile
11
FDM/Makefile
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
TARGET=libflight.a
|
TARGET=libflight.a
|
||||||
|
|
||||||
CFILES = slew.c
|
CFILES = flight.c
|
||||||
OFILES = $(CFILES:.c=.o)
|
OFILES = $(CFILES:.c=.o)
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
|
@ -57,15 +57,18 @@ clean:
|
||||||
# Secondary Targets
|
# Secondary Targets
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
flight.h: slew.h
|
flight.h: slew/slew.h LaRCsim/ls_interface.h
|
||||||
touch flight.h
|
touch flight.h
|
||||||
|
|
||||||
slew.o: slew.c slew.h flight.h ../aircraft/aircraft.h ../controls/controls.h
|
flight.o: flight.c flight.h
|
||||||
$(CC) $(CFLAGS) $(INCLUDES) -c slew.c
|
$(CC) $(CFLAGS) $(INCLUDES) -c flight.c
|
||||||
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# $Log$
|
# $Log$
|
||||||
|
# Revision 1.3 1997/05/29 02:32:25 curt
|
||||||
|
# Starting to build generic flight model interface.
|
||||||
|
#
|
||||||
# Revision 1.2 1997/05/23 15:40:36 curt
|
# Revision 1.2 1997/05/23 15:40:36 curt
|
||||||
# Added GNU copyright headers.
|
# Added GNU copyright headers.
|
||||||
#
|
#
|
||||||
|
|
29
FDM/flight.h
29
FDM/flight.h
|
@ -28,11 +28,20 @@
|
||||||
#define FLIGHT_H
|
#define FLIGHT_H
|
||||||
|
|
||||||
|
|
||||||
#include "slew.h"
|
#include "slew/slew.h"
|
||||||
|
#include "LaRCsim/ls_interface.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* Define the various supported flight models (not all implemented) */
|
||||||
|
#define FG_SLEW 0
|
||||||
|
#define FG_LARCSIM 1
|
||||||
|
#define FG_ACM 2
|
||||||
|
#define FG_HELO 3
|
||||||
|
#define FG_BALLOON 4
|
||||||
|
#define FG_PARACHUTE 5
|
||||||
|
|
||||||
|
|
||||||
/* Define a structure containing the shared flight model parameters */
|
/* Define a structure containing the shared flight model parameters */
|
||||||
|
|
||||||
struct flight_params {
|
struct flight_params {
|
||||||
double pos_x, pos_y, pos_z; /* temporary position variables */
|
double pos_x, pos_y, pos_z; /* temporary position variables */
|
||||||
double vel_x, vel_y, vel_z; /* temporary velocity variables */
|
double vel_x, vel_y, vel_z; /* temporary velocity variables */
|
||||||
|
@ -46,13 +55,25 @@ struct flight_params {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/* General interface to the flight model routines */
|
||||||
|
|
||||||
|
/* Initialize the flight model parameters */
|
||||||
|
int fgFlightModelInit(int model);
|
||||||
|
|
||||||
|
/* Run an iteration of the flight model */
|
||||||
|
int fgFlightModelUpdate(int model);
|
||||||
|
|
||||||
|
|
||||||
#endif FLIGHT_H
|
#endif FLIGHT_H
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.2 1997/05/23 15:40:37 curt
|
/* Revision 1.3 1997/05/29 02:32:25 curt
|
||||||
/* Added GNU copyright headers.
|
/* Starting to build generic flight model interface.
|
||||||
/*
|
/*
|
||||||
|
* Revision 1.2 1997/05/23 15:40:37 curt
|
||||||
|
* Added GNU copyright headers.
|
||||||
|
*
|
||||||
* Revision 1.1 1997/05/16 16:04:45 curt
|
* Revision 1.1 1997/05/16 16:04:45 curt
|
||||||
* Initial revision.
|
* Initial revision.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue