Giter VIP home page Giter VIP logo

Comments (14)

EliasHasle avatar EliasHasle commented on July 24, 2024 1

from vesseljs.

icarofonseca avatar icarofonseca commented on July 24, 2024

Restructure API page according to Elias' suggestions (break classes into different headers, document all classes of the library).

from vesseljs.

icarofonseca avatar icarofonseca commented on July 24, 2024

Debug Hull Hydrostatics example and document it with a tutorial.

from vesseljs.

icarofonseca avatar icarofonseca commented on July 24, 2024

@EliasHasle, as to the ship.calculateStability() method, how can I force it to calculate stability parameters for a draft chosen by the user, instead of using the draft derived from weight equilibrium calculations inside the calculateDraft(shipState, epsilon=0.001) method?

from vesseljs.

icarofonseca avatar icarofonseca commented on July 24, 2024

In addition, is it ok to push example commits directly to the master branch? This will make them reachable through https://shiplab.github.io/vesseljs/ right away, as the dev branch can't be reached from there.

from vesseljs.

EliasHasle avatar EliasHasle commented on July 24, 2024

Good questions. I take the last one first. It is OK that you push commits for your own examples to the master branch, if you know what you are doing. :-) It will not be too hard to merge later.

Ship.prototype.calculateStability depends on both draft and weight, and draft depends on weight (and hull geometry). So having draft as a parameter would be misleading. We could possibly have weight (or "displacement") as a parameter, though, instead of the full ship state. The same goes for calculateDraft. I think that is cleaner, as none of those methods need to know more. But then, actually, we could have them in the hull class. I think that might be the way to go. (It could even make proper caching easier.)

What is your use case for inputting draft to Ship.prototype.calculateStability?

from vesseljs.

icarofonseca avatar icarofonseca commented on July 24, 2024

I am working on this example. The idea is to display some hydrostatic properties as functions of the draft, which should be controlled by the user with the gui slider on the page.

from vesseljs.

EliasHasle avatar EliasHasle commented on July 24, 2024

from vesseljs.

icarofonseca avatar icarofonseca commented on July 24, 2024

Yes, I understand. That's why the intention was to display only KB and BM, which depend on the submerged volume but not on the position of the center of gravity (as GM does). In that sense, they could be calculated as functions of the draft only.

from vesseljs.

icarofonseca avatar icarofonseca commented on July 24, 2024

Ok, so from the information you provided, I was able to get everything I needed from the outputs of calculateAttributesAtDraft(T): Volume of displacement, KB, BMl, BMt, LCB and LCF (https://github.com/shiplab/vesseljs/blob/master/examples/Hull_hydrostatics.html#L274). Maybe you'll still want to present those values with their hydrostatic names inside the method just to use familiar terminology to naval architects.

from vesseljs.

EliasHasle avatar EliasHasle commented on July 24, 2024

from vesseljs.

icarofonseca avatar icarofonseca commented on July 24, 2024

Ok, so I'll do it this week or the next. When I update it, should I deprecate the properties with the current terminology (Cv, xcwp, etc.) or should I leave them there? I wonder if removing them could cause incompatibilities.

from vesseljs.

EliasHasle avatar EliasHasle commented on July 24, 2024

from vesseljs.

hmgaspar avatar hmgaspar commented on July 24, 2024

@icarofonseca We shoukd have a "manual" for new examples, given that every year we expect to have students creating new examples. Let's talk about it on the october meeting. I'm closing it for now.

from vesseljs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.