#include <stdio.h>
#define TAKEOFF_ALT 10
#define DEST_LAT -35.361354
#define DEST_LONG 149.166218
#define DEST_ALT 20
#define GT_MARGIN(_lval, _rval) \
(_lval > (_rval * 0.95)) \
static void
{
int err;
if (err < 0) {
return;
}
printf(">>>> Taking off.\n");
}
static void
{
int err;
if (err < 0) {
return;
}
printf("lat: %f, long: %f, alt: %f\n", pos.latitude, pos.longitude,
pos.altitude);
}
static void
{
int err;
if (err < 0) {
return;
}
return;
printf(">>>> Going back home.\n");
if (err < 0) {
return;
}
if (err < 0) {
}
if (err < 0) {
SOL_ERR(
"Could not send vehicle to: (%f, %f, %f) - %s",
return;
}
printf(">>>> Successful takeoff, starting a new mission, heading to: "
}
}
static void
{
int err;
if (err < 0) {
}
}
}
static void
{
printf(">>>> Landed...\n");
}
static void
{
}
}
static void
{
int err;
SOL_INF(
"mavlink connection stablished");
if (err < 0) {
}
return;
}
if (err < 0) {
}
return;
}
}
int
main(
int argc,
char *argv[])
{
};
.handlers = &mavlink_handlers,
};
if (argc < 2) {
SOL_ERR(
"Usage: %s <address>", argv[0]);
goto err;
}
if (!mavlink) {
SOL_ERR(
"Unable to stablish a Mavlink connection");
goto err;
}
return EXIT_SUCCESS;
err:
return EXIT_FAILURE;
}