Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
exif_module.c File Reference
#include "exif_module.h"
#include "state.h"
#include "subsystems/gps.h"
#include <libexif/exif-data.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+ Include dependency graph for exif_module.c:

Go to the source code of this file.

Macros

#define image_data_len   (image_jpg_len - image_data_offset)
 
#define FILE_BYTE_ORDER   EXIF_BYTE_ORDER_INTEL
 
#define FILE_COMMENT   "Paparazzi autopilot"
 
#define ASCII_COMMENT   "ASCII\0\0\0"
 

Functions

void push_gps_to_vision (void)
 
static ExifEntry * init_tag (ExifData *exif, ExifIfd ifd, ExifTag tag)
 
static ExifEntry * create_tag (ExifData *exif, ExifIfd ifd, ExifTag tag, size_t len)
 
int write_exif_jpeg (char *filename, const unsigned char *image_jpg, const unsigned int image_jpg_len, const unsigned int image_jpg_x, const unsigned int image_jpg_y)
 

Variables

volatile int32_t lat_em7deg = 0
 
volatile int32_t lon_em7deg = 0
 
volatile int32_t alt_mm = 0
 
static const unsigned int image_data_offset = 2
 
static const unsigned char exif_header []
 
static const unsigned int exif_header_len = sizeof(exif_header)
 

Macro Definition Documentation

◆ ASCII_COMMENT

#define ASCII_COMMENT   "ASCII\0\0\0"

Definition at line 141 of file exif_module.c.

◆ FILE_BYTE_ORDER

#define FILE_BYTE_ORDER   EXIF_BYTE_ORDER_INTEL

Definition at line 135 of file exif_module.c.

◆ FILE_COMMENT

#define FILE_COMMENT   "Paparazzi autopilot"

Definition at line 138 of file exif_module.c.

◆ image_data_len

#define image_data_len   (image_jpg_len - image_data_offset)

Definition at line 125 of file exif_module.c.

Function Documentation

◆ create_tag()

static ExifEntry* create_tag ( ExifData *  exif,
ExifIfd  ifd,
ExifTag  tag,
size_t  len 
)
static

Definition at line 89 of file exif_module.c.

Referenced by write_exif_jpeg().

+ Here is the caller graph for this function:

◆ init_tag()

static ExifEntry* init_tag ( ExifData *  exif,
ExifIfd  ifd,
ExifTag  tag 
)
static

Definition at line 56 of file exif_module.c.

Referenced by write_exif_jpeg().

+ Here is the caller graph for this function:

◆ push_gps_to_vision()

void push_gps_to_vision ( void  )

Definition at line 38 of file exif_module.c.

References alt_mm, c(), gps, GpsState::hmsl, lat_em7deg, lon_em7deg, and stateGetPositionLla_i().

+ Here is the call graph for this function:

◆ write_exif_jpeg()

int write_exif_jpeg ( char *  filename,
const unsigned char *  image_jpg,
const unsigned int  image_jpg_len,
const unsigned int  image_jpg_x,
const unsigned int  image_jpg_y 
)

Definition at line 146 of file exif_module.c.

References LlaCoor_i::alt, alt_mm, ASCII_COMMENT, create_tag(), exif_header, exif_header_len, f, FILE_BYTE_ORDER, FILE_COMMENT, image_data_len, image_data_offset, init_tag(), LlaCoor_i::lat, lat_em7deg, LlaCoor_i::lon, and lon_em7deg.

Referenced by save_shot_on_disk(), and video_capture_save().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ alt_mm

volatile int32_t alt_mm = 0

Definition at line 33 of file exif_module.c.

Referenced by jevois_send_state(), push_gps_to_vision(), and write_exif_jpeg().

◆ exif_header

const unsigned char exif_header[]
static
Initial value:
= {
0xff, 0xd8, 0xff, 0xe1
}

Definition at line 128 of file exif_module.c.

Referenced by write_exif_jpeg().

◆ exif_header_len

const unsigned int exif_header_len = sizeof(exif_header)
static

Definition at line 132 of file exif_module.c.

Referenced by write_exif_jpeg().

◆ image_data_offset

const unsigned int image_data_offset = 2
static

Definition at line 124 of file exif_module.c.

Referenced by write_exif_jpeg().

◆ lat_em7deg

volatile int32_t lat_em7deg = 0

Definition at line 31 of file exif_module.c.

Referenced by push_gps_to_vision(), and write_exif_jpeg().

◆ lon_em7deg

volatile int32_t lon_em7deg = 0

Definition at line 32 of file exif_module.c.

Referenced by push_gps_to_vision(), and write_exif_jpeg().