Board index FlightGear Development Aircraft

Sailboats

Questions and discussion about creating aircraft. Flight dynamics, 3d models, cockpits, systems, animation, textures.

Re: Sailboats

Postby HHS » Fri Aug 29, 2008 12:30 pm

glazmax wrote:
I'm no programmer too, and should be better quite, but I hope that maybe there will be some person who read this and contribute....


Forget it, what I have learned out of the process of 3d modeling is to try an attempt, if then people get curious and want to help: fine, but don't rely on imagination.


This is certainly true.

Currrently people try to implement shaders, which means in detail landing lights and shadows, but waves(ocean) are more sophisticated to model in my opinion. Why? Because you need a 3d model and a simulation model seaplanes, boats have to respond to and those 2 models have to be in sync to be authentic. So to model 3d waves that are present optical and for a model is not a bad idea for me. Sure, for the appearence of water, there can be different approaches to look believable, and effects can be added, but basically you have to see and feel a wave.
So I think detlefs idea is quite good, it just needs the finishing touches in my opinion :)

Fly on,
glazmax


Indeed, as long we have no other possibilities, we have to try that. Hope Detlef will go on that, sailing in FGFS would be fun- thinking of the derivates we could do: Ice-sailer, kite-surfing etc....
Up, up and away
User avatar
HHS
 
Posts: 3625
Joined: Thu Jul 19, 2007 9:09 am
Version: GIT

Re: Sailboats

Postby saturn5 » Fri Sep 12, 2008 5:35 am

