From: Chuck K. <chu...@ya...> - 2009-03-25 15:37:43
|
I did some experimenting and the altitude mode has nothing to do with it. I increased the delay between messages from 1 to 5 seconds and that has solved the problem. Interestingly, before I increased the delay, I found that both clampToGround and relativeToGround modes showed the same problem (altitude begins to lower at some point until Alt reads NaN and screen goes black). However, in absolute mode, the opposite problem occurred -- the altitude begins increasing. So, there appears to be some problem with the server getting overwhelmed with messages that causes a problem with altitude. Chuck --- On Tue, 3/24/09, Garrett Potts <po...@cf...> wrote: > From: Garrett Potts <po...@cf...> > Subject: Re: [OSSIM] Possible bug > To: "Chuck Ketcham" <chu...@ya...> > Cc: oss...@li... > Date: Tuesday, March 24, 2009, 7:56 PM > Hello Chuck: > > Try changing the altitude mode to be relative to > ground. Also the units are meters. The clamp to > ground ignores the altitude setting and does an elevation > lookup at the given lat lon location. Relative will do > a displacemet of the altitude amount from the actual > elevation value. If you know the absolute position > this is fastest since there is no elevation lookup for the > elevation since you are supplying the absolute value. > > > Take care > > > Garrett > > On Mar 24, 2009, at 10:46 PM, Chuck Ketcham wrote: > > > > > All, > > > > I am using version 1.7.15 of OSSIM planet for > Windows. > > > > I have written a little program in C# to play back a > list of way points in OSSIM planet. Basically, my > program controls the OSSIM planet view by making repeated > use of the "FlyTo" socket message command. The idea > here is to have the cursor follow a road on my terrain > view. > > So, everything starts working well in the beginning -- > the cursor flies to the correct point and then you see the > cursor follow the way points that I setup. However, > the initial altitude is off -- my XML message commands OSSIM > Planet for an altitude of 250, but OSSIM shows an altitude > of about 2400. But the worse part is that as the > program continues to run, the altitude gets lower and lower > until the screen goes black and the OSSIM Alt reading is > NaN. When my C# program finally stops sending "FlyTo" > messages, the OSSIM planet display returns to an altitude of > 2400 ft, and the cursor is placed at the last way point that > I intended. As you can see from the code, I put a one > second delay between transmissions of the "FlyTo" message, > so I wouldn't think I was sending messages too fast or > anything. Also, I'm using TCP, not UDP (using type > Data rather than Navigation). Is this a bug, or am I doing > something wrong? The code snippet follows: > > > > private void play(object > sender, RoutedEventArgs e) > > { > > string line; > > string > latitude = null, longitude = null; > > Regex r = new > Regex("(.+),(.+)"); > > StreamReader > freader = File.OpenText("waypoints.dat"); > > int i = 0; > > while ((line > = freader.ReadLine()) != null) > > { > > > Match m = r.Match(line); > > > if (m.Success) > > > { > > > latitude = m.Groups[1].Value; > > > longitude = m.Groups[2].Value; > > > } > > > else > > > { > > > MessageBox.Show("Unexpected value in the > waypoints file"); > > > } > > > > > networkStreamWriteLine("<FlyTo > target=\":navigator\">"); > > > networkStreamWriteLine("<LookAt>"); > > > networkStreamWriteLine("<longitude>" + longitude + > "</longitude>"); > > > networkStreamWriteLine("<latitude>" + latitude + > "</latitude>"); > > > networkStreamWriteLine("<altitude>250.0</altitude>"); > > > networkStreamWriteLine("<heading>0</heading>"); > > > networkStreamWriteLine("<pitch>0</pitch>"); > > > networkStreamWriteLine("<roll>0</roll>"); > > > networkStreamWriteLine("<altitudeMode>clampToGround</altitudeMode>"); > > > networkStreamWriteLine("<range>250.0</range>"); > > > networkStreamWriteLine("</LookAt>"); > > > networkStreamWriteLine("</FlyTo>"); > > > if (i == 0) > > > Thread.Sleep(5000); > > > else > > > Thread.Sleep(1000); > > > > > i++; > > } > > > > } > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > Apps built with the Adobe(R) Flex(R) framework and > Flex Builder(TM) are > > powering Web 2.0 with engaging, cross-platform > capabilities. Quickly and > > easily build your RIAs with Flex Builder, the > Eclipse(TM)based development > > software that enables intelligent coding and > step-through debugging. > > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > > _______________________________________________ > > www.ossim.org > > Ossim-developer mailing list > > Oss...@li... > > https://lists.sourceforge.net/lists/listinfo/ossim-developer > > |