-
-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
371 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** | ||
* \file lwgps_opts_template.h | ||
* \brief LwGPS configuration file | ||
*/ | ||
|
||
/* | ||
* Copyright (c) 2020 Tilen MAJERLE | ||
* | ||
* Permission is hereby granted, free of charge, to any person | ||
* obtaining a copy of this software and associated documentation | ||
* files (the "Software"), to deal in the Software without restriction, | ||
* including without limitation the rights to use, copy, modify, merge, | ||
* publish, distribute, sublicense, and/or sell copies of the Software, | ||
* and to permit persons to whom the Software is furnished to do so, | ||
* subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be | ||
* included in all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE | ||
* AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
* OTHER DEALINGS IN THE SOFTWARE. | ||
* | ||
* This file is part of LwGPS - Lightweight GPS NMEA parser library. | ||
* | ||
* Author: Tilen MAJERLE <[email protected]> | ||
* Version: $2.1.0$ | ||
*/ | ||
#ifndef LWGPS_HDR_OPTS_H | ||
#define LWGPS_HDR_OPTS_H | ||
|
||
/* Rename this file to "lwgps_opts.h" for your application */ | ||
|
||
/* | ||
* Open "include/lwgps/lwgps_opt.h" and | ||
* copy & replace here settings you want to change values | ||
*/ | ||
|
||
#endif /* LWGPS_HDR_OPTS_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
.. _api_lwgps: | ||
|
||
GPS NMEA Parser | ||
=============== | ||
LwGPS | ||
===== | ||
|
||
.. doxygengroup:: LWGPS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
.. _api_lwgps_config: | ||
.. _api_lwgps_opt: | ||
|
||
GPS Configuration | ||
================= | ||
Configuration | ||
============= | ||
|
||
This is the default configuration of the middleware. | ||
When any of the settings shall be modified, it shall be done in library header file, ``lwgps/src/include/lwgps/lwgps.h`` | ||
When any of the settings shall be modified, it shall be done in dedicated application config ``lwgps_opts.h`` file. | ||
|
||
.. doxygengroup:: LWGPS_CONFIG | ||
.. note:: | ||
Check :ref:`getting_started` to create configuration file. | ||
|
||
.. doxygengroup:: LWGPS_OPT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include "lwgps/lwgps.h" | ||
|
||
/* Distance and bearing results */ | ||
lwgps_float_t dist, bear; | ||
|
||
/* New York coordinates */ | ||
lwgps_float_t lat1 = 40.685721; | ||
lwgps_float_t lon1 = -73.820465; | ||
|
||
/* Munich coordinates */ | ||
lwgps_float_t lat2 = 48.150906; | ||
lwgps_float_t lon2 = 11.554176; | ||
|
||
/* Go from New York to Munich */ | ||
/* Calculate distance and bearing related to north */ | ||
lwgps_distance_bearing(lat1, lon1, lat2, lon2, &dist, &bear); | ||
printf("Distance: %f meters\r\n", (float)dist); | ||
printf("Initial bearing: %f degrees\r\n", (float)bear); | ||
|
||
/* Go from Munich to New York */ | ||
/* Calculate distance and bearing related to north */ | ||
lwgps_distance_bearing(lat2, lon2, lat1, lon1, &dist, &bear); | ||
printf("Distance: %f meters\r\n", (float)dist); | ||
printf("Initial bearing: %f degrees\r\n", (float)bear); |
Oops, something went wrong.