I have been researching sailboats and looking at the oscar-sette yasim model. I thought maybe by editing the ballast and dimensions, and using a wing set at 90 degree dihedral, would be one approach. However, it says the wing is mirrored, and there does not seem to be a way to rotate the entire wing anyway. Vstab is not mirrored but then the wiki says its not involved in the solver computation (ignoring the keel, sail shape changes, etc. for the time being). (http://wiki.flightgear.org/index.php/YASim). Anyway, here is what I have been looking at about sailboats:

http://scitation.aip.org/journals/doc/P ... 38_1.shtml (has good diagram of forces)
http://web.mit.edu/2.972/www/reports/sa ... _boat.html
http://ffden-2.phys.uaf.edu/211_fall200 ... %20Folder/
http://www.physclips.unsw.edu.au/jw/sailing.html

There are several projects on sourceforge for GPL sailboat simulators and some for marine, but they all seem to be more or less stale proposals. http://sourceforge.net/projects/free-sail/ , http://sourceforge.net/projects/worldsailor/ , http://sourceforge.net/projects/teppersen/ , http://sourceforge.net/projects/opensail/

Coming back to the OS model, its not clear if FG weather would interact with an appropriately arranged wing to actually move the boat. Maybe it is simpler to model a square sail, but its not clear how to do that with yasim either. I am not sure what is needed for this to proceed.
saturn5
 
Posts: 102
Joined: Fri Jan 04, 2008 10:32 pm

Re: Sailboats

Postby DFaber » Fri Sep 12, 2008 9:38 am

Hi saturn5,

saturn5 wrote:I have been researching sailboats and looking at the oscar-sette yasim model. I thought maybe by editing the ballast and dimensions, and using a wing set at 90 degree dihedral, would be one approach. However, it says the wing is mirrored, and there does not seem to be a way to rotate the entire wing anyway. Vstab is not mirrored but then the wiki says its not involved in the solver computation (ignoring the keel, sail shape changes, etc. for the time being).


I have already tried the wing/vstab approach. It was quite difficult to trick the mass distribution, so the ship doesn't lists and rolls on it's back. Also one can't alter the incidence of the wing during runtime. Those tries lead to the idea of using thrusters and triangulation, as the usual surfaces aren't really useful here.



These are really interesting links, they will help me a lot.

saturn5 wrote:Coming back to the OS model, its not clear if FG weather would interact with an appropriately arranged wing to actually move the boat. Maybe it is simpler to model a square sail, but its not clear how to do that with yasim either. I am not sure what is needed for this to proceed.


Weather does interact with either vstab/hstab objects and the fuselage. I will try to simulate a mast by fuselage object. Sadly my time is limited these days :-(

Greetings
Detlef Faber
FlightGear Development:
http://flightgear-de.net

my 3D-Art:
https://www.sol2500.net
DFaber
 
Posts: 709
Joined: Fri Dec 01, 2006 8:51 pm
Location: Aachen, Germany
Version: GIT
OS: Linux

Re: Sailboats

Postby saturn5 » Sat Sep 13, 2008 8:55 pm

Hello DF, thank you for a very informative response. I have gone back and re-read your earlier notes as well, and have continued research. I have been trying to understand what is needed.

Found some basic sail games of possible interest-

National Geographic (adobe flash req.). 2d game, can adjust the sail and the rudder
http://www.nationalgeographic.com/volvo ... index.html

Very basic program (I tested on Win 98). adjust rudder only.
http://www.image-ination.com/SimpleSail/
from here
http://www.image-ination.com/sailcalc.html (also has technical sailboat data)

After seeing these, it seemed logical that there could be an easier route to a FG sailboat. I thought rather then trying to directly simulate the forces, model the boats speed and direction based on pre-compiled data and 1 user input (like Adlers program seems to). The rudder input, and wind direction, could come from FG, but it would require a table of data based on real or predicted sailboat data. (along the lines of what is shown graphically here
http://scitation.aip.org/journals/doc/P ... _1fig5.jpg (a speed polar diagram)

Which reminded me of the earlier article-
http://scitation.aip.org/journals/doc/P ... 38_1.shtml

There are simple and complex speed-prediction computer programs.

Such calculations are confirmed experimentally, with a degree of accuracy that depends on the sophistication of the model and on how much the program has been tuned for a specific kind of sailboat.


This lead to looking at Velocity Prediction Program (VPP). programs used for predicting sailboat forces/performance. These have both aerodynamic and hydrodynamic models to compute the forces on the mast and hull. This caused me to question how YASim could compute the resulting force and velocity, if it does not have hydrodynamic model for sailboat hulls.

Theory and background section is good. These two have basic a basic VPP (not GPL though)
http://www.barefootsworld.net/windwalke ... gcalc.html
another basic VPP program
http://www.wb-sails.fi/news/SailPowerCa ... tm#Results

This has a much longer VPP description.
http://www.sailinganarchy.com/YD/2003/vpp.htm
The VPP consists of input values, some independent variables, the aerodynamic and hydrodynamic models, and the big daddy of them all; the solution subroutine. The program works by adjusting the independent variables until a particular set of equations is solved, balancing the aerodynamic and hydrodynamic forces of a yacht. These equations govern the physics of the sailing yacht, and must be solved together so that the boat sails in a ‘steady’ state.


I found a GPL VPP here, though it is written for Matlab.

http://sourceforge.net/projects/gvpp/

With the output data of a VPP, or similar recorded data about a sailboat, perhaps the location of the sailboat could be adjusted directly. In other words, calculate velocity and location just using the rudder orientation and the direction of the wind (and leave other complications for later).
saturn5
 
Posts: 102
Joined: Fri Jan 04, 2008 10:32 pm

Re: Sailboats

Postby DFaber » Mon Sep 15, 2008 7:36 am

Hi saturn5,

thanks a lot for your input. I got a lot new inspiration from it.

saturn5 wrote:After seeing these, it seemed logical that there could be an easier route to a FG sailboat. I thought rather then trying to directly simulate the forces, model the boats speed and direction based on pre-compiled data and 1 user input (like Adlers program seems to). The rudder input, and wind direction, could come from FG, but it would require a table of data based on real or predicted sailboat data. (along the lines of what is shown graphically here
http://scitation.aip.org/journals/doc/P ... _1fig5.jpg (a speed polar diagram)

[snip]

With the output data of a VPP, or similar recorded data about a sailboat, perhaps the location of the sailboat could be adjusted directly. In other words, calculate velocity and location just using the rudder orientation and the direction of the wind (and leave other complications for later).


Unfortunately there is no way to "force" a velocity or position during runtime. The FDM will not respond and continue it's own solution.

There is another way to use the "null" FDM, but you need to write the moving and ground/object interaction yourself. I began something like that with an Aircraft independant walker, but it has not gone far yet.

Of course one can write a complete new FDM for ships, but my cpp knowledge is nearly none existing.

saturn5 wrote:This lead to looking at Velocity Prediction Program (VPP). programs used for predicting sailboat forces/performance. These have both aerodynamic and hydrodynamic models to compute the forces on the mast and hull. This caused me to question how YASim could compute the resulting force and velocity, if it does not have hydrodynamic model for sailboat hulls.


YASim has some special attributes for it's water gears. The friction values and extension lengths can be adjusted to vary with velocity. This simulates the pre take off gliding of the floats. Sailboats and speedboats do something similar. However, this involves a lot of fine tuning of the hull.

The thing missing is a computation of the forces that move the ship. That is where Nasal comes into play I plan a set of four or three thrusters for each sail and a Nasal computation of the resulting forces. Another thruster can be used to simulate hydrodynamic forces on the keel.

Greetings
Detlef Faber
FlightGear Development:
http://flightgear-de.net

my 3D-Art:
https://www.sol2500.net
DFaber
 
Posts: 709
Joined: Fri Dec 01, 2006 8:51 pm
Location: Aachen, Germany
Version: GIT
OS: Linux

Re: Sailboats

Postby AndersG » Mon Sep 15, 2008 9:21 am

I think JSBSim might be better suited for this application than YASim since you get full control over how the aerodynamic forces and moments are calculated and most likely can model the hydrodynamic forces and moments using functions in the JSBSim configuration file and apply them as external forces.
I've modelled added mass for my airships with reasonable results in this way.

Cheers,

Anders
Callsign: SE-AG
Aircraft (uhm...): Submarine Scout, Zeppelin NT, ZF Navy free balloon, Nordstern, Hindenburg, Short Empire flying-boat, ZNP-K, North Sea class, MTB T21 class, U.S.S. Monitor, MFI-9B, Type UB I submarine, Gokstad ship, Renault FT.
AndersG
 
Posts: 2524
Joined: Wed Nov 29, 2006 10:20 am
Location: Göteborg, Sweden
Callsign: SE-AG
OS: Debian GNU Linux

Re: Sailboats

Postby saturn5 » Mon Sep 29, 2008 6:03 pm

Perhaps it is possible with JSBsim, but writing a VPP can get very complicated-

http://sourceforge.net/project/showfile ... _id=480515

In the manual for this one, he says he wanted to use C++ but could not find a library with "non-linear contrained minimization algorithm'' , so he used Matlab. GVPP could potentially be used to generate data for a FG sailboat, but not dynamically and would require having access to Matlab. For FG to have its own proper real-time VPP would require very bright people investing serious time and with access to good sailboat data. As a point of reference, commercial VPP can cost thousands of dollars to buy. However, I don't think this level of simulation is really required to be able to sail in FG.

The key then, with limited amount of time and resources, is to make sailboat simulation simpler, such as they did in the games mentioned earlier. I think that the best route is to avoid using a FDM to calculate aerodynamic data (or the hydrodynamic data), and instead use a pre-calculated table of wind velocity and direction, to sailboat speed. In other words, from the boat heading and wind velocity, lookup in a table what the boat velocity would be, then calculate change in distance.

However, this approach requires writing a C++ program (as df pointed out earlier), either to interface with an existing FDM (if that is even possible) or directly (perhaps like an AI object), because it does not seem feasible with nasal. One more idea to achieve a sailing experience of sorts without C++ is to use use one of the AI sailboat models and place the user view on it, but this would not offer control. I am ending my research on sailboats for FG for the time being; my conclusion is that sailboats for FG require more skills and data then was immediately apparent to me.

For those that research sailboats for FG be sure to check out-
*VPP
*speed polar diagrams
saturn5
 
Posts: 102
Joined: Fri Jan 04, 2008 10:32 pm

Re: Sailboats

Postby AndersG » Mon Sep 29, 2008 7:29 pm

saturn5 wrote:Perhaps it is possible with JSBsim, but writing a VPP can get very complicated-

The key then, with limited amount of time and resources, is to make sailboat simulation simpler, such as they did in the games mentioned earlier. I think that the best route is to avoid using a FDM to calculate aerodynamic data (or the hydrodynamic data), and instead use a pre-calculated table of wind velocity and direction, to sailboat speed. In other words, from the boat heading and wind velocity, lookup in a table what the boat velocity would be, then calculate change in distance.


JSBSim is primarily aimed for table based simulation - for aircraft that usually means an extensive use of lookup tables (e.g. based on data from wind tunnel experiments) in the calculation of the aerodynamic forces. As far as I can see one can do the same for hydrodynamic interactions in JSBSim. However, I think you'll need tables "outputting" force (or acceleration) rather than velocity (though I think you could guesstimate the drag to get the stable state forces required for a certain velocity).

Cheers,

Anders
Callsign: SE-AG
Aircraft (uhm...): Submarine Scout, Zeppelin NT, ZF Navy free balloon, Nordstern, Hindenburg, Short Empire flying-boat, ZNP-K, North Sea class, MTB T21 class, U.S.S. Monitor, MFI-9B, Type UB I submarine, Gokstad ship, Renault FT.
AndersG
 
Posts: 2524
Joined: Wed Nov 29, 2006 10:20 am
Location: Göteborg, Sweden
Callsign: SE-AG
OS: Debian GNU Linux

Previous

Return to Aircraft

Who is online

Users browsing this forum: No registered users and 11 guests