Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
Ardupilot
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenSource
Ardupilot
Commits
87299da0
Commit
87299da0
authored
12 years ago
by
uncrustify
Committed by
Pat Hickey
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
uncrustify libraries/AP_GPS/AP_GPS_NMEA.h
parent
39f71f75
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/AP_GPS/AP_GPS_NMEA.h
+30
-30
30 additions, 30 deletions
libraries/AP_GPS/AP_GPS_NMEA.h
with
30 additions
and
30 deletions
libraries/AP_GPS/AP_GPS_NMEA.h
+
30
−
30
View file @
87299da0
...
...
@@ -58,17 +58,17 @@ public:
/// Perform a (re)initialisation of the GPS; sends the
/// protocol configuration messages.
///
virtual
void
init
(
enum
GPS_Engine_Setting
nav_setting
=
GPS_ENGINE_NONE
);
virtual
void
init
(
enum
GPS_Engine_Setting
nav_setting
=
GPS_ENGINE_NONE
);
/// Checks the serial receive buffer for characters,
/// attempts to parse NMEA data and updates internal state
/// accordingly.
///
virtual
bool
read
();
virtual
bool
read
();
private:
/// Coding for the GPS sentences that the parser handles
enum
_sentence_types
{
//there are some more than 10 fields in some sentences , thus we have to increase these value.
enum
_sentence_types
{
//there are some more than 10 fields in some sentences , thus we have to increase these value.
_GPS_SENTENCE_GPRMC
=
32
,
_GPS_SENTENCE_GPGGA
=
64
,
_GPS_SENTENCE_GPVTG
=
96
,
...
...
@@ -81,14 +81,14 @@ private:
/// @returns True if processing the character has resulted in
/// an update to the GPS state
///
bool
_decode
(
char
c
);
bool
_decode
(
char
c
);
/// Return the numeric value of an ascii hex character
///
/// @param a The character to be converted
/// @returns The value of the character as a hex digit
///
int16_t
_from_hex
(
char
a
);
int16_t
_from_hex
(
char
a
);
/// Parses the current term as a NMEA-style decimal number with
/// up to two decimal digits.
...
...
@@ -96,7 +96,7 @@ private:
/// @returns The value expressed by the string in _term,
/// multiplied by 100.
///
uint32_t
_parse_decimal
();
uint32_t
_parse_decimal
();
/// Parses the current term as a NMEA-style degrees + minutes
/// value with up to four decimal digits.
...
...
@@ -106,7 +106,7 @@ private:
/// @returns The value expressed by the string in _term,
/// multiplied by 10000.
///
uint32_t
_parse_degrees
();
uint32_t
_parse_degrees
();
/// Processes the current term when it has been deemed to be
/// complete.
...
...
@@ -116,44 +116,44 @@ private:
///
/// @returns True if completing the term has resulted in
/// an update to the GPS state.
bool
_term_complete
();
bool
_term_complete
();
uint8_t
_parity
;
///< NMEA message checksum accumulator
bool
_is_checksum_term
;
///< current term is the checksum
char
_term
[
15
];
///< buffer for the current term within the current sentence
uint8_t
_sentence_type
;
///< the sentence type currently being processed
uint8_t
_term_number
;
///< term index within the current sentence
uint8_t
_term_offset
;
///< character offset with the term being received
bool
_gps_data_good
;
///< set when the sentence indicates data is good
uint8_t
_parity
;
///< NMEA message checksum accumulator
bool
_is_checksum_term
;
///< current term is the checksum
char
_term
[
15
];
///< buffer for the current term within the current sentence
uint8_t
_sentence_type
;
///< the sentence type currently being processed
uint8_t
_term_number
;
///< term index within the current sentence
uint8_t
_term_offset
;
///< character offset with the term being received
bool
_gps_data_good
;
///< set when the sentence indicates data is good
// The result of parsing terms within a message is stored temporarily until
// the message is completely processed and the checksum validated.
// This avoids the need to buffer the entire message.
int32_t
_new_time
;
///< time parsed from a term
int32_t
_new_date
;
///< date parsed from a term
int32_t
_new_latitude
;
///< latitude parsed from a term
int32_t
_new_longitude
;
///< longitude parsed from a term
int32_t
_new_altitude
;
///< altitude parsed from a term
int32_t
_new_speed
;
///< speed parsed from a term
int32_t
_new_course
;
///< course parsed from a term
int16_t
_new_hdop
;
///< HDOP parsed from a term
uint8_t
_new_satellite_count
;
///< satellite count parsed from a term
int32_t
_new_time
;
///< time parsed from a term
int32_t
_new_date
;
///< date parsed from a term
int32_t
_new_latitude
;
///< latitude parsed from a term
int32_t
_new_longitude
;
///< longitude parsed from a term
int32_t
_new_altitude
;
///< altitude parsed from a term
int32_t
_new_speed
;
///< speed parsed from a term
int32_t
_new_course
;
///< course parsed from a term
int16_t
_new_hdop
;
///< HDOP parsed from a term
uint8_t
_new_satellite_count
;
///< satellite count parsed from a term
/// @name Init strings
/// In ::init, an attempt is made to configure the GPS
/// unit to send just the messages that we are interested
/// in using these strings
//@{
static
const
prog_char
_SiRF_init_string
[];
///< init string for SiRF units
static
const
prog_char
_MTK_init_string
[];
///< init string for MediaTek units
static
const
prog_char
_ublox_init_string
[];
///< init string for ublox units
static
const
prog_char
_SiRF_init_string
[];
///< init string for SiRF units
static
const
prog_char
_MTK_init_string
[];
///< init string for MediaTek units
static
const
prog_char
_ublox_init_string
[];
///< init string for ublox units
//@}
/// @name GPS message identifier strings
//@{
static
const
prog_char
_gprmc_string
[];
static
const
prog_char
_gpgga_string
[];
static
const
prog_char
_gpvtg_string
[];
static
const
prog_char
_gprmc_string
[];
static
const
prog_char
_gpgga_string
[];
static
const
prog_char
_gpvtg_string
[];
//@}
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment