Subversion Repositories Projects

Rev

Rev 2203 | Go to most recent revision | Blame | Last modification | View Log | RSS feed

//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

//############################################################################
//# HISTORY  gps.h
//#
//# 20.06.2014 OG - NEU
//############################################################################


#ifndef GPS_H_
#define GPS_H_



GPS_PosDev_t gps_Deviation( GPS_Pos_t pos1, GPS_Pos_t pos2 );

/**
 * Position data in fractional degrees or radians
 */

typedef struct _nmeaPOS
{
    int32_t lat;         /**< Latitude */
    int32_t lon;         /**< Longitude */

} nmeaPOS;

typedef struct _positionOffset
{
        uint16_t offset_lat;
        uint16_t offset_long;
}positionOffset;



extern nmeaPOS NMEApos;
extern nmeaPOS NMEATarget;


int nmea_move_horz(
    const nmeaPOS *start_pos,   /**< Start position in radians */
    nmeaPOS *end_pos,           /**< Result position in radians */
    double azimuth,             /**< Azimuth (degree) [0, 359] */
    double distance             /**< Distance (km) */
    );


int nmea_move_horz1(
    const nmeaPOS *start_pos,   /**< Start position in radians */
    nmeaPOS *end_pos,           /**< Result position in radians */
    double azimuth,             /**< Azimuth (degree) [0, 359] */
    double distance             /**< Distance (km) */
    );


uint8_t followme_add_offset(
    const nmeaPOS *pPktPos,                     /**< Start position in radians */
    nmeaPOS *target_pos,                        /**< Result position in radians */
        positionOffset *followMeOffset          /**< Position Offset in Millimeters */
    );

uint8_t followme_calculate_offset(
        uint16_t radius,
        int16_t angle,
        positionOffset *followMeOffset
        );



#endif // #define GPS_H_