Zephyr Project API 3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Navigation

Navigation utilities. More...

Data Structures

struct  navigation_data
 Navigation data structure. More...
 

Functions

int navigation_distance (uint64_t *distance, const struct navigation_data *p1, const struct navigation_data *p2)
 Calculate the distance between two navigation points along the surface of the sphere they are relative to.
 
int navigation_bearing (uint32_t *bearing, const struct navigation_data *from, const struct navigation_data *to)
 Calculate the bearing from one navigation point to another.
 

Detailed Description

Navigation utilities.

Function Documentation

◆ navigation_bearing()

int navigation_bearing ( uint32_t bearing,
const struct navigation_data from,
const struct navigation_data to 
)

#include <include/zephyr/data/navigation.h>

Calculate the bearing from one navigation point to another.

Parameters
bearingDestination for calculated bearing angle in millidegrees
fromFirst navigation point
toSecond navigation point
Returns
0 if successful
-EINVAL if either navigation point is invalid

◆ navigation_distance()

int navigation_distance ( uint64_t distance,
const struct navigation_data p1,
const struct navigation_data p2 
)

#include <include/zephyr/data/navigation.h>

Calculate the distance between two navigation points along the surface of the sphere they are relative to.

Parameters
distanceDestination for calculated distance in millimeters
p1First navigation point
p2Second navigation point
Returns
0 if successful
-EINVAL if either navigation point is invalid