Paparazzi UAS  v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
nps_main_hitl.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "termios.h"
#include <fcntl.h>
#include <unistd.h>
#include "paparazzi.h"
#include "pprzlink/messages.h"
#include "pprzlink/dl_protocol.h"
#include "pprzlink/pprz_transport.h"
#include "generated/airframe.h"
#include "nps_main.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"
#include "nps_ins.h"
+ Include dependency graph for nps_main_hitl.c:

Go to the source code of this file.

Macros

#define NPS_MAX_MSG_SIZE   512
 

Functions

void * nps_ins_data_loop (void *data)
 
void * nps_ap_data_loop (void *data)
 
int main (int argc, char **argv)
 
void nps_radio_and_autopilot_init (void)
 
void nps_update_launch_from_dl (uint8_t value)
 
void nps_main_run_sim_step (void)
 
void * nps_main_loop (void *data)
 

Variables

pthread_t th_ins_data
 
pthread_t th_ap_data
 

Macro Definition Documentation

#define NPS_MAX_MSG_SIZE   512

Definition at line 57 of file nps_main_hitl.c.

Referenced by nps_ap_data_loop().

Function Documentation

int main ( int  argc,
char **  argv 
)
void * nps_ap_data_loop ( void *  data)

Definition at line 188 of file nps_main_hitl.c.

References cmd_buf, NpsAutopilot::commands, fd, fdm_mutex, MAX_PPRZ, nps_autopilot, NPS_COMMANDS_NB, NPS_MAX_MSG_SIZE, and TRUE.

Referenced by main().

+ Here is the caller graph for this function:

void * nps_ins_data_loop ( void *  data)

Definition at line 108 of file nps_main_hitl.c.

References clock_get_current_time, fd, fdm, fdm_mutex, idx, ins_buffer, INS_FREQUENCY, nps_ins_fetch_data(), nps_ins_fill_buffer(), nps_ins_init(), and TRUE.

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void* nps_main_loop ( void *  data)

Definition at line 305 of file nps_main_hitl.c.

References clock_get_current_time, fdm, fdm_mutex, nps_main, nps_main_run_sim_step(), ntime_to_double(), SIM_DT, NpsMain::sim_time, NpsFdm::time, and TRUE.

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void nps_main_run_sim_step ( void  )

Definition at line 99 of file nps_main_hitl.c.

References NpsAutopilot::commands, NpsAutopilot::launch, nps_atmosphere_update(), nps_autopilot, NPS_COMMANDS_NB, nps_fdm_run_step(), nps_main, nps_sensors_run_step(), SIM_DT, and NpsMain::sim_time.

Referenced by nps_main_loop().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void nps_radio_and_autopilot_init ( void  )

Definition at line 75 of file nps_main_hitl.c.

References JOYSTICK, NpsMain::js_dev, NORC, NpsMain::norc, nps_autopilot_init(), nps_main, NpsMain::rc_script, SCRIPT, SPEKTRUM, and NpsMain::spektrum_dev.

+ Here is the call graph for this function:

void nps_update_launch_from_dl ( uint8_t  value)

Definition at line 93 of file nps_main_hitl.c.

References NpsAutopilot::launch, and nps_autopilot.

Variable Documentation

pthread_t th_ap_data

Definition at line 55 of file nps_main_hitl.c.

pthread_t th_ins_data

Definition at line 54 of file nps_main_hitl.c.