To start with, I'd like to express my appretiation to Dene and Vivian for 
taking time to help me work through this problem.  Right now I'm starting to 
wonder what it is that scenarios with flight plans work other places, but 
not when they're placed where I am.  Latest results inserted in following...

> From: Dene >
> Hi Neil
>
> Didn't see your original post 'til after i'd commented on a later one...
> hope the comments and xml snippets below help
>> I've been trying for the past week to put a ferry boat route from Port
>> Angeles, WA to Victoria, BC scenario in FlightGear, with zero
>> results.  What has been done:
>> ----------------------------------------------------------------
>> Changed Preferences.xml to read:
>> <ai>
>>    <enabled type="bool">true</enabled>
>>    <scenario>nimitz_demo</scenario>
>>    <scenario>aircraft_demo</scenario>
>>    <scenario>ship_demo</scenario>
>>    <scenario>ferryboat1_demo</scenario>
>>   </ai>
>> -----------------------------------------------------------------
> Only the top scenario works ie shift ferryboat1_demo to the top of the
> scenario list

Tried that Dene, with no luck.  At this time I have Nimitz_demo and 
ship_demo cruising the waters off Washington's Olympic Peninsula at the same 
time, so that works.  I tried to move aircraft_demo from San Franscico to 
Port Angeles, but received the error message.

>> ferryboat1_demo.xml reads:
>> <PropertyList>
>>
>>  <scenario>
>>
>>   <entry>
>>    <type>ship</type>
>>    <model>Models/fgfsdb/Models/fgfsdb/FerryBoat1.xml</model>
>>    <flightplan>PA_Victoria.xml</flightplan>
>>   </entry>
>>
>>  </scenario>
>>
>> </PropertyList>
>  <PropertyList>
>    <scenario>
>      <entry>
>        <type>aircraft</type>
>        <model>Models/NZWorking/FerryBoat1.xml</model>
>        <flightplan>Arahunga-Picton-Wellington.xml</flightplan>
>      </entry>
>
>      <entry>
>        <type>aircraft</type>
>        <model>Models/NZWorking/FerryBoat1.xml</model>
>        <flightplan>Arahunga-Wellington-Picton.xml</flightplan>
>      </entry>
> ...
>
> etc
>> ------------------------------------------------------------------
>> FerryBoat1.xml reads:
>> <PropertyList>
>>
>>  <path>FerryBoat1.ac</path>
>>
>> </PropertyList>
> I think thats about what mine says too
>
>>
>> ------------------------------------------------------------------
>> PA_Victoria.xml reads:
>> <PropertyList>
>>
>>  <flightplan>
>>
>>   <wpt>
>>    <name>PA</name>
>>    <latitude>48.1225</latitude>
>>    <longitude>-123.44398</longitude>
>>    <alt>0.0</alt>
>>    <speed>10</speed>
>>   </wpt>
>>
> try something like....
>
> <PropertyList>
>
> <flightplan>
>  <wpt>
>   <name>Picton</name>
>   <lat>-41.2934805555556</lat>
>   <lon>174.006775</lon>
>   <alt>0.0</alt>
>   <ktas>15</ktas>
>   <on-ground>true</on-ground>
>  </wpt>
> ..........
>
>
>> The following scenario is the only one that works, but does not
>> include the flightplan to allow for the turn that is needed.
>>
>> <PropertyList>
>>
>>  <scenario>
>>
>>   <entry>
>>    <type>ship</type>
>>    <model>Models/fgfsdb/Models/fgfsdb/FerryBoat1.xml</model>
>>    <latitude>48.1225</latitude>
>>    <longitude>-123.44398</longitude>
>>    <speed>6.0</speed>
>>    <heading>70.0</heading>
>>   </entry>
>>
>>  </scenario>
>>
>> </PropertyList>
>
> <type>ship</type> has some problems
>> --------------------------------------------------------------------
>> Any other scenario variations that include "flightplan", don't move
>> the model, or the model doesn't even appear.
>>
>> I tried to substitute my latitudes and longitudes in existing
>> scenarios and flightplans, and get error message "unknown exception in
>> the main loop.  Aborting...".
>>
>> There's obviously something I don't understand about flightplans.  I
>> was begining to think a flightplan for a ship couldn't be done - then
>> while going through the maillist archives found where Dene had placed
>> ferryboats on routes.
>>
>> Where am I going wrong?
>
> I'll zip them up and stick them on my download page when I get a minute
> today...they'll only look any good if you download the scenery...but
> we're a small country so that wonn't take long ;)
>>
> Cheers
> Dene

