HTTP/HTTPS

HTTP or HyperText Transfer Protocol is a protocol (or well-defined set of rules) that communicates reliably over a network, such as the Internet. If you are viewing this page on a device you are already familiar with the HTTP protocol. You may not realize it but all web browsers, such as Google Chrome, Microsoft Edge, Firefox, and Safari, use HTTP to communicate with web servers. HTTPS is an encrypted version of HTTP

The only difference when using TrackMyRide and the HTTP protocol is that instead of a web browser sending requests to the web server, the tracking device (whether it is a Raspberry Pi, Arduino, PC or whatever) connects to the server and sends the position data using the same HTTP protocol.

HTTP is a client server protocol. In other words there is a server (TrackMyRide servers) that listen for a request from clients (tracking devices). The clients (devices being tracked) establish a connection to the server, report their position data, the server saves those reports to a database and sends position data to the clients logged in and tracking the devices.

IoT Cloud

If you are developing your own application or hardware device and want to send your position information to TrackMyRide, all you have to do it create an HTTP GET request and send it to one of the following web addresses.

http://www.trackmyride.us/iot/web-report.aspx

Calling web-report.aspx is one of the easiest ways to report in with the TrackMyRide servers. The idea is simple; Any device that can establish a connection with a web server via HTTP can report data to the server. You can even use a web browser to test your connection.

To use HTTP follow the steps below.

  • Log in to your account
  • Locate your device's ID (see below)
  • Read your GPS's $GPRMC or $GPGGA string (which contains your position information)
  • Create the data portion of the URL
  • Send the URL to the address http://www.trackmyride.us/iot/web-report.aspx with the appropriate URL parameter (see below)

When invoked, this page requires only one URL parameter.

Locate your ID key

To locate your device's id login to your account, find the device, click the device to expand the details. Click on the gear icon to view the settings for your device. For a detailed explanation of locating your device id click here.

The id parameter is the way that our server identifies the device. Ids are always 4 character alphanumeric values that uniquely identifies your device to our server. The id is automatically generated at the time your device is added to the system. Our system ensures that no two devices will ever have the same id.

You can locate your device's identification information by logging in, clicking on your device and clicking on the gear icon.

The parameter contains the raw GPS data and ID from your device. The first part of this information is a standard NMEA $GPRMC or $GPGGA data string.

Typically we use the $GPRMC sentance type as it is widely supported by most devices. The one disadvantge to the $GPRMC sentance is that it doesn't contain altitude information. However, since most of the devices using the TrackMyRide service are moving about on the Earth's surface as opposed to flying, this isn't usually a factor. If you do wish to report your altitude then you should use the $GPGGA sentance format. We support either, so that choice is up to you.

Finding your device's ID
Finding your device's ID

Formatting the URL

The first part of the URL will always be the same.

URL format

Data parameter

The second part of the URL contains the location parameters for the device. It consists of the NMEA location data that is generated by most GPS devices. Each parameter contained in the data string represents a key value from the GPS. The most important thing to remember is that your device must send 14 individual fields as part of the string. Below is a breakdown of the string.

Parameter Description
&data= This is the variable the server uses to identify the parameter string. This is required. Be sure it is formatted exactly as shown
1 GPS Sentance type. This tells the page the format of the data that follows. Currently, the $GPRMC and &GPGGA strings are supported
2 Time from the GPS (Expressed in UTC format). HHMMSS
3 GPS receiver warning A = OK, V = Warning
4 Latitude in NMEA (Degrees, Minutes, Seconds) format. Format is DDMM.MMMMM (Decimal places are variable). It is important that the latitude (and longitude) remain in this format. The page expects this format and converts it to Decimal Degree format for internal use.
5 Designates the latitude direction. This is always a single character (N or S depending on the hemisphere)
6 Longitude in NMEA (Degrees, Minutes, Seconds) format. Format is DDMM.MMMMM (Decimal places are variable). It is important that the longitude (and latitude) remain in this format. The page expects this format and converts it to Decimal Degree format for internal use.
7 Designates the longitude direction. This is always a single characters (E or W) depending on your position
8 Denotes ground speed in knots
9 Represents the true course
10 The date of the fix (DDMMYY)
11 Magnetic variation. The difference between true north and magnetic north. TrackMyRide does not use this parameter so it may be left blank. Any value placed in this position is ignored.
12 Magnetic variation direction. The direction (East or West) of the magnetic variation from true north. TrackMyRide does not use this parameter so it may be left blank. Any value placed in this position is ignored.
13 Mode. This is the GPS mode and may be any of the following characters. The mode value is ignored by TrackMyRide.
  • A = Autonomous
  • D = DGPS
  • E = DR
14 Device ID. This is the ID of your device. The device ID MUST BE 4 alphanumeric characters in length.
15 Checksum. All GPS receivers produce a checksum value which is an XOR calculation of all the bytes between the $ in the first parameter and the * in the sentence. It is used to ensure the integrity of the data. TrackMyRide ignores the checksum
NOTE! - Unlike all the other parameters, the id and checksum are contained in the same comma-separated parameter. This is due to the way that certain devices (i.e. Peplink devices) format their data

To communicate with the TrackMyRide system your device only has to read the GPS data, create a string and send it to the server using the address shown above.

Notes!

  • You must use the web address listed above.
  • You must send data on TCP port 80 or port 443 (the well-known port for HTTP or HTTPS).
  • Your device ID key must be contained in the checksum parameter. While the checksum value is not used it is required.
  • You must use the data parameter for your GPS data.
  • Your longitude and latitude must be in the NMEA (Degrees, Minutes, Seconds) format (and not in Decimal Degrees). Our system converts it to Decimal Degrees.
  • Make sure you use all the parameters even if the system ignores them.

Sample Windows Program

The developers at TrackMyRide created a sample C# console program that reads a USB GPS, connects to a Wi-Fi network and uses HTTP to communicate with the TrackMyRide server in the manner described above. You may use all or part of the code in any project for personal or commercial use.

View and download the code from here.

With TrackMyRide view the location of anyone, anywhere, anytime. It is an open system designed to be highly informative and user friendly. It allows real time tracking and location of your devices. You can also view the history of the device and view its location over a customizable time range.

STAY UP TO DATE
Version: 5.5.24
CONTACT US
Submit a tech support ticket support@trackmyride.us
Icons supplied by Freepik from www.flaticon.com