mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-27 17:06:31 +08:00
[sim] moving the old ocaml simulator to NPS (#3167)
- the exact same basic model is now a NPS FDM - sim target still woks, it is just an alias to NPS with the proper FDM - the old ocaml files are removed - AHRS and INS are bypassed, since the accelerations are not well calculated by the model
This commit is contained in:
committed by
GitHub
parent
dfb08fa733
commit
41451d5422
@@ -10,7 +10,7 @@
|
||||
<depends>actuators</depends>
|
||||
<provides>actuators</provides>
|
||||
</dep>
|
||||
<makefile target="nps">
|
||||
<makefile target="sim|nps">
|
||||
<file_arch name="actuators_pwm_arch.c"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="fdm_fixedwing_sim" dir="fdm">
|
||||
<doc>
|
||||
<description>
|
||||
Basic fixedwing FDM for NPS simulator
|
||||
|
||||
This flight dynamic model is the copy of the legacy simulator that was written in OCaml.
|
||||
Its only purpose is to allow to test the flight plans with a very simple airplane model.
|
||||
</description>
|
||||
</doc>
|
||||
<header/>
|
||||
<makefile target="sim|nps|hitl">
|
||||
<define name="NPS_BYPASS_AHRS" value="TRUE"/>
|
||||
<define name="NPS_BYPASS_INS" value="TRUE"/>
|
||||
<file name="nps_fdm_fixedwing_sim.c" dir="nps"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<makefile target="!fbw">
|
||||
<file name="main_ap.c" dir="."/>
|
||||
</makefile>
|
||||
<makefile target="nps">
|
||||
<makefile target="sim|nps">
|
||||
<define name="AP"/>
|
||||
<file name="nps_autopilot_fixedwing.c" dir="nps"/>
|
||||
</makefile>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</header>
|
||||
<init fun="gps_nps_init()"/>
|
||||
<periodic fun="gps_nps_periodic_check()" freq="1." autorun="TRUE"/>
|
||||
<makefile target="nps">
|
||||
<makefile target="sim|nps">
|
||||
<file name="gps_sim_nps.c"/>
|
||||
<define name="GPS_TYPE_H" value="modules/gps/gps_sim_nps.h" type="string"/>
|
||||
<test>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
</header>
|
||||
<init fun="imu_init()"/>
|
||||
|
||||
<makefile target="!sim|fbw">
|
||||
<makefile target="!fbw">
|
||||
<define name="USE_IMU"/>
|
||||
<file name="imu.c"/>
|
||||
<test/>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<init fun="imu_nps_init()"/>
|
||||
<event fun="imu_nps_event()"/>
|
||||
|
||||
<makefile target="nps">
|
||||
<makefile target="sim|nps">
|
||||
<file name="imu_nps.c"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
@@ -17,8 +17,5 @@
|
||||
<makefile target="ap">
|
||||
<file name="ins_arduimu.c"/>
|
||||
</makefile>
|
||||
<makefile target="sim">
|
||||
<file_arch name="ins_arduimu.c"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
|
||||
@@ -29,8 +29,5 @@
|
||||
<makefile target="ap">
|
||||
<file name="ins_arduimu_basic.c"/>
|
||||
</makefile>
|
||||
<makefile target="sim">
|
||||
<file_arch name="ins_arduimu_basic.c"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<file name="ins_gps_passthrough.h"/>
|
||||
</header>
|
||||
<init fun="ins_gps_passthrough_init()"/>
|
||||
<makefile target="nps">
|
||||
<makefile target="sim|nps">
|
||||
<file name="imu.c" dir="modules/imu"/>
|
||||
<file name="imu_nps.c" dir="modules/imu"/>
|
||||
<define name="USE_IMU"/>
|
||||
@@ -34,7 +34,7 @@
|
||||
<file name="ins.c"/>
|
||||
<file name="ins_gps_passthrough.c"/>
|
||||
</makefile>
|
||||
<makefile target="nps" firmware="fixedwing">
|
||||
<makefile target="sim|nps" firmware="fixedwing">
|
||||
<define name="INS_TYPE_H" value="modules/ins/ins_gps_passthrough.h" type="string"/>
|
||||
<file name="ins.c"/>
|
||||
<file name="ins_gps_passthrough_utm.c"/>
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
<define name="USE_COMMANDS"/>
|
||||
<file_arch name="sys_time_arch.c" dir="mcu_periph"/>
|
||||
<file_arch name="led_hw.c" dir="." cond="ifeq ($(ARCH), stm32)"/>
|
||||
<file_arch name="led_hw.c" dir="." cond="ifeq ($(TARGET), sim)"/>
|
||||
<flag name="LDFLAGS" value="lrt" cond="ifeq ($(ARCH), linux)"/>
|
||||
<raw>
|
||||
VPATH += $(PAPARAZZI_HOME)/var/share
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<provides>baro,airspeed,sonar,incidence,temperature</provides>
|
||||
<suggests>gps_nps,imu_nps,ins_nps,actuators_nps,telemetry_nps</suggests>
|
||||
</dep>
|
||||
<makefile target="nps">
|
||||
<makefile target="sim|nps">
|
||||
<define name="AP"/>
|
||||
<define name="SITL"/>
|
||||
<file name="nps_electrical.c" dir="$(NPS_DIR)"/>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<dep>
|
||||
<depends>math</depends>
|
||||
</dep>
|
||||
<makefile target="nps|hitl">
|
||||
<makefile target="sim|nps|hitl">
|
||||
<configure name="BARO_PERIODIC_FREQUENCY" default="50"/>
|
||||
<configure name="NPS_DIR" value="nps"/>
|
||||
<raw>
|
||||
|
||||
@@ -11,26 +11,9 @@
|
||||
</description>
|
||||
</doc>
|
||||
<dep>
|
||||
<depends>system_core,electrical,settings,actuators_dummy,@gps,@ins,@ahrs</depends>
|
||||
<suggests>gps_sim,imu_sim,ins_sim,ahrs_sim,baro_sim,telemetry_sim</suggests>
|
||||
<depends>targets/nps,fdm_fixedwing_sim</depends>
|
||||
</dep>
|
||||
<makefile target="sim">
|
||||
<define name="SITL"/>
|
||||
<define name="AP"/>
|
||||
<file name="main_bare.c" dir="."/>
|
||||
<file_arch name="sim_ap.c" dir="."/>
|
||||
<file_arch name="sim_gps.c" dir="."/>
|
||||
<file_arch name="sim_adc_generic.c" dir="."/>
|
||||
<file_arch name="sim_ahrs.c" dir="."/>
|
||||
<file_arch name="sim_airspeed.c" dir="."/>
|
||||
<raw>
|
||||
UNAME = $(shell uname -s)
|
||||
ifeq ("$(UNAME)","Darwin")
|
||||
sim.CFLAGS += $(shell if test -d /opt/paparazzi/include; then echo "-I/opt/paparazzi/include"; elif test -d /opt/local/include; then echo "-I/opt/local/include"; fi)
|
||||
endif
|
||||
|
||||
sim.CFLAGS += $(CPPFLAGS)
|
||||
</raw>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
</header>
|
||||
<init fun="pprz_dl_init()"/>
|
||||
<event fun="pprz_dl_event()"/>
|
||||
<makefile target="nps">
|
||||
<makefile target="sim|nps">
|
||||
<configure name="MODEM_DEV" default="UDP0" case="upper|lower"/>
|
||||
<configure name="MODEM_PORT_OUT" default="4242"/>
|
||||
<configure name="MODEM_PORT_IN" default="4243"/>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<file_arch name="udp_arch.c" dir="mcu_periph"/>
|
||||
<file name="udp_socket.c" dir="arch/linux" cond="ifeq ($(ARCH), linux)"/>
|
||||
</makefile>
|
||||
<makefile target="nps">
|
||||
<makefile target="sim|nps">
|
||||
<include name="arch/linux"/>
|
||||
<file name="udp_socket.c" dir="arch/linux"/>
|
||||
</makefile>
|
||||
|
||||
Reference in New Issue
Block a user