using GPS
- This topic has 5 replies, 5 voices, and was last updated 8 years, 4 months ago by
Vivek Ratna Kansakar.
-
AuthorPosts
-
August 30, 2016 at 8:43 am #14655
basha gajula
ParticipantHow to use GPS which comes with dragonfly board. can we get AT commands set for dragonfly
August 30, 2016 at 5:00 pm #14676Steve Kovarik
ModeratorHello Basha
You would need to interface an active GPS antenna to the “G” U.FL
interface on the modem, and place the GPS antenna where it has a clear
vies of the sky.at$gpsnmun=1,1,0,0,0,0,0 (enable unsolicited messages)
at$gpsp=1 (start GPS receiver in standalone mode)After a time, a continuous streaming of GGA sentences are sent to the modem
serial interface.at$gpsnmum=0,1,0,0,0,0,0 (Stop streaming of GGA sentences)
at$gpsacp (get latest GPS coordinates)
at$gpsp=0 (Turn off GPS receiver)
Link to manual
http://www.multitech.com/manuals/telit_3g_modules_at_commands_reference_guide_r9.pdf-Best Regards
August 30, 2016 at 5:03 pm #14677Mike Fiore
BlockedBasha,
There is also a GPS API in the MTSAS library on mbed.
/** Enables GPS. * @returns true if GPS is enabled, false if GPS is not supported. */ virtual bool GPSenable(); /** Disables GPS. * @returns true if GPS is disabled, false if GPS does not disable. */ virtual bool GPSdisable(); /** Checks if GPS is enabled. * @returns true if GPS is enabled, false if GPS is disabled. */ virtual bool GPSenabled(); /** Get GPS position. * @returns a structure containing the GPS data field information. */ virtual gpsData GPSgetPosition(); /** Check for GPS fix. * @returns true if there is a fix and false otherwise. */ virtual bool GPSgotFix();
The library can be found here: https://developer.mbed.org/teams/MultiTech/code/mtsas/
Cheers,
Mike
September 28, 2016 at 2:23 pm #14902Michael Schwerin
ParticipantI am having trouble getting the GPS API to work. After the cellular system is connected and PPP link is established I do the following:
1. if GPSenabled() is false I call GPSenable()
2. wait until GPSenabled() returns true.
3. Start calling GPSgotFix() every 5 seconds waiting for a fix but never get one.On the first call of GPSgotFix() I get the following error over the debug serial port:
[ERROR] Expected 11 fields but there are 0 fields in “”My cell phone could see 19 satellites and was using 10 in the same location. Two different GPS antennas were tried.
October 24, 2016 at 4:32 am #15114Vivek Ratna Kansakar
ParticipantI am also having similar problems with the GPS API. I am having difficulty in getting the GPS fix.
if(! radio->GPSenabled()) { if(radio->GPSenable()) { logInfo("Checking for GPS fix."); if(radio->GPSgotFix()) { displayGpsData(); } else { logInfo("No GPS fix."); } } else { logError("Error in enabling GPS."); } }
The displayGpsData() method prints out the number of satellites, latitudes & longitudes.
-
This reply was modified 8 years, 4 months ago by
Vivek Ratna Kansakar.
October 24, 2016 at 11:08 am #15116Vivek Ratna Kansakar
ParticipantHi,
I solved my problem. The GPS antenna needs to be place in an open space with no roofs where it can pick up satellite signals (at least 3 satellites should be detected).
-
This reply was modified 8 years, 4 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.