Skip to content

Commit

Permalink
try to compile jsbsim with arduimu
Browse files Browse the repository at this point in the history
  • Loading branch information
gautierhattenberger committed May 23, 2011
1 parent 56ea7cc commit 0f73cd4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 3 additions & 2 deletions conf/airframes/ENAC/fixed-wing/funjet3.xml
Expand Up @@ -22,6 +22,7 @@
<!--define name="BARO_ETS_TELEMETRY"/-->
</load>
<load name="alt_filter.xml"/>
<load name="generic_com.xml"/>
</modules>

<firmware name="fixedwing">
Expand All @@ -43,7 +44,7 @@
</subsystem>

<!-- Communication -->
<subsystem name="telemetry" type="transparent"/>
<subsystem name="telemetry" type="xbee_api"/>

<!-- Actuators are automatically chosen according to board-->
<subsystem name="control" type="new"/>
Expand Down Expand Up @@ -208,7 +209,7 @@
<!--define name="ROLL_RESPONSE_FACTOR" value="10"/>
<define name="MAX_ROLL_DOT" value="20" unit="rad/s"/-->
<define name="JSBSIM_MODEL" value="&quot;Malolo1&quot;"/>
<define name="JSBSIM_INIT" value="&quot;Malolo1-IC&quot;"/>
<!--define name="JSBSIM_INIT" value="&quot;Malolo1-IC&quot;"/-->
<define name="JSBSIM_LAUNCHSPEED" value="15.0"/>
<define name="JSBSIM_IR_ROLL_NEUTRAL" value="RadOfDeg(0.)"/>
<define name="JSBSIM_IR_PITCH_NEUTRAL" value="RadOfDeg(0.)"/>
Expand Down
2 changes: 1 addition & 1 deletion conf/autopilot/subsystems/fixedwing/autopilot.makefile
Expand Up @@ -211,7 +211,7 @@ jsbsim.CFLAGS += -I$(SIMDIR) -I/usr/include -I$(JSBSIM_INC) -I$(OCAMLLIBDIR) `
jsbsim.LDFLAGS += `pkg-config glib-2.0 --libs` -lm -lpcre -lglibivy -L/usr/lib -lJSBSim

jsbsim.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport
jsbsim.srcs += downlink.c $(SRC_FIRMWARE)/datalink.c $(SRC_ARCH)/jsbsim_hw.c $(SRC_ARCH)/jsbsim_gps.c $(SRC_ARCH)/ivy_transport.c $(SRC_ARCH)/jsbsim_transport.c
jsbsim.srcs += downlink.c $(SRC_FIRMWARE)/datalink.c $(SRC_ARCH)/jsbsim_hw.c $(SRC_ARCH)/jsbsim_ir.c $(SRC_ARCH)/jsbsim_gps.c $(SRC_ARCH)/ivy_transport.c $(SRC_ARCH)/jsbsim_transport.c

jsbsim.srcs += subsystems/settings.c
jsbsim.srcs += $(SRC_ARCH)/subsystems/settings_arch.c
Expand Down
8 changes: 6 additions & 2 deletions sw/airborne/arch/sim/jsbsim_ir.c
Expand Up @@ -7,6 +7,7 @@

#include "jsbsim_hw.h"
#include <math.h>
#include "estimator.h"

#ifndef JSBSIM_IR_ROLL_NEUTRAL
#define JSBSIM_IR_ROLL_NEUTRAL 0.
Expand All @@ -15,15 +16,18 @@
#define JSBSIM_IR_PITCH_NEUTRAL 0.
#endif

void set_ir(double roll, double pitch) {
void set_ir(double roll __attribute__ ((unused)), double pitch __attribute__ ((unused))) {

#ifdef USE_INFRARED
double ir_contrast = 150; //FIXME
double roll_sensor = roll + JSBSIM_IR_ROLL_NEUTRAL; // ir_roll_neutral;
double pitch_sensor = pitch + JSBSIM_IR_PITCH_NEUTRAL; // ir_pitch_neutral;
#ifdef USE_INFRARED
infrared.roll = sin(roll_sensor) * ir_contrast;
infrared.pitch = sin(pitch_sensor) * ir_contrast;
infrared.top = cos(roll_sensor) * cos(pitch_sensor) * ir_contrast;
#else
estimator_phi = roll; // - ins_roll_neutral;
estimator_theta = pitch; // - ins_pitch_neutral;
#endif

}
Expand Down

0 comments on commit 0f73cd4

Please sign in to comment.