Difference between revisions of "Importing Boat Data"

From VRTool wiki
Jump to: navigation, search
(Getting boat data directly from a game server)
(Getting boat data directly from a game server)
Line 5: Line 5:
 
This method works for '''Virtual Regatta''' games only. Once it's set up the method is completely automatic and reliable. Until someone writes a TCP/IP proxy to stream game data as NMEA messages this is the best way to import data from VR games.
 
This method works for '''Virtual Regatta''' games only. Once it's set up the method is completely automatic and reliable. Until someone writes a TCP/IP proxy to stream game data as NMEA messages this is the best way to import data from VR games.
  
Here's how it works: When your game console wants an update it instructs your browser to send a request to the VR game server. The server has to know who you are, so the request includes your username as an encrypted string. This means the request is unique to each player (and to each game). If you want '''VRTool''' to request data from the server you have to figure out the contents of the request message for your boat. Fortunately if you know roughly what it looks like you can use the developer tools built into modern browsers to "sniff" out the request on its way to the server.
+
Here's how it works: When your game console wants an update it instructs your browser to send a request to the VR game server. The game server has to know who you are, so the request includes your username as an encrypted string. This means the request is unique to each player (and to each game). If you want '''VRTool''' to request data from the server you have to figure out the contents of the request message for your boat. Fortunately you can use the developer tools built into modern browsers to "sniff" out the request on its way to the server.
  
Once you have the request string for your boat you can configure VRTool sent the same request to the VR server. This is done in the '''Boat Data''' control panel on the '''Boats''' tab. The VR server responds with your boat data and your friends. VRTool then uses the data to generate a track for each boat on the chart.  
+
Once you have the request string for your boat you can configure VRTool to send the same request to the VR server. This is done in the '''Boat Data''' control panel on the '''Boats''' tab. The VR server responds with your boat data and your friends. VRTool then uses the data to generate a track for each boat on the chart.  
  
 
'''Didier''', the skipper of '''"Le Grand DIC"''' in VR games, has prepared an excellent set of instructions for sniffing out the request string for various browsers, and for configuring the '''Boat Data''' control panel. These instructions are available [[here]].
 
'''Didier''', the skipper of '''"Le Grand DIC"''' in VR games, has prepared an excellent set of instructions for sniffing out the request string for various browsers, and for configuring the '''Boat Data''' control panel. These instructions are available [[here]].
Line 14: Line 14:
  
 
{|class="wikitable"
 
{|class="wikitable"
|''Tip: When you first set up the link, VRTool can't draw the track or the boat icon on the chart until it receives the '''second''' set of data. So you won't see the tracks for at least 10 minutes. You can however see the first set of data arrive on the Boat Data control panel.''
+
|''Tip: When you first set up the link, VRTool can't draw the track or the boat icon on the chart until it receives the '''second''' set of data. So you won't see the tracks for '''at least''' 10 minutes. However you can verify that the link is established by observing the data on the Boat Data control panel.''
 
|}
 
|}
  

Revision as of 08:48, 9 October 2014

There are several ways to import boat data into VRTool. All of them require a little work to establish a reliable connection, but you only need to do this once for each voyage or game.

Getting boat data directly from a game server

This method works for Virtual Regatta games only. Once it's set up the method is completely automatic and reliable. Until someone writes a TCP/IP proxy to stream game data as NMEA messages this is the best way to import data from VR games.

Here's how it works: When your game console wants an update it instructs your browser to send a request to the VR game server. The game server has to know who you are, so the request includes your username as an encrypted string. This means the request is unique to each player (and to each game). If you want VRTool to request data from the server you have to figure out the contents of the request message for your boat. Fortunately you can use the developer tools built into modern browsers to "sniff" out the request on its way to the server.

Once you have the request string for your boat you can configure VRTool to send the same request to the VR server. This is done in the Boat Data control panel on the Boats tab. The VR server responds with your boat data and your friends. VRTool then uses the data to generate a track for each boat on the chart.

Didier, the skipper of "Le Grand DIC" in VR games, has prepared an excellent set of instructions for sniffing out the request string for various browsers, and for configuring the Boat Data control panel. These instructions are available here.

The developer tools in web browsers change with every browser update, so it's next to impossible to keep the instructions for "sniffing" the request string exactly up to date. But if you read Didier's instructions carefully you will figure it out.

Tip: When you first set up the link, VRTool can't draw the track or the boat icon on the chart until it receives the second set of data. So you won't see the tracks for at least 10 minutes. However you can verify that the link is established by observing the data on the Boat Data control panel.

Using the GPS interface

Connecting to an TCP/IP network

VRTool's ToolbarGPS.gif GPS interface contains a TCP/IP client that can read an NMEA data stream from on an on-board wired or wireless TCP/IP network. VRTool can plot the position of your boat (using NMEA GPS messages) and nearby boats (using AIS messages).

Connecting to a game server through a TCP/IP proxy

The same facility can read game data streamed as NMEA messages over the internet via a TCP/IP proxy server. Your friends boats can also be plotted if the proxy serves these as NMEA AIS messages.

Connecting to a wired COM port

Importing NMEA messages from a text file

Importing boat and wind data from the Firefox cache

For Virtual Regatta games: If you are running the game console in the Firefox browser you can recover boat positions and game weather from the Firefox browser cache. Read more about that in this tutorial. This method depends on both the game file format and the browser cache management - it may stop working unexpectedly if either of these changes.

When all else fails...

For other games, or as a last resort in an emergency, simply place a mark on the chart, rename it to "Boat Position" or similar, then edit the Lat/Long of the mark manually as you go. How to do this is explained here. While this doesn't lay a track on the chart, it gives you a convenient start point for routing.