Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set sgh to vessel("hathi one").
- set sgsearchdist to readjson("0:/json/sgsearchdist.json").
- set longsize to (gala:radius * 2 * constant:pi/360).
- set sgdist to sgsearchdist / longsize.
- set searching to true.
- set sgang to 0.
- until not searching {
- set sglatoffset to sgdist * sin(sgang).
- set sglongoffset to sgdist * cos(sgang).
- set sgsearchgeo to gala:geopositionlatlng(sgh:geoposition:lat + sglatoffset , sgh:geoposition:lng + sglongoffset).
- if sgsearchgeo:terrainheight > 0 {
- print "LAND HO".
- print sgsearchgeo.
- set landgeo to sgsearchgeo.
- set searching to false.
- writejson(landgeo, "0:/json/landgeo.json").
- writejson(sgsearchdist, "0:/json/sgsearchdist.json").
- print char(7).
- }
- set sgang to sgang + arcsin(100/sgsearchdist).
- if sgang >= 360 {
- set sgang to 0.
- set sgsearchdist to sgsearchdist + 100.
- set sgdist to sgsearchdist / longsize.
- writejson(sgsearchdist, "0:/json/sgsearchdist.json").
- print sgsearchdist.
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement