This program connects to a few sensors via I2C and sends the data collected to a WNC Cellular Module which is located on an Avnet WNC-Shield card.

Dependencies:   FXOS8700CQ MODSERIAL mbed

/media/uploads/kevinkeryk/avnet_logo_tagline_rgb.png

Avnet Cellular IoT Instructions

  • One problematic area is setting the MY_SERVER_URL. When you copy the URL from the flow, you must make sure the MY_SERVER_URL is also set to the appropriate server. It can be either "run-east.att.io" or "run-west.att.io".

Useful Links

Adding Additional Sensors

The FLOW_DEVICE_NAME field must contain the name of the instance of the Virtual Starter Kit in FLOW you will be communicating with. Usually this is "vstarterkit001", but if you have problems communicating you can verify this is correct. Note: This device will not be created until you click the “Initialize” input on the Virtual Device tab of the Starter Kit project in FLOW. At that point, it becomes available in M2X and you can see it as the DEVICE SERIAL field under Devices as in the image below. /media/uploads/JMF/vstarterkit.png

Sensors: When executing, the FRDM-K64F board uploads sensor measurements to AT&T’s Flow environment every 5 seconds, using the Cellular shield board. You can adjust how often you want to do this by editing the SENSOR_UPDATE_INTERVAL_MS value in the header file.

Temperature and humidity: By default, the board reports readings from the HTS221 temperature and humidity sensor. These two values are sent to the HTTP IN /climate port in FLOW with field names “temp” and “humidity”. Temperature is in degrees Fahrenheit and humidity is a %. This default assignment is: iSensorsToReport = TEMP_HUMIDITY_ONLY;

Accelerometer: If you want to expand and use the onboard motion sensor, you can also send 3-axis accelerometer information from the board as “accelX”, “accelY”, and “accelZ”. This is useful if you want to know the stationary position of the board with regards to gravity, or whether it is in motion. These readings are in g’s. To send these values, change the assignment to: iSensorsToReport = TEMP_HUMIDITY_ACCELEROMETER;

PMOD Sensors: If you have a Silicon Labs sensor module that can plug into the PMOD connector on the Cellular shield, you are able to measure proximity, UV light, ambient visible and infrared light from the Si1145 sensor. This PMOD also has a temperature and humidity sensor, but in this case it is redundant. When enabled, the fields “proximity”, “light_uv”, “light_vis” and “light_ir” are also sent. To enable all these sensors, change the assignment to: iSensorsToReport = TEMP_HUMIDITY_ACCELEROMETER_PMODSENSORS;

Connecting the PMOD sensors: Because the pinouts do not align, the SiLabs PMOD sensor board cannot be plugged into the J10 PMOD receptacle on the shield directly. The following wiring instructions must be followed:

SignalJ10ShieldPMOD Color in the image below
VCCPin 6Pin 6Red
GNDPin 5Pin 5Black
SDAPin4Pin 3Green
SCLPin3Pin 2Yellow

/media/uploads/JMF/xyz.jpg

AT&T M2X and FLOW Instructions

M2X & FLOW Instructions

Link to AT&T M2X

M2X

Link to AT&T Flow

FLOW

Avnet WNC-Shield Information

Getting Started with the Avnet WNC-Shield Software

  • This project uses Revision 119 of the MBED library because of I2C implementation differences with the tip (Revision 121).
  • This project uses Revision 4 of the FXOS8700CQ library for sensors.

Easily Modifiable Parameters

