![]() |
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Mission Computer module, interfacing the mission computer (also known as Copilot), based losely on ISaAC: The Intelligent Safety and Airworthiness Co-Pilot module Based on paper "A Payload Verification and Management Framework for Small UAV-based Personal Remote Sensing Systems" by Cal Coopmans and Chris Coffin. More...
#include "modules/datalink/datalink.h"
#include "modules/datalink/extra_pprz_dl.h"
#include "modules/core/threads.h"
Go to the source code of this file.
Data Structures | |
struct | CameraPayload |
struct | CameraSnapshot |
struct | CopilotStatus |
Functions | |
void | copilot_init (void) |
Init function. | |
void | copilot_periodic (void) |
Periodic function. | |
void | copilot_parse_cam_snapshot_dl (uint8_t *buf) |
Message processing functions. | |
void | copilot_parse_cam_payload_dl (uint8_t *buf) |
copy CAMERA_PAYLOAD message and mark it to be sent | |
void | copilot_parse_copilot_status_dl (uint8_t *buf) |
copy COPILOT_STATUS message and mark it to be sent | |
void | copilot_parse_move_wp_dl (uint8_t *buf) |
If MOVE_WP from GCS. | |
void | copilot_parse_payload_command_dl (uint8_t *buf) |
Pass through PAYLOAD_COMMAND message and send it as PAYLOAD msg over telemetry. | |
Variables | |
pprz_mutex_t | copilot_cam_snapshot_mtx |
pprz_mutex_t | copilot_cam_payload_mtx |
pprz_mutex_t | copilot_status_mtx |
bool | send_cam_snapshot |
bool | send_cam_payload |
bool | send_copilot_status |
Mission Computer module, interfacing the mission computer (also known as Copilot), based losely on ISaAC: The Intelligent Safety and Airworthiness Co-Pilot module Based on paper "A Payload Verification and Management Framework for Small UAV-based Personal Remote Sensing Systems" by Cal Coopmans and Chris Coffin.
Link: http://ieeexplore.ieee.org/abstract/document/6309316/
More info can be found on http://wiki.paparazziuav.org/wiki/Mission_computer
Copilot is intended mainly for mapping applications.
This module processes messages from Copilot, and either forwards them to the GCS (such as CAMERA_SNAPSHOT or CAMERA_PAYLOAD messages), or responds to them as necessary (such as MOVE_WP).
The module assumes the source of the messages is trusted (i.e. not authentication besides AC_ID check is performed).
Definition in file copilot.h.
struct CameraPayload |
struct CameraSnapshot |
struct CopilotStatus |
Init function.
Definition at line 60 of file copilot_common.c.
References cam_payload, cam_snapshot, copilot_cam_payload_mtx, copilot_cam_snapshot_mtx, copilot_status, copilot_status_mtx, foo, pprz_mtx_init(), send_cam_payload, send_cam_snapshot, and send_copilot_status.
copy CAMERA_PAYLOAD message and mark it to be sent
Definition at line 147 of file copilot_common.c.
References cam_payload, copilot_cam_payload_mtx, CameraPayload::door_status, CameraPayload::error_code, foo, pprz_mtx_lock(), pprz_mtx_unlock(), send_cam_payload, CameraPayload::timestamp, CameraPayload::used_disk, and CameraPayload::used_mem.
Message processing functions.
Message processing functions.
In case of multiple cameras, it is up to the payload computer to send CAMERA_SNAPSHOT messages for each camera at proper interval, so the values don't get overwritten.
Definition at line 127 of file copilot_common.c.
References CameraSnapshot::array_temp, CameraSnapshot::cam_id, cam_snapshot, CameraSnapshot::cam_state, copilot_cam_snapshot_mtx, foo, CameraSnapshot::lens_temp, pprz_mtx_lock(), pprz_mtx_unlock(), send_cam_snapshot, CameraSnapshot::snapshot_num, and CameraSnapshot::snapshot_valid.
copy COPILOT_STATUS message and mark it to be sent
Definition at line 165 of file copilot_common.c.
References copilot_status, copilot_status_mtx, CopilotStatus::error_code, foo, pprz_mtx_lock(), pprz_mtx_unlock(), send_copilot_status, CopilotStatus::status, CopilotStatus::timestamp, CopilotStatus::used_disk, and CopilotStatus::used_mem.
If MOVE_WP from GCS.
If MOVE_WP from extra_dl
In both cases, the MOVE_WP message was already processed in firmware_parse here we are taking care only about propagating the change
Definition at line 67 of file copilot_fixedwing.c.
References LlaCoor_f::alt, LlaCoor_i::alt, DefaultChannel, DefaultDevice, dl_buffer, extra_dl_buffer, extra_pprz_tp, foo, LlaCoor_f::lat, LlaCoor_i::lat, LlaCoor_f::lon, LlaCoor_i::lon, nav_utm_east0, nav_utm_north0, nav_utm_zone0, nb_waypoint, stateGetHmslOrigin_i(), stateGetLlaOrigin_i(), stateIsLocalCoordinateValid(), utm_of_lla_f(), waypoint_is_global(), waypoints, point::x, point::y, and UtmCoor_f::zone.
Pass through PAYLOAD_COMMAND message and send it as PAYLOAD msg over telemetry.
Definition at line 184 of file copilot_common.c.
References DefaultChannel, DefaultDevice, dl_buffer, extra_dl_buffer, extra_pprz_tp, and foo.
Periodic function.
Definition at line 76 of file copilot_common.c.
References CameraSnapshot::array_temp, CameraSnapshot::cam_id, cam_payload, cam_snapshot, CameraSnapshot::cam_state, copilot_cam_payload_mtx, copilot_cam_snapshot_mtx, copilot_status, copilot_status_mtx, DefaultChannel, DefaultDevice, CameraPayload::door_status, CameraPayload::error_code, CopilotStatus::error_code, foo, CameraSnapshot::lens_temp, pprz_mtx_lock(), pprz_mtx_unlock(), send_cam_payload, send_cam_snapshot, send_copilot_status, CameraSnapshot::snapshot_num, CameraSnapshot::snapshot_valid, CopilotStatus::status, CameraPayload::timestamp, CopilotStatus::timestamp, CameraPayload::used_disk, CopilotStatus::used_disk, CameraPayload::used_mem, and CopilotStatus::used_mem.
|
extern |
Definition at line 56 of file copilot_common.c.
Referenced by copilot_init(), copilot_parse_cam_payload_dl(), and copilot_periodic().
|
extern |
Definition at line 55 of file copilot_common.c.
Referenced by copilot_init(), copilot_parse_cam_snapshot_dl(), and copilot_periodic().
|
extern |
Definition at line 57 of file copilot_common.c.
Referenced by copilot_init(), copilot_parse_copilot_status_dl(), and copilot_periodic().
|
extern |
Definition at line 48 of file copilot_common.c.
Referenced by copilot_init(), copilot_parse_cam_payload_dl(), and copilot_periodic().
|
extern |
Definition at line 47 of file copilot_common.c.
Referenced by copilot_init(), copilot_parse_cam_snapshot_dl(), and copilot_periodic().
|
extern |
Definition at line 49 of file copilot_common.c.
Referenced by copilot_init(), copilot_parse_copilot_status_dl(), and copilot_periodic().