|
|
General HydroStatics
Ship Stability Software |
|
Command of the Week
(New or interesting aspects of GHS that you may not know about) |
|
DISPLAY WEIGHT ITEMS?
|
|
In GHS, geometric descriptions and mass descriptions are handled separately.
The DISPLAY command displays items that are defined geometrically, but it cannot
display weight items (such as are defined by the ADD command) because
geometric envelopes are directly tied to weight items.
In the Load Editor environment, a weight item's location is indicated as a point in the "cartoon" outline of the vessel at the bottom of the screen, but there is no geometrically precise way to show a weight item's location unless geometry is associated with it. For a quick look at weight-item locations, it's not difficult to make little spheres to mark centers of gravity and then show them with the DISPLAY command. Here's a macro for your toolbox: |
|
MACRO DISPLAY_WTS
IF FEXIST TEMP.RFX THEN ERASE TEMP.RFX VARIABLE (LE) L,T,V,D VARIABLE (WE) W UNIT SAVE UNIT MT MACRO T SET I={I} PLUS 1 ADD ({I}) *,W,L,T,V /ACCESS IF "{W}"="" THEN EXIT IF {W}=0 THEN EXIT T %1 SET D={W} TIMES 6 DIV 3.1416 POW 0.333 WRITE (LINE) TEMP.RFX \CREATE POINT{I}.S \SPH {L},{T},{V},{D} \INB -99 \/ \LOAD (POINT{I}.S)=1 EXIT T // VARIABLE I=1 .T WRITE (LINE) TEMP.RFX \PART=* \DISPLAY STATUS \QUIT PM ENTER PMX TEMP.RFX /DIRECT ERASE TEMP.RFX UNIT REST / |
|
Each sphere is sized to make its weight at 1.0 density equal the weight of the item it represents.
We tested it with our tanker model: |
|
READ TANKER.GF UNITS = MT ADD "Crew and Effects " 4 1.0F 0 11.5 ADD "Engine Room Spares" 15 8.0 0 2.0 ADD "Bosun's Stores " 8 91.3F 0 10.5 ADD "Hoses and Fittings" 6 25.9F 0 9.9 .DISPLAY_WTS |
|
| It looks like the engine room spares are being towed behind. Probably the 8.0 longitudinal location should be 8.0F. |
|
Questions, comments, or requests?
Contact Creative Systems, Inc. USA phone: 360-385-6212 Fax: 360-385-6213 Office hours: 7:00 am - 4:00 pm Pacific Time, Monday - Friday Mailing address: PO Box 1910 Port Townsend, WA 98368 USA Click here for an index to this and previous COWs |