Paparazzi UAS
v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <glib.h>
#include <sys/time.h>
#include <getopt.h>
#include "nps_main.h"
#include "nps_fdm.h"
#include "nps_sensors.h"
#include "nps_atmosphere.h"
#include "nps_autopilot.h"
#include "nps_ivy.h"
#include "nps_flightgear.h"
#include "mcu_periph/sys_time.h"
Go to the source code of this file.
Macros | |
#define | SIM_DT (1./SYS_TIME_FREQUENCY) |
#define | DISPLAY_DT (1./30.) |
#define | HOST_TIMEOUT_MS 40 |
Functions | |
static bool | nps_main_parse_options (int argc, char **argv) |
static void | nps_main_init (void) |
static void | nps_main_display (void) |
static void | nps_main_run_sim_step (void) |
static gboolean | nps_main_periodic (gpointer data) |
void | tstp_hdl (int n) |
void | cont_hdl (int n) |
double | time_to_double (struct timeval *t) |
int | main (int argc, char **argv) |
void | nps_set_time_factor (float time_factor) |
Variables | |
struct { | |
double | real_initial_time |
double | scaled_initial_time |
double | host_time_factor |
double | sim_time |
double | display_time |
char * | fg_host |
unsigned int | fg_port |
unsigned int | fg_port_in |
unsigned int | fg_time_offset |
int | fg_fdm |
char * | js_dev |
char * | spektrum_dev |
int | rc_script |
char * | ivy_bus |
} | nps_main |
int | pauseSignal = 0 |
#define DISPLAY_DT (1./30.) |
Definition at line 40 of file nps_main.c.
Referenced by nps_main_periodic().
#define HOST_TIMEOUT_MS 40 |
Definition at line 41 of file nps_main.c.
Referenced by main().
#define SIM_DT (1./SYS_TIME_FREQUENCY) |
Definition at line 39 of file nps_main.c.
Referenced by nps_main_init(), nps_main_periodic(), and nps_main_run_sim_step().
void cont_hdl | ( | int | n | ) |
Definition at line 80 of file nps_main.c.
References tstp_hdl().
Referenced by main().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 92 of file nps_main.c.
References cont_hdl(), FALSE, HOST_TIMEOUT_MS, nps_main, nps_main_init(), nps_main_parse_options(), nps_main_periodic(), and tstp_hdl().
|
static |
Definition at line 176 of file nps_main.c.
References nps_flightgear_receive(), nps_flightgear_send(), nps_flightgear_send_fdm(), nps_ivy_display(), and nps_main.
Referenced by nps_main_periodic().
|
static |
Definition at line 118 of file nps_main.c.
References JOYSTICK, nps_atmosphere_init(), nps_autopilot_init(), nps_fdm_init(), nps_flightgear_init(), nps_ivy_init(), nps_main, nps_sensors_init(), SCRIPT, SIM_DT, SPEKTRUM, and time_to_double().
Referenced by main().
|
static |
Definition at line 297 of file nps_main.c.
References nps_main, and TRUE.
Referenced by main().
|
static |
Definition at line 220 of file nps_main.c.
References DISPLAY_DT, nps_main, nps_main_display(), nps_main_run_sim_step(), SIM_DT, time_to_double(), and TRUE.
Referenced by main().
|
static |
Definition at line 159 of file nps_main.c.
References autopilot, NpsAutopilot::commands, NpsAutopilot::launch, nps_atmosphere_update(), nps_autopilot_run_step(), nps_autopilot_run_systime_step(), NPS_COMMANDS_NB, nps_fdm_run_step(), nps_main, nps_sensors_run_step(), and SIM_DT.
Referenced by nps_main_periodic().
void nps_set_time_factor | ( | float | time_factor | ) |
Definition at line 192 of file nps_main.c.
References nps_main, and time_to_double().
Referenced by on_WORLD_ENV().
double time_to_double | ( | struct timeval * | t | ) |
Definition at line 87 of file nps_main.c.
Referenced by nps_main_init(), nps_main_periodic(), and nps_set_time_factor().
void tstp_hdl | ( | int | n | ) |
Definition at line 69 of file nps_main.c.
Referenced by cont_hdl(), and main().
struct { ... } nps_main |
int pauseSignal = 0 |
Definition at line 67 of file nps_main.c.