Thanks Dene.  I downloaded them (I already have NZ scenery files - tried to 
find the barrage balloon over Wellington, but no luck).  I hacked your 
flightplan - the only changes I made were to replace your variables with 
mine.  As before I received this:
     "Error reading AI flight plan: C:/Program 
Files/FlightGear910/data/AI/FlightPlans
     /PA_Victoria
     Reading xml electrical system model from C:/Program 
Files/FlightGear910/data/Air
     craft/Generic/generic-electrical.xml
     Unknown exception in the main loop. Aborting...
     Possible cause: Domain error"
>
>
> ------------------------------
>
> From: "Neil Smith" >
> Thanks Vivian :( - I had tried to substitute the ship for the airplane 
> model
> in aircraft_demo, with my coordinates, without success.  Then just
> substituted my coordinates in aircraft_demo, and still received the error
> message.  So, I've been unable to even make it a slow, low flying 
> aricraft.
> Oh well...
> Cheers, Neil
>>
>> Neil,
>>
>> IIRC AIShips don't recognize flightplans. They probably should, but it's
>> not
>> been implemented yet. You will have to make your ferry a slow, low flying
>> aircraft. That is, unless someone knows a better way to do it.
>>
>> Vivian
>>
> From: "Neil Smith"
>
>> Hello Group
>> I've been trying for the past week to put a ferry boat route from Port
>> Angeles, WA to Victoria, BC scenario in FlightGear, with zero results.
>> What
>> has been done:
>> ----------------------------------------------------------------
>> Changed Preferences.xml to read:
>> <ai>
>>   <enabled type="bool">true</enabled>
>>   <scenario>nimitz_demo</scenario>
>>   <scenario>aircraft_demo</scenario>
>>   <scenario>ship_demo</scenario>
>>   <scenario>ferryboat1_demo</scenario>
>>  </ai>
>> ------------------------------------------------------------------
>> ferryboat1_demo.xml reads:
>> <PropertyList>
>>
>> <scenario>
>>
>>  <entry>
>>   <type>ship</type>
>>   <model>Models/fgfsdb/Models/fgfsdb/FerryBoat1.xml</model>
>>   <flightplan>PA_Victoria.xml</flightplan>
>>  </entry>
>>
>> </scenario>
>>
>> </PropertyList>
>> ------------------------------------------------------------------
>> FerryBoat1.xml reads:
>> <PropertyList>
>>
>> <path>FerryBoat1.ac</path>
>>
>> </PropertyList>
>>
>> ------------------------------------------------------------------
>> PA_Victoria.xml reads:
>> <PropertyList>
>>
>> <flightplan>
>>
>>  <wpt>
>>   <name>PA</name>
>>   <latitude>48.1225</latitude>
>>   <longitude>-123.44398</longitude>
>>   <alt>0.0</alt>
>>   <speed>10</speed>
>>  </wpt>
>>
>>  <wpt>
>>   <name>edizhook</name>
>>   <latitude>48.1337</latitude>
>>   <longitude>-123.3991</longitude>
>>   <alt>0.0</alt>
>>   <speed>18</speed>
>>  </wpt>
>>
>>  <wpt>
>>   <name>victoria</name>
>>   <latitude>48.405913</latitude>
>>   <longitude>-123.397767</longitude>
>>   <alt>0.0</alt>
>>   <speed>18</speed>
>>  </wpt>
>>
>>  <wpt>
>>   <name>edizhook</name>
>>   <latitude>48.1367</latitude>
>>   <longitude>-123.3981</longitude>
>>   <alt>0.0</alt>
>>   <speed>10</speed>
>>  </wpt>
>>
>>  <wpt>
>>   <name>END</name>
>>   <latitude>48.1225</latitude>
>>   <longitude>-123.44398</longitude>
>>   <alt>0.0</alt>
>>   <speed>0</speed>
>>  </wpt>
>>
>> </flightplan>
>>
>> </PropertyList>
>> ------------------------------------------------------------------
>> The following scenario is the only one that works, but does not include
>> the
>> flightplan to allow for the turn that is needed.
>>
>> <PropertyList>
>>
>> <scenario>
>>
>>  <entry>
>>   <type>ship</type>
>>   <model>Models/fgfsdb/Models/fgfsdb/FerryBoat1.xml</model>
>>   <latitude>48.1225</latitude>
>>   <longitude>-123.44398</longitude>
>>   <speed>6.0</speed>
>>   <heading>70.0</heading>
>>  </entry>
>>
>> </scenario>
>>
>> </PropertyList>
>> --------------------------------------------------------------------
>> Any other scenario variations that include "flightplan", don't move the
>> model, or the model doesn't even appear.
>>
>> I tried to substitute my latitudes and longitudes in existing scenarios
>> and
>> flightplans, and get error message "unknown exception in the main loop.
>> Aborting...".
>>
>> There's obviously something I don't understand about flightplans.  I was
>> begining to think a flightplan for a ship couldn't be done - then while
>> going through the maillist archives found where Dene had placed 
>> ferryboats
>> on routes.
>>
>> Where am I going wrong?
>>
>> Cheers, Neil
>>
> From: "Vivian Meazza" >
> Neil Smith
>>
>> Thanks Vivian :( - I had tried to substitute the ship for the airplane
>> model
>> in aircraft_demo, with my coordinates, without success.  Then just
>> substituted my coordinates in aircraft_demo, and still received the error
>> message.  So, I've been unable to even make it a slow, low flying
>> aricraft.
>> Oh well...
>> Cheers, Neil
>> >
>> > Neil,
>> >
>> > IIRC AIShips don't recognize flightplans. They probably should, but 
>> > it's
>> > not
>> > been implemented yet. You will have to make your ferry a slow, low
>> flying
>> > aircraft. That is, unless someone knows a better way to do it.
>> >
>> > Vivian
>> >
>> >
>
> I'm looking into making AIShips recognize "flightplans", but I haven't
> worked on this area of the code for a year or 2, so initial progress is
> likely to be slow while I refresh my understanding.
> Meanwhile, the low, slow hack certainly works - Dene uses it with great
> success. I think you have an error in your FP - the last entry should be:
>
>    <wpt>
>      <name>EOF</name>
>    </wpt>
>
> see tanker_racetrack.xml for an example

I entered the EOF notation - no change in negative results.  (I don't have 
tanker_racetrack.xml).

>
> From: Dene
>
>
> Neil Smith wrote:
>> Thanks Vivian :( - I had tried to substitute the ship for the airplane 
>> model
>> in aircraft_demo, with my coordinates, without success.  Then just
>> substituted my coordinates in aircraft_demo, and still received the error
>> message.  So, I've been unable to even make it a slow, low flying 
>> aricraft.
>> Oh well...
>> Cheers, Neil
>>
>>> Neil,
>>
> Neil
> I've posted the ferry scenario zip file I use;
> http://denemaxwell.dnsdojo.net/users/downloads/Miscellaneous/
> Feel free to hack this or even download the New Zealand scenery and see
> it work ;-)
>
> This works on 098a/Win98se.
>
> Cheers
> Dene

 From: "Vivian Meazza" >
> Dene
>
>>
>> Neil Smith wrote:
>> > Thanks Vivian :( - I had tried to substitute the ship for the airplane
>> model
>> > in aircraft_demo, with my coordinates, without success.  Then just
>> > substituted my coordinates in aircraft_demo, and still received the
>> error
>> > message.  So, I've been unable to even make it a slow, low flying
>> aricraft.
>> > Oh well...
>> > Cheers, Neil
>> >
>> >> Neil,
>> >
>> Neil
>> I've posted the ferry scenario zip file I use;
>> http://denemaxwell.dnsdojo.net/users/downloads/Miscellaneous/
>> Feel free to hack this or even download the New Zealand scenery and see
>> it work ;-)
>>
>> This works on 098a/Win98se.
>>
>
> I'll try to use that flightplan for AIShip. And if Neil corrects his
> flightplan to add the correct ending, I think that will work too.
>
> Vivian

> From: Dene
>
> Vivian Meazza wrote:
>> Dene
>>
>>
>>>>> Neil,
>>>>>
>>> Neil
>>> I've posted the ferry scenario zip file I use;
>>> http://denemaxwell.dnsdojo.net/users/downloads/Miscellaneous/
>>> Feel free to hack this or even download the New Zealand scenery and see
>>> it work ;-)
>>>
>>> This works on 098a/Win98se.
>>>
>>>
>>
>> I'll try to use that flightplan for AIShip. And if Neil corrects his
>> flightplan to add the correct ending, I think that will work too.
>>
>> Vivian
>>
>>
> From: Maik Justus
> Hi Dene,
>
> I don't think it's the on-ground parameter. It's the logic, how to
> determine, if a waypoint is reached. The distance to the waypoint must
> be smaller than a threshold, and this threshold is speed depended.
> Especially if you have two waypoints rather near to each other, the
> AI-logic moving the objects fail to reach the waypoints. It would be
> better to not test for "dist < treshold" but for the derivation of dist
> being positive (if it was negative before). I already asked Durk for
> changing this logic.
>
> Maik
>
> Dene schrieb am 04.02.2007 06:06:
>>
>> Hi Vivian
>>
>> if you're looking at the code... when a ship coded as a slow aircraft in
>> the flightplan.... approaches a waypoint it gets a severe case of the
>> "wiggles" on. I suspect there is some interaction between the
>> "on-ground" parameter and the slow speed that can't register that the
>> object has "hit" that way point and is moving on. I notice it
>> particularly on my scenario in the middle of the Cook Strait....
>>
>> Cheers
>> Dene
>
>
> From: "Vivian Meazza"
>
> Maik Justus
>
>>
>> Hi Dene,
>>
>> I don't think it's the on-ground parameter. It's the logic, how to
>> determine, if a waypoint is reached. The distance to the
>> waypoint must
>> be smaller than a threshold, and this threshold is speed depended.
>> Especially if you have two waypoints rather near to each other, the
>> AI-logic moving the objects fail to reach the waypoints. It would be
>> better to not test for "dist < threshold" but for the
>> derivation of dist
>> being positive (if it was negative before). I already asked Durk for
>> changing this logic.
>>
>> Maik
>>
>> Dene schrieb am 04.02.2007 06:06:
>> >
>> > Hi Vivian
>> >
>> > if you're looking at the code... when a ship coded as a
>> slow aircraft
>> > in
>> > the flightplan.... approaches a waypoint it gets a severe
>> case of the
>> > "wiggles" on. I suspect there is some interaction between the
>> > "on-ground" parameter and the slow speed that can't
>> register that the
>> > object has "hit" that way point and is moving on. I notice it
>> > particularly on my scenario in the middle of the Cook Strait....
>> >
>
> I have already assessed that the AIAircraft flightplan logic is probably
> inappropriate and over-complex for AIShips. I will try a more plain 
> vanilla
> solution derived from the AICarrier stuff, at least to kick-off with.
>
> Vivian
>
Cheers, Neil



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Flightgear-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-users

Reply via email to