Please login or register.

Login with username, password and session length


Registration is only required if you want to post, and is not needed to read any posts. To avoid excess 'spam' accounts, all accounts where no posts have been made will be deleted after two weeks. Please register again if you wish to post.

Author Topic: Creating a controller program  (Read 27620 times)

February 10, 2014, 07:24:50 PM
Reply #15
  • Administrator
  • Member
  • *****
  • Posts: 152
    • View Profile
Hi, I've looked into this a little more. If you start on the defined world area, and move off it, Bridge Command assumes that the seabed depth stays the same as the point just before you left the map, and if you start off the map, it will assume a depth of zero.

To find the depth under the keel, the tidal height is added, and the ship's draught taken away. Therefore if you have any tides configured, you may be 'running aground' when the tide falls. If this is the problem, starting on the defined world area, and making sure that it's deep enough to avoid any grounding should fix the problem.

Alternatively, there may be some sort of numerical jitter that's causing the maintained depth to reduce over time, but that seems quite unlikely.

February 12, 2014, 02:34:07 AM
Reply #16
  • Member
  • **
  • Posts: 12
    • View Profile
I have decided it is something wrong with my world.  I am trying to use a file from the SRTM data.  The stats from it are:
Latitude min: 30 N      
             max: 35 N
Longitude min: 80 W      
                max: 75 W
Center point :
    Latitude 32.50 N
    Longitude 77.50 W

I have the boat start at the center point.  32.50,-77.50.

I noticed that it starts with depth under keel of 1.1

See anything wrong with the terrain.ini?  If I just wanted an empty map, would I just create an all-black bmp for height, texture and radar? 
I created a 2048x2048 bmp for the height map.

My terrain.ini looks like:



February 12, 2014, 02:47:35 AM
Reply #17
  • Member
  • **
  • Posts: 12
    • View Profile
changed TerrainLat(1) to 30 as I think I had that wrong but still same depth at the beginning.

February 16, 2014, 05:31:11 PM
Reply #18
  • Administrator
  • Member
  • *****
  • Posts: 152
    • View Profile
Hi, that all looks reasonable. I've tried replicating your terrain.ini file (with TerrainLat(1)=30), using a plain black image for the heightmap, and it behaves as expected, with a large depth when the vessel starts at
Code: [Select]
Is it possible that you may have switched the Lat and Long starting positions, so you're starting off the map?

Just one additional comment - because the height map is loaded from an image with only 256 grey shades, a terrain with such a large height range (-2063 to 633 metres) will load with large 'steps' visible in the land, as the height will only be resolved to the nearest ~10m. For very large depths (defaulting to 100m), the depth sounder will just read "-", so it may be best to truncate any depths below ~110 metres, which would increase the resolution of the heights that can be displayed.