Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
qjs-wrapper
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
qjs-wrapper
Commits
db6b63bd
Commit
db6b63bd
authored
Oct 20, 2023
by
Léo-Paul Géneau
👾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
autopilot_wrapper.h: define autopilot's API here
parent
bdcd7d44
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
0 deletions
+61
-0
include/autopilot_wrapper.h
include/autopilot_wrapper.h
+61
-0
No files found.
include/autopilot_wrapper.h
0 → 100644
View file @
db6b63bd
#ifndef __AUTOPILOT_H__
#define __AUTOPILOT_H__
#ifndef DLL_PUBLIC
#define DLL_PUBLIC __attribute__ ((visibility ("default")))
#endif
/*
* 0. latitude (double, degrees)
* 1. longitude (double, degrees)
* 2. absolute altitude (double, meters)
* 3. relative altitude (double, meters)
* 4. timestamp (double, milliseconds)
*/
#define POSITION_ARRAY_SIZE 5
/*
* 0. yaw angle (float, degrees)
* 1. air speed (float, m/s)
* 2. climb rate (float, m/s)
*/
#define SPEED_ARRAY_SIZE 3
#ifdef __cplusplus
extern
"C"
{
#endif
#include <stdint.h>
// Connexion management functions
DLL_PUBLIC
int
start
(
const
char
*
ip
,
int
port
,
const
char
*
log_file
,
int
timeout
);
DLL_PUBLIC
int
stop
();
DLL_PUBLIC
int
reboot
(
void
);
// Flight state management functions
DLL_PUBLIC
int
arm
(
void
);
DLL_PUBLIC
int
takeOff
(
void
);
DLL_PUBLIC
int
takeOffAndWait
(
void
);
DLL_PUBLIC
int
triggerParachute
(
void
);
// Flight management functions
DLL_PUBLIC
void
loiter
(
double
la
,
double
lo
,
float
a
,
float
radius
);
DLL_PUBLIC
void
setAirSpeed_async
(
float
airspeed
);
DLL_PUBLIC
void
setTargetCoordinates
(
double
la
,
double
lo
,
float
a
);
// Information functions
DLL_PUBLIC
float
getAltitude
(
void
);
DLL_PUBLIC
float
getInitialAltitude
(
void
);
DLL_PUBLIC
double
getInitialLatitude
(
void
);
DLL_PUBLIC
double
getInitialLongitude
(
void
);
DLL_PUBLIC
int64_t
*
getPositionArray
(
void
);
DLL_PUBLIC
float
*
getSpeedArray
(
void
);
DLL_PUBLIC
double
getTakeOffAltitude
(
void
);
DLL_PUBLIC
float
getYaw
(
void
);
DLL_PUBLIC
float
getSpeed
(
void
);
DLL_PUBLIC
float
getClimbRate
(
void
);
DLL_PUBLIC
int
healthAllOk
(
void
);
DLL_PUBLIC
int
gpsIsOk
(
void
);
DLL_PUBLIC
void
updateLogAndProjection
(
void
);
#ifdef __cplusplus
}
#endif
#endif
/* __AUTOPILOT_H__ */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment