Btraced XML format explained

Forum / topics about Btraced protocol and webservice (uploading gps data) Also Btraced sample code.

Btraced XML format explained

Postby Btraced » Sat Mar 24, 2012 8:19 pm

Code: Select all
<bwiredtravel>
   <model>iPhone</model>
   <devId>21622f43420a5590f327fcd78efb753c55189bff</devId>
   <username>pk</username>
   <password>testing</password>
   <travel>
      <id>1</id>
      <description>23-03-12 bike</description>
      <length>2954.76</length>
      <time>1014</time>
      <tpoints>129</tpoints>
      <uplpoints>100</uplpoints>
      <point>
         <id>104</id>
         <date>1332524797.424494</date>
         <lat>+51.724043</lat>
         <lon>+5.300559</lon>
         <speed>3.911873</speed>
         <course>72.584372</course>
         <haccu>10.000000</haccu>
         <bat>0.40</bat>
         <vaccu>9.000000</vaccu>
         <altitude>1.645592</altitude>
         <continous>0</continous>
         <tdist>2559.39</tdist>
         <rdist>97.17</rdist>
         <ttime>811</ttime>
      </point>
      <point>
         <id>105</id>
         <date>1332524800.426888</date>
         <lat>+51.724118</lat>
         <lon>+5.300701</lon>
         <speed>3.941704</speed>
         <course>41.977433</course>
         <haccu>10.000000</haccu>
         <bat>0.40</bat>
         <vaccu>9.373876</vaccu>
         <altitude>2.436264</altitude>
         <continous>1</continous>
         <tdist>2572.19</tdist>
         <rdist>12.80</rdist>
         <ttime>814</ttime>
      </point>
   </travel>
</bwiredtravel>
sample.zip
Btraced XML sample file
(578 Bytes) Downloaded 1335 times

The full XML starts with the tag “bwiredtravel”. There we have general information of the user described by these fields:
Model: Actually it will always contains “iPhone” as the application is designed for iOS. Maybe later it would be switch to Android.

devId:
Unique device identification. This can be used to identify the device for that user, or even create an account using just the device ID instead username or password.

Username:
If the user set the username in settings, then it’s sent using this flag in plain text.

Password:
If the user set the password in settings, then it’s sent using this flag in plain text.
The there would be information for the selected trip (or current trip). It starts with the “travel” tag and there is general information for that trip as follows.

ID:
Unique ID of the trip for that device. It’s the internal identification for that trip in the Btraced application.

Description:
Name of the trip

Length:
Total travel length in meters

Time:
Total travel time in seconds

Tpoints:
The total amount of points recorded for that trip

Uplpoints:
Internal btraced counter of the uploaded points for that trip
And then, there are list of all the points that Btraced request to store in the server database.
They are one “point” tag for each point to be saved. Each point is described with the following tags.

ID:
Btraced point ID of the internal database

Date:
Date of the point stored in EPOC linux time with milliseconds

Lat:
Latitude of the point

Lon:
Longitured of the point

Speed:
Speed at that point, in m/s. Value would be -1.0 if the speed is not available (Speed * 3.6 = KM)

Course:
Trip course at that point in degrees. Value would be -1.0 if the course is not available

Haccu:
Horizontal accuracy for that point in meters

Bat:
Baterry level of the iPhone (value is 0 to 1)

VAccu:
Vertical accurracy at that point in meters. Can be -1.0 if vertical accuracy cannot be determinated

Altitude:
Elevation at that point. Can be -1.0 if not available

Continous:
It’s set to 1 if the trip was not stopped since the previous saved point. It will be 0 if the trip tracking has been stopped and started again. Can be used for determining each trip segment

Tdist:
Total trip’s distance at that point in meters

Rdist:
Relative distance in meters from previous point

TTime:
Total time of the trip at that point in seconds

see also the protocol document here
http://www.btraced.com/Btraced%20Protocol%20v1.0.pdf
User avatar
Btraced
Site Admin
 
Posts: 60
Joined: Sat Dec 10, 2011 3:03 pm

Re: Btraced XML format explained

Postby bonza » Sat Mar 24, 2012 9:58 pm

Hi Pieter,

Very impressed with the open character of the BTraced app.

is their any documentation available of the server response format options?
Grabbed the response below from my iPhone HTTP POST.

{"id":0,"tripid":1,"points":[98,99,100,101,102,103,104,105,106,107,108,109,110,111,112],"valid":true}

PS a WSDL or XML DTD document would be nice to have

Cheers Jeroen
Jeroen...
bonza
 
Posts: 4
Joined: Sat Mar 24, 2012 9:40 pm
Location: Herten (NL)

Re: Btraced XML format explained

Postby Btraced » Sat Mar 24, 2012 10:49 pm

Hi Jeroen
There is no WDSL or DTD yet.
The server messages are explainded here
viewtopic.php?f=6&t=7
User avatar
Btraced
Site Admin
 
Posts: 60
Joined: Sat Dec 10, 2011 3:03 pm

Re: Btraced XML format explained

Postby smfunder » Sun Mar 25, 2012 9:31 pm

Hi Jeroen,

Thanks for your interest. Please find in this link a pdf document explaining all the handshaking between Btraced application and any custom webservice.
http://www.btraced.com/Btraced%20Protocol%20v1.0.pdf
If you need further details please let me know. I will be happy to detail any point.

Thanks,
Santiago
smfunder
Site Admin
 
Posts: 17
Joined: Fri Mar 16, 2012 2:24 am

Re: Btraced XML format explained

Postby ricky » Fri Jul 12, 2013 9:04 pm

What is the difference between Tdist and Length? In my tests they both are always the same value.
ricky
 
Posts: 1
Joined: Fri Jul 12, 2013 8:46 pm

Re: Btraced XML format explained

Postby smfunder » Fri Jul 26, 2013 8:48 pm

Hello Ricky,

The difference between Length and TDist is that Length is always the total length of the trip at the time the xml has been sent to the server. Instead, Tdist is the total distance of the trip at the moment each particular point is recorded. In the example you will see the total length of the trip when the xml was sent, but each point have a different Tdist because it was the length of the trip at the time each point was recorded.

Thanks,
Santiago
smfunder
Site Admin
 
Posts: 17
Joined: Fri Mar 16, 2012 2:24 am


Return to Btraced Webservice Protocol And Sample code etc.

Who is online

Users browsing this forum: No registered users and 1 guest

cron