Inside the mbed Avnet_ATT_Cellular_IOT project, the parameters needed to customize your board are in the config_me.h file.

  • FLOW parameters: This project assumes you are using a fork of the Starter Kit Base project, which is a reference design created using AT&T’s FLOW (https://flow.att.com) that allows the creation of online virtualization and other IoT functionality. The default parameters in the config_me.h file are done for a specific instance of this project. When you fork the original project, you get your own instance and it will have its own base address. At the bottom of the FLOW environment, when you click on the Endpoints tab, URL information that is specific to your instance is displayed. Of note is the Base URL. In the example below (as in the default mbed project), the Base URL is: https://run-west.att.io/1e464b19cdcde/774c88d68202/86694923d5bf28a/in/flow You have to take note of two parts of this address. The run-west.att.io part is the server URL, and you have to make sure the
  • MY_SERVER_URL field in config_me.h matches this. The rest of the base URL, in green above, needs to be pasted into the FLOW_BASE_URL field.

There is also a FLOW_INPUT_NAME field. This should match the name of the HTTP IN port in the FLOW project that you want to send sensor data to. The default is "/climate", as in the FLOW image below.

/media/uploads/JMF/sf.png

Where is the Binary I compiled

When the COMPILE button is pressed, it compiles your project and links it. The result is placed in the DOWNLOAD folder you use when downloading files from the Internet. It will be called AvnetATT_shape_hackathon_K64F.bin.

Additional Information on Compiling/Configuring

Comprehensive instructions can be found at: Quick Start Instructions

Committer:
root@developer-sjc-indigo-compiler.local.mbed.org
Date:
Mon Dec 11 21:51:32 2017 +0000
Revision:
83:55778a2d5c5e
Parent:
69:5a3414cc7531
Added tag att_cellular_K64_wnc_14A2A_20171211 for changeset 65cde5d7070c

Who changed what in which revision?

UserRevisionLine numberNew contents of line
stefanrousseau 69:5a3414cc7531 1 /* ===================================================================
stefanrousseau 69:5a3414cc7531 2 Copyright © 2016, AVNET Inc.
stefanrousseau 69:5a3414cc7531 3
stefanrousseau 69:5a3414cc7531 4 Licensed under the Apache License, Version 2.0 (the "License");
stefanrousseau 69:5a3414cc7531 5 you may not use this file except in compliance with the License.
stefanrousseau 69:5a3414cc7531 6 You may obtain a copy of the License at
stefanrousseau 69:5a3414cc7531 7
stefanrousseau 69:5a3414cc7531 8 http://www.apache.org/licenses/LICENSE-2.0
stefanrousseau 69:5a3414cc7531 9
stefanrousseau 69:5a3414cc7531 10 Unless required by applicable law or agreed to in writing,
stefanrousseau 69:5a3414cc7531 11 software distributed under the License is distributed on an
stefanrousseau 69:5a3414cc7531 12 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
stefanrousseau 69:5a3414cc7531 13 either express or implied. See the License for the specific
stefanrousseau 69:5a3414cc7531 14 language governing permissions and limitations under the License.
stefanrousseau 69:5a3414cc7531 15
stefanrousseau 69:5a3414cc7531 16 ======================================================================== */
stefanrousseau 69:5a3414cc7531 17
stefanrousseau 69:5a3414cc7531 18 #ifndef __XADOW_GPS_H_
stefanrousseau 69:5a3414cc7531 19 #define __XADOW_GPS_H_
stefanrousseau 69:5a3414cc7531 20
stefanrousseau 69:5a3414cc7531 21 /*!
stefanrousseau 69:5a3414cc7531 22 \def GPS_DEVICE_ADDR
stefanrousseau 69:5a3414cc7531 23 The I2C address GPS
stefanrousseau 69:5a3414cc7531 24
stefanrousseau 69:5a3414cc7531 25 \def GPS_SCAN_ID
stefanrousseau 69:5a3414cc7531 26 The id of scan data, the format is 0,0,0,Device address
stefanrousseau 69:5a3414cc7531 27 \def GPS_SCAN_SIZE
stefanrousseau 69:5a3414cc7531 28 The length of scan data
stefanrousseau 69:5a3414cc7531 29
stefanrousseau 69:5a3414cc7531 30 \def GPS_UTC_DATE_TIME_ID
stefanrousseau 69:5a3414cc7531 31 The id of utc date and time, the format is YMDHMS
stefanrousseau 69:5a3414cc7531 32 \def GPS_UTC_DATE_TIME_SIZE
stefanrousseau 69:5a3414cc7531 33 The length of utc date and time data
stefanrousseau 69:5a3414cc7531 34
stefanrousseau 69:5a3414cc7531 35 \def GPS_STATUS_ID
stefanrousseau 69:5a3414cc7531 36 The id of GPS status, the format is A/V
stefanrousseau 69:5a3414cc7531 37 \def GPS_STATUS_SIZE
stefanrousseau 69:5a3414cc7531 38 The length of GPS status data
stefanrousseau 69:5a3414cc7531 39
stefanrousseau 69:5a3414cc7531 40 \def GPS_LATITUDE_ID
stefanrousseau 69:5a3414cc7531 41 The id of latitude, the format is dd.dddddd
stefanrousseau 69:5a3414cc7531 42 \def GPS_LATITUDE_SIZE
stefanrousseau 69:5a3414cc7531 43 The length of latitude data
stefanrousseau 69:5a3414cc7531 44
stefanrousseau 69:5a3414cc7531 45 \def GPS_NS_ID
stefanrousseau 69:5a3414cc7531 46 The id of latitude direction, the format is N/S
stefanrousseau 69:5a3414cc7531 47 \def GPS_NS_SIZE
stefanrousseau 69:5a3414cc7531 48 The length of latitude direction data
stefanrousseau 69:5a3414cc7531 49
stefanrousseau 69:5a3414cc7531 50 \def GPS_LONGITUDE_ID
stefanrousseau 69:5a3414cc7531 51 The id of longitude, the format is ddd.dddddd
stefanrousseau 69:5a3414cc7531 52 \def GPS_LONGITUDE_SIZE
stefanrousseau 69:5a3414cc7531 53 The length of longitude data
stefanrousseau 69:5a3414cc7531 54
stefanrousseau 69:5a3414cc7531 55 \def GPS_EW_ID
stefanrousseau 69:5a3414cc7531 56 The id of longitude direction, the format is E/W
stefanrousseau 69:5a3414cc7531 57 \def GPS_EW_SIZE
stefanrousseau 69:5a3414cc7531 58 The length of longitude direction data
stefanrousseau 69:5a3414cc7531 59
stefanrousseau 69:5a3414cc7531 60 \def GPS_SPEED_ID
stefanrousseau 69:5a3414cc7531 61 The id of speed, the format is 000.0~999.9 Knots
stefanrousseau 69:5a3414cc7531 62 \def GPS_SPEED_SIZE
stefanrousseau 69:5a3414cc7531 63 The length of speed data
stefanrousseau 69:5a3414cc7531 64
stefanrousseau 69:5a3414cc7531 65 \def GPS_COURSE_ID
stefanrousseau 69:5a3414cc7531 66 The id of course, the format is 000.0~359.9
stefanrousseau 69:5a3414cc7531 67 \def GPS_COURSE_SIZE
stefanrousseau 69:5a3414cc7531 68 The length of course data
stefanrousseau 69:5a3414cc7531 69
stefanrousseau 69:5a3414cc7531 70 \def GPS_POSITION_FIX_ID
stefanrousseau 69:5a3414cc7531 71 The id of position fix status, the format is 0,1,2,6
stefanrousseau 69:5a3414cc7531 72 \def GPS_POSITION_FIX_SIZE
stefanrousseau 69:5a3414cc7531 73 The length of position fix status data
stefanrousseau 69:5a3414cc7531 74
stefanrousseau 69:5a3414cc7531 75 \def GPS_SATE_USED_ID
stefanrousseau 69:5a3414cc7531 76 The id of state used, the format is 00~12
stefanrousseau 69:5a3414cc7531 77 \def GPS_SATE_USED_SIZE
stefanrousseau 69:5a3414cc7531 78 The length of sate used data
stefanrousseau 69:5a3414cc7531 79
stefanrousseau 69:5a3414cc7531 80 \def GPS_ALTITUDE_ID
stefanrousseau 69:5a3414cc7531 81 The id of altitude, the format is -9999.9~99999.9
stefanrousseau 69:5a3414cc7531 82 \def GPS_ALTITUDE_SIZE
stefanrousseau 69:5a3414cc7531 83 The length of altitude data
stefanrousseau 69:5a3414cc7531 84
stefanrousseau 69:5a3414cc7531 85 \def GPS_MODE_ID
stefanrousseau 69:5a3414cc7531 86 The id of locate mode, the format is A/M
stefanrousseau 69:5a3414cc7531 87 \def GPS_MODE_SIZE
stefanrousseau 69:5a3414cc7531 88 The length of locate mode data
stefanrousseau 69:5a3414cc7531 89
stefanrousseau 69:5a3414cc7531 90 \def GPS_MODE2_ID
stefanrousseau 69:5a3414cc7531 91 The id of current status, the format is 1,2,3
stefanrousseau 69:5a3414cc7531 92 \def GPS_MODE2_SIZE
stefanrousseau 69:5a3414cc7531 93 The length of current status data
stefanrousseau 69:5a3414cc7531 94
stefanrousseau 69:5a3414cc7531 95 \def GPS_SATE_IN_VIEW_ID
stefanrousseau 69:5a3414cc7531 96 The id of sate in view
stefanrousseau 69:5a3414cc7531 97 \def GPS_SATE_IN_VIEW_SIZE
stefanrousseau 69:5a3414cc7531 98 The length of sate in view data
stefanrousseau 69:5a3414cc7531 99 */
stefanrousseau 69:5a3414cc7531 100
stefanrousseau 69:5a3414cc7531 101 /* Data format:
stefanrousseau 69:5a3414cc7531 102 * ID(1 byte), Data length(1 byte), Data 1, Data 2, ... Data n (n bytes, n = data length)
stefanrousseau 69:5a3414cc7531 103 * For example, get the scan data.
stefanrousseau 69:5a3414cc7531 104 * First, Send GPS_SCAN_ID(1 byte) to device.
stefanrousseau 69:5a3414cc7531 105 * Second, Receive scan data(ID + Data length + GPS_SCAN_SIZE = 6 bytes).
stefanrousseau 69:5a3414cc7531 106 * Third, The scan data begin from the third data of received.
stefanrousseau 69:5a3414cc7531 107 * End
stefanrousseau 69:5a3414cc7531 108 */
stefanrousseau 69:5a3414cc7531 109
stefanrousseau 69:5a3414cc7531 110 #define GPS_DEVICE_ID 0x05
stefanrousseau 69:5a3414cc7531 111 //#define GPS_DEVICE_ADDR 0x05
stefanrousseau 69:5a3414cc7531 112 #define GPS_DEVICE_ADDR 0x0A //For mbed, the address has to be << 1
stefanrousseau 69:5a3414cc7531 113
stefanrousseau 69:5a3414cc7531 114 #define GPS_SCAN_ID 0 // 4 bytes
stefanrousseau 69:5a3414cc7531 115 #define GPS_SCAN_SIZE 4 // 0,0,0,Device address
stefanrousseau 69:5a3414cc7531 116
stefanrousseau 69:5a3414cc7531 117 #define GPS_UTC_DATE_TIME_ID 1 // YMDHMS
stefanrousseau 69:5a3414cc7531 118 #define GPS_UTC_DATE_TIME_SIZE 6 // 6 bytes
stefanrousseau 69:5a3414cc7531 119
stefanrousseau 69:5a3414cc7531 120 #define GPS_STATUS_ID 2 // A/V
stefanrousseau 69:5a3414cc7531 121 #define GPS_STATUS_SIZE 1 // 1 byte
stefanrousseau 69:5a3414cc7531 122
stefanrousseau 69:5a3414cc7531 123 #define GPS_LATITUDE_ID 3 // dd.dddddd
stefanrousseau 69:5a3414cc7531 124 #define GPS_LATITUDE_SIZE 9 // 9 bytes
stefanrousseau 69:5a3414cc7531 125
stefanrousseau 69:5a3414cc7531 126 #define GPS_NS_ID 4 // N/S
stefanrousseau 69:5a3414cc7531 127 #define GPS_NS_SIZE 1 // 1 byte
stefanrousseau 69:5a3414cc7531 128
stefanrousseau 69:5a3414cc7531 129 #define GPS_LONGITUDE_ID 5 // ddd.dddddd
stefanrousseau 69:5a3414cc7531 130 #define GPS_LONGITUDE_SIZE 10 // 10 bytes
stefanrousseau 69:5a3414cc7531 131
stefanrousseau 69:5a3414cc7531 132 #define GPS_EW_ID 6 // E/W
stefanrousseau 69:5a3414cc7531 133 #define GPS_EW_SIZE 1 // 1 byte
stefanrousseau 69:5a3414cc7531 134
stefanrousseau 69:5a3414cc7531 135 #define GPS_SPEED_ID 7 // 000.0~999.9 Knots
stefanrousseau 69:5a3414cc7531 136 #define GPS_SPEED_SIZE 5 // 5 bytes
stefanrousseau 69:5a3414cc7531 137
stefanrousseau 69:5a3414cc7531 138 #define GPS_COURSE_ID 8 // 000.0~359.9
stefanrousseau 69:5a3414cc7531 139 #define GPS_COURSE_SIZE 5 // 5 bytes
stefanrousseau 69:5a3414cc7531 140
stefanrousseau 69:5a3414cc7531 141 #define GPS_POSITION_FIX_ID 9 // 0,1,2,6
stefanrousseau 69:5a3414cc7531 142 #define GPS_POSITION_FIX_SIZE 1 // 1 byte
stefanrousseau 69:5a3414cc7531 143
stefanrousseau 69:5a3414cc7531 144 #define GPS_SATE_USED_ID 10 // 00~12
stefanrousseau 69:5a3414cc7531 145 #define GPS_SATE_USED_SIZE 2 // 2 bytes
stefanrousseau 69:5a3414cc7531 146
stefanrousseau 69:5a3414cc7531 147 #define GPS_ALTITUDE_ID 11 // -9999.9~99999.9
stefanrousseau 69:5a3414cc7531 148 #define GPS_ALTITUDE_SIZE 7 // 7 bytes
stefanrousseau 69:5a3414cc7531 149
stefanrousseau 69:5a3414cc7531 150 #define GPS_MODE_ID 12 // A/M
stefanrousseau 69:5a3414cc7531 151 #define GPS_MODE_SIZE 1 // 1 byte
stefanrousseau 69:5a3414cc7531 152
stefanrousseau 69:5a3414cc7531 153 #define GPS_MODE2_ID 13 // 1,2,3
stefanrousseau 69:5a3414cc7531 154 #define GPS_MODE2_SIZE 1 // 1 byte
stefanrousseau 69:5a3414cc7531 155
stefanrousseau 69:5a3414cc7531 156 #define GPS_SATE_IN_VIEW_ID 14 // 0~12
stefanrousseau 69:5a3414cc7531 157 #define GPS_SATE_IN_VIEW_SIZE 1 // 1 byte
stefanrousseau 69:5a3414cc7531 158
stefanrousseau 69:5a3414cc7531 159
stefanrousseau 69:5a3414cc7531 160 /**
stefanrousseau 69:5a3414cc7531 161 * \brief Get the status of the device.
stefanrousseau 69:5a3414cc7531 162 *
stefanrousseau 69:5a3414cc7531 163 * \return Return TRUE or FALSE. TRUE is on line, FALSE is off line.
stefanrousseau 69:5a3414cc7531 164 *
stefanrousseau 69:5a3414cc7531 165 */
stefanrousseau 69:5a3414cc7531 166 unsigned char gps_check_online(void);
stefanrousseau 69:5a3414cc7531 167
stefanrousseau 69:5a3414cc7531 168 /**
stefanrousseau 69:5a3414cc7531 169 * \brief Get the utc date and time.
stefanrousseau 69:5a3414cc7531 170 *
stefanrousseau 69:5a3414cc7531 171 * \return Return the pointer of utc date sand time, the format is YMDHMS.
stefanrousseau 69:5a3414cc7531 172 *
stefanrousseau 69:5a3414cc7531 173 */
stefanrousseau 69:5a3414cc7531 174 unsigned char* gps_get_utc_date_time(void);
stefanrousseau 69:5a3414cc7531 175
stefanrousseau 69:5a3414cc7531 176 /**
stefanrousseau 69:5a3414cc7531 177 * \brief Get the status of GPS.
stefanrousseau 69:5a3414cc7531 178 *
stefanrousseau 69:5a3414cc7531 179 * \return Return A or V. A is orientation, V is navigation.
stefanrousseau 69:5a3414cc7531 180 *
stefanrousseau 69:5a3414cc7531 181 */
stefanrousseau 69:5a3414cc7531 182 unsigned char gps_get_status(void);
stefanrousseau 69:5a3414cc7531 183
stefanrousseau 69:5a3414cc7531 184 /**
stefanrousseau 69:5a3414cc7531 185 * \brief Get the altitude.
stefanrousseau 69:5a3414cc7531 186 *
stefanrousseau 69:5a3414cc7531 187 * \return Return altitude data. The format is dd.dddddd.
stefanrousseau 69:5a3414cc7531 188 *
stefanrousseau 69:5a3414cc7531 189 */
stefanrousseau 69:5a3414cc7531 190 float gps_get_latitude(void);
stefanrousseau 69:5a3414cc7531 191
stefanrousseau 69:5a3414cc7531 192 /**
stefanrousseau 69:5a3414cc7531 193 * \brief Get the lattitude direction.
stefanrousseau 69:5a3414cc7531 194 *
stefanrousseau 69:5a3414cc7531 195 * \return Return lattitude direction data. The format is N/S. N is north, S is south.
stefanrousseau 69:5a3414cc7531 196 *
stefanrousseau 69:5a3414cc7531 197 */
stefanrousseau 69:5a3414cc7531 198 unsigned char gps_get_ns(void);
stefanrousseau 69:5a3414cc7531 199
stefanrousseau 69:5a3414cc7531 200 /**
stefanrousseau 69:5a3414cc7531 201 * \brief Get the longitude.
stefanrousseau 69:5a3414cc7531 202 *
stefanrousseau 69:5a3414cc7531 203 * \return Return longitude data. The format is ddd.dddddd.
stefanrousseau 69:5a3414cc7531 204 *
stefanrousseau 69:5a3414cc7531 205 */
stefanrousseau 69:5a3414cc7531 206 float gps_get_longitude(void);
stefanrousseau 69:5a3414cc7531 207
stefanrousseau 69:5a3414cc7531 208 /**
stefanrousseau 69:5a3414cc7531 209 * \brief Get the longitude direction.
stefanrousseau 69:5a3414cc7531 210 *
stefanrousseau 69:5a3414cc7531 211 * \return Return longitude direction data. The format is E/W. E is east, W is west.
stefanrousseau 69:5a3414cc7531 212 *
stefanrousseau 69:5a3414cc7531 213 */
stefanrousseau 69:5a3414cc7531 214 unsigned char gps_get_ew(void);
stefanrousseau 69:5a3414cc7531 215
stefanrousseau 69:5a3414cc7531 216 /**
stefanrousseau 69:5a3414cc7531 217 * \brief Get the speed.
stefanrousseau 69:5a3414cc7531 218 *
stefanrousseau 69:5a3414cc7531 219 * \return Return speed data. The format is 000.0~999.9 Knots.
stefanrousseau 69:5a3414cc7531 220 *
stefanrousseau 69:5a3414cc7531 221 */
stefanrousseau 69:5a3414cc7531 222 float gps_get_speed(void);
stefanrousseau 69:5a3414cc7531 223
stefanrousseau 69:5a3414cc7531 224 /**
stefanrousseau 69:5a3414cc7531 225 * \brief Get the course.
stefanrousseau 69:5a3414cc7531 226 *
stefanrousseau 69:5a3414cc7531 227 * \return Return course data. The format is 000.0~359.9.
stefanrousseau 69:5a3414cc7531 228 *
stefanrousseau 69:5a3414cc7531 229 */
stefanrousseau 69:5a3414cc7531 230 float gps_get_course(void);
stefanrousseau 69:5a3414cc7531 231
stefanrousseau 69:5a3414cc7531 232 /**
stefanrousseau 69:5a3414cc7531 233 * \brief Get the status of position fix.
stefanrousseau 69:5a3414cc7531 234 *
stefanrousseau 69:5a3414cc7531 235 * \return Return position fix data. The format is 0,1,2,6.
stefanrousseau 69:5a3414cc7531 236 *
stefanrousseau 69:5a3414cc7531 237 */
stefanrousseau 69:5a3414cc7531 238 unsigned char gps_get_position_fix(void);
stefanrousseau 69:5a3414cc7531 239
stefanrousseau 69:5a3414cc7531 240 /**
stefanrousseau 69:5a3414cc7531 241 * \brief Get the number of state used¡£
stefanrousseau 69:5a3414cc7531 242 *
stefanrousseau 69:5a3414cc7531 243 * \return Return number of state used. The format is 0-12.
stefanrousseau 69:5a3414cc7531 244 *
stefanrousseau 69:5a3414cc7531 245 */
stefanrousseau 69:5a3414cc7531 246 unsigned char gps_get_sate_used(void);
stefanrousseau 69:5a3414cc7531 247
stefanrousseau 69:5a3414cc7531 248 /**
stefanrousseau 69:5a3414cc7531 249 * \brief Get the altitude¡£ the format is -9999.9~99999.9
stefanrousseau 69:5a3414cc7531 250 *
stefanrousseau 69:5a3414cc7531 251 * \return Return altitude data. The format is -9999.9~99999.9.
stefanrousseau 69:5a3414cc7531 252 *
stefanrousseau 69:5a3414cc7531 253 */
stefanrousseau 69:5a3414cc7531 254 float gps_get_altitude(void);
stefanrousseau 69:5a3414cc7531 255
stefanrousseau 69:5a3414cc7531 256 /**
stefanrousseau 69:5a3414cc7531 257 * \brief Get the mode of location.
stefanrousseau 69:5a3414cc7531 258 *
stefanrousseau 69:5a3414cc7531 259 * \return Return mode of location. The format is A/M. A:automatic, M:manual.
stefanrousseau 69:5a3414cc7531 260 *
stefanrousseau 69:5a3414cc7531 261 */
stefanrousseau 69:5a3414cc7531 262 unsigned char gps_get_mode(void);
stefanrousseau 69:5a3414cc7531 263
stefanrousseau 69:5a3414cc7531 264 /**
stefanrousseau 69:5a3414cc7531 265 * \brief Get the current status of GPS.
stefanrousseau 69:5a3414cc7531 266 *
stefanrousseau 69:5a3414cc7531 267 * \return Return current status. The format is 1,2,3. 1:null, 2:2D, 3:3D.
stefanrousseau 69:5a3414cc7531 268 *
stefanrousseau 69:5a3414cc7531 269 */
stefanrousseau 69:5a3414cc7531 270 unsigned char gps_get_mode2(void);
stefanrousseau 69:5a3414cc7531 271
stefanrousseau 69:5a3414cc7531 272 /**
stefanrousseau 69:5a3414cc7531 273 * \brief Get the number of sate in view.
stefanrousseau 69:5a3414cc7531 274 *
stefanrousseau 69:5a3414cc7531 275 * \return Return the number of sate in view.
stefanrousseau 69:5a3414cc7531 276 *
stefanrousseau 69:5a3414cc7531 277 */
stefanrousseau 69:5a3414cc7531 278 unsigned char gps_get_sate_in_veiw(void);
stefanrousseau 69:5a3414cc7531 279
stefanrousseau 69:5a3414cc7531 280 #endif