Please login or register.

Login with username, password and session length

News:

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.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - huckleberry

Pages: [1]
1
Development / Re: Creating a controller program
« on: February 12, 2014, 02:47:35 AM »
changed TerrainLat(1) to 30 as I think I had that wrong but still same depth at the beginning.

2
Development / Re: Creating a controller program
« on: February 12, 2014, 02:34:07 AM »
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:
Number=1

RadarImage="radar.bmp"

HeightMap(1)="height.bmp"
Texture(1)="texture.bmp"
TerrainLong(1)=-80
TerrainLat(1)=35
TerrainLongExtent(1)=5.0
TerrainLatExtent(1)=5.0
TerrainMaxHeight(1)=633.0
SeaMaxDepth(1)=2063
TerrainHeightMapSize(1)=2048

3
Development / Re: Creating a controller program
« on: February 09, 2014, 09:32:34 PM »
I haven't had a chance to fully see what all worked and didn't work.  The position seemed to be reporting correctly and I think the BC records were going to my listener just fine.  It just said "Aground" for speed in the UI, but pretty sure the BC record reported it fine.  It didn't respond to speed and rudder changes in the UI, but I didn't try via network communications.

I realize that I am using the tool for something outside its original intent, so no rush.  It still will have a lot of value for our project.  Thanks for all your work on it and your responsiveness to this thread.

4
Development / Re: Creating a controller program
« on: February 08, 2014, 02:18:06 PM »
I was going to simulate a really long journey, not really caring about land features.  So, I created an empty world and off we went.  Things seem to be working fine for several hours (no we aren't just sitting there watching it), but eventually it reports "Aground" and becomes unresponsive.  Is there anyway around this?

Thanks in advance,
Ken

5
Development / Re: Creating a controller program
« on: February 04, 2014, 05:37:26 AM »
Once again, big thanks.  found the issue and it was some misplaced parens. 

I really appreciate it and probably not the last time you hear from me, but hopefully, I can find someway to return the favor.

6
Development / Re: Creating a controller program
« on: February 02, 2014, 07:15:24 PM »
Thanks again.  Getting closer...Latitude is on track, but still off a little on longitude.

I ran the boat aground so that I could play with it a bit.  With a X/Z position of 43944.3,94138.5 on the Santa Catalina map, the BC UI was showing long of 118 deg 31 min (and change).  My calc was showing 118.178848 which seems to come in at 118 deg 10 min (and change).

7
Development / Re: Creating a controller program
« on: February 02, 2014, 05:11:33 AM »
Thanks a ton for continuing to help.  My formulas aren't returning the same as on the display of BC though.

Here is the code
Code: [Select]
     
      private const double EARTH_RADIUS = 6371000; //in meters
      double dTerrainXWidth = dTerrainLongExtent * 2 * Math.PI * EARTH_RADIUS * Math.Cos(dTerrainLat + (dTerrainLatExtent / 2)) / 360;
      double dTerrainZWidth = dTerrainLatExtent * 2 * Math.PI * EARTH_RADIUS / 360;

      double Longitude = (dXPosition * dTerrainLongExtent / dTerrainXWidth) + dTerrainLong;
      double Latitude = (dZPosition * dTerrainLatExtent / dTerrainZWidth) + dTerrainLat;

Here is the lat/longs I used in my calc from Santa Catalina:
Lat "32.58333"
Long "-119.0"
Lat Extent "1.0"
Long Extent  "1.0"

dXPosition is the first value of the Own ship location data from BC row.  dZPosition is second value.

See anything wrong here?


8
Development / Re: Creating a controller program
« on: January 31, 2014, 03:20:00 AM »
Is this true?
In order to translate to a latitude, longitude, I will need to take the latitude, longitude of the most south-western position of the scenario and calculate it based on the meters from south and west points that is returned in BC record.

9
Development / Re: Creating a controller program
« on: January 24, 2014, 08:41:11 AM »
I have my prototype working!!  So excited for how this is going to work out.

My MC issue was due to not putting the length integer at the beginning of the string.

10
Development / Re: Creating a controller program
« on: January 24, 2014, 03:52:19 AM »
Making progress...I am reading the BC records just fine.  Getting a memory access violation and crashing BridgeCommander when I try to send the MC record.  It is likely something I will figure out, but if you have any thoughts on what might be the issue, I would appreciate.

Thanks again for your help.
Ken

11
Development / Re: Creating a controller program
« on: January 23, 2014, 06:55:13 PM »
Thanks for the reply.  I think this is going to work really well.  The MC engine and rudder failure record will be precisely what we need as that is the level of control we will have on the actual boat.

As far as tracking the boat it looks like BC record will have the info I need.  Can you confirm the following statements relative to the position data that is in the BC record:
1.  If I was in the most southern and most western position, it would be reporting 0,0
2.  BridgeCommander would never send negative numbers for position.
3.  In order to translate to a latitude, longitude, I will need to take the latitude, longitude of the most south-western position and calculate it based on the meters from south and west points.

That should be a good start.  I am sure I will have some more questions as I start to create my world and boat.  Very excited about using this tool.  Thanks for building it and helping.

12
Development / Creating a controller program
« on: January 21, 2014, 11:11:12 PM »
I am working with my kids on a science project that requires us to write a program (most likely in python) that would control and track a boat, among other things.  I think BridgeCommander would be a great simulator for us to use to test our programming before putting it on the boat itself.  I am going through the documentation now to see how I could model our boat, but I am not exactly sure where to start as far as controlling the boat from an external program (instead of the built-in UI).  Could you point me in the right direction on how I could go about it?

Thanks.

Pages: [1]