|
Paparazzi UAS
v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
|
#include "nps_flightgear.h"#include <sys/socket.h>#include <sys/time.h>#include <errno.h>#include <time.h>#include <netdb.h>#include <netinet/in.h>#include <arpa/inet.h>#include <stdio.h>#include <math.h>#include <stdlib.h>#include <pthread.h>#include "std.h"#include "../flight_gear.h"#include "nps_main.h"#include "nps_fdm.h"#include "nps_atmosphere.h"
Include dependency graph for nps_flightgear.c:Go to the source code of this file.
Functions | |
| void * | nps_flightgear_receive (void *data) |
| Receive Flight Gear environment messages. More... | |
| double | htond (double x) |
| float | htonf (float x) |
| void | nps_flightgear_init (const char *host, unsigned int port, unsigned int port_in, unsigned int time_offset) |
| void | nps_flightgear_send_fdm () |
| Send FlightGear FDM packet For visualization with moving surfaces (elevator, propeller etc). More... | |
| void | nps_flightgear_send () |
| Send FlightGear GUI packet For visualization of airplane position and attitude only start fgfs with –native-gui=socket... More... | |
Variables | |
| struct { | |
| int | socket |
| struct sockaddr_in | addr |
| int | socket_in |
| unsigned int | initial_time |
| unsigned int | time_offset |
| } | flightgear |
| pthread_t | th_fg_rx |
| double htond | ( | double | x | ) |
Definition at line 33 of file nps_flightgear.c.
References p.
Referenced by nps_flightgear_send_fdm().
Here is the caller graph for this function:| float htonf | ( | float | x | ) |
Definition at line 44 of file nps_flightgear.c.
References p.
Referenced by nps_flightgear_send_fdm().
Here is the caller graph for this function:| void nps_flightgear_init | ( | const char * | host, |
| unsigned int | port, | ||
| unsigned int | port_in, | ||
| unsigned int | time_offset | ||
| ) |
Definition at line 52 of file nps_flightgear.c.
References flightgear, nps_flightgear_receive(), and th_fg_rx.
Referenced by nps_flight_gear_loop().
Here is the call graph for this function:
Here is the caller graph for this function:| void * nps_flightgear_receive | ( | void * | data | ) |
Receive Flight Gear environment messages.
Definition at line 231 of file nps_flightgear.c.
References fdm_mutex, flightgear, nps_atmosphere_set_wind_ned(), TRUE, FGEnvironment::wind_from_down, FGEnvironment::wind_from_east, and FGEnvironment::wind_from_north.
Referenced by nps_flightgear_init().
Here is the call graph for this function:
Here is the caller graph for this function:| void nps_flightgear_send | ( | ) |
Send FlightGear GUI packet For visualization of airplane position and attitude only start fgfs with –native-gui=socket...
option
This is the default option
Definition at line 179 of file nps_flightgear.c.
References FGNetGUI::agl, LlaCoor_d::alt, FGNetGUI::altitude, FGNetGUI::climb_rate, FGNetGUI::course_deviation_deg, FGNetGUI::cur_time, FGNetGUI::dist_nm, fdm, FG_NET_GUI_VERSION, flightgear, FGNetGUI::fuel_quantity, FGNetGUI::ground_elev, FGNetGUI::gs_deviation_deg, FGNetGUI::in_range, LlaCoor_d::lat, FGNetGUI::latitude, NpsFdm::lla_pos, LlaCoor_d::lon, FGNetGUI::longitude, NpsFdm::ltp_to_body_eulers, FGNetGUI::nav_radial, FGNetGUI::num_tanks, FGNetGUI::padding1, DoubleEulers::phi, FGNetGUI::phi, DoubleEulers::psi, FGNetGUI::psi, DoubleEulers::theta, FGNetGUI::theta, NpsFdm::time, FGNetGUI::tuned_freq, FGNetGUI::vcas, FGNetGUI::version, and FGNetGUI::warp.
Referenced by nps_flight_gear_loop().
Here is the caller graph for this function:| void nps_flightgear_send_fdm | ( | ) |
Send FlightGear FDM packet For visualization with moving surfaces (elevator, propeller etc).
start fgfs with –native-fdm=socket... option
Definition at line 115 of file nps_flightgear.c.
References NpsFdm::agl, FGNetFDM::agl, LlaCoor_d::alt, FGNetFDM::altitude, FGNetFDM::climb_rate, FGNetFDM::cur_time, NpsFdm::elevator, FGNetFDM::elevator, NpsFdm::eng_state, FGNetFDM::eng_state, fdm, FG_NET_FDM_MAX_ENGINES, FG_NET_FDM_VERSION, NpsFdm::flap, flightgear, FGNetFDM::fuel_quantity, htond(), htonf(), LlaCoor_d::lat, FGNetFDM::latitude, NpsFdm::left_aileron, FGNetFDM::left_aileron, FGNetFDM::left_flap, NpsFdm::lla_pos, LlaCoor_d::lon, FGNetFDM::longitude, NpsFdm::ltp_to_body_eulers, NpsFdm::num_engines, FGNetFDM::num_engines, FGNetFDM::num_tanks, DoubleEulers::phi, FGNetFDM::phi, DoubleEulers::psi, FGNetFDM::psi, NpsFdm::right_aileron, FGNetFDM::right_aileron, FGNetFDM::right_flap, NpsFdm::rpm, FGNetFDM::rpm, NpsFdm::rudder, FGNetFDM::rudder, DoubleEulers::theta, FGNetFDM::theta, NpsFdm::time, FGNetFDM::vcas, FGNetFDM::version, and FGNetFDM::warp.
Referenced by nps_flight_gear_loop().
Here is the call graph for this function:
Here is the caller graph for this function:| struct { ... } flightgear |
Referenced by nps_flightgear_init(), nps_flightgear_receive(), nps_flightgear_send(), and nps_flightgear_send_fdm().
| pthread_t th_fg_rx |
Definition at line 29 of file nps_flightgear.c.
Referenced by nps_flightgear_init().