Nasal library/geo: Difference between revisions

Jump to navigation Jump to search
Add dump()
(Add dump())
Line 222: Line 222:
print(coord.is_defined()); # prints "0"
print(coord.is_defined()); # prints "0"
}}
}}
==== dump() ====
{{Nasal doc
|syntax = geo.Coord.dump();
|source = {{fgdata file|Nasal/geo.nas|t=Source}}
|text = Dumps all six coordinates into the console. It requires all three coordinates (either x/y/z or /lat/lon/alt) to be defined. Note that set_latlon() or set_xyz() must be used for this function to work correctly.
|example1 = var coord = geo.Coord.new();
coord.set_xyz(10, 10, 10);
coord.dump(); # prints "x=10.000000  y=10.000000  z=10.000000    lat=89.981086  lon=44.999998  alt=-6356742.309706"
|example2 = var coord = geo.Coord.new();
coord.set_latlon(90, 45, 10);
coord.dump(); # prints "x=0.055063  y=0.055063  z=6356762.314245    lat=90.000000  lon=45.000000  alt=10.000000"
}}
=== PositionedSearch ===


== Functions ==
== Functions ==

Navigation menu