30 #include "generated/airframe.h"
42 int main(
int argc,
char **argv)
80 struct timespec requestStart;
81 struct timespec requestEnd;
82 struct timespec waitFor;
83 long int period_ns =
SIM_DT * 1000000000L;
88 struct timespec startTime;
89 struct timespec realTime;
104 real_time = real_secs - start_secs;
121 task_ns = (requestEnd.tv_sec - requestStart.tv_sec) * 1000000000L + (requestEnd.tv_nsec - requestStart.tv_nsec);
124 if (task_ns < period_ns) {
126 waitFor.tv_nsec = period_ns - task_ns;
127 nanosleep(&waitFor, NULL);
131 printf(
"MAIN THREAD: task took longer than one period, exactly %f [ms], but the period is %f [ms]\n",
132 (
double)task_ns / 1E6, (
double)period_ns / 1E6);
void nps_atmosphere_update(double dt)
Atmosphere model (pressure, wind) for NPS.
double commands[NPS_COMMANDS_NB]
#define NPS_COMMANDS_NB
Number of commands sent to the FDM of NPS.
void nps_fdm_run_step(bool launch, double *commands, int commands_nb)
Minimum complexity flight dynamic model In legacy Paparazzi simulator, was implemented in OCaml and c...
struct NpsFdm fdm
Holds all necessary NPS FDM state information.
void nps_hitl_impl_init(void)
END pprzlink_dev.
void * nps_flight_gear_loop(void *data)
#define clock_get_current_time(_x)
int nps_main_init(int argc, char **argv)
void * nps_main_display(void *data)
pthread_mutex_t fdm_mutex
double ntime_to_double(struct timespec *t)
struct NpsAutopilot nps_autopilot
#ifndef NPS_NO_MOTOR_MIXING #include "modules/actuators/motor_mixing.h"
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)
void nps_sensors_run_step(double time)
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.