map=core.getObjectInfo(object_info)
//...
core.output(date + ",Az,Alt," + map["azimuth-geometric"] + "," + map["altitude-geometric"] + ",dkm," + map["distance-km"])
//...
°
core.setUseTopocentricCoordinates (true)
script error: 'Type' @ line 46: TypeError: Property 'setUseTopocentricCoordinates' of object StelMainScriptAPI(0x1ec1ee18fb0) is not a function
pd the Moon shows distance variation when stepping through the hour, just now as much as expected due to Earth's rotation.
core.setUseTopocentricCoordinates (true)
script error: 'Type' @ line 46: TypeError: Property 'setUseTopocentricCoordinates' of object StelMainScriptAPI(0x1ec1ee18fb0) is not a function
I asked:> Have you activated Topocentric correction? I.e., does the Moon show distance variation in just the on-screen text when you are stepping through the hours?I must apparently reformulate with even more words:Have you activated Topocentric correction in the checkbox which you can click in the Graphical User Interface (GUI)?
I.e., does the Moon show distance variation in just the on-screen text in the top-left area of the display when you are manually stepping through the hours using the time panel?
Once you have checked this, you may find another scripting function useful: core.setPlanetocentricCalculations(bool)It has inverse logic to a function that you may have attempted to use from the non-scriptable StelCore. Note that JavaScript's core object is not a StelCore, as described in that thread you have found.
core.setTimeRate(0);
jd=core.getJDay();
for (h=0; h<24; ++h)
{
core.setJDay(jd+h/24);
core.wait(0.1)
map=core.getSelectedObjectInfo()
core.output(map["distance-km"])
}
year = "2020"
month = "02"
local_output_path = "D:\\Users\\x\\"
dir_name = "height-star"
output_path = local_output_path + "\\" + dir_name + "\\"
// star name
object_info = "HIP54589"
object_info = "Sun"
object_info = "Moon"
//object_info = "Earth"
observer_location = "Caracas, Venezuela"
// how many points per file ; test
ciclos = 240
///////////////////////// don't modify below this line
core.setPlanetocentricCalculations(true)
output_fname = output_path + "heightstar-"+object_info+"-"+year + "-" + month + ".csv"
core.selectObjectByName(object_info, true);
map=core.getObjectInfo(object_info)
core.resetOutput()
core.setObserverLocation(observer_location)
core.setDate(year + "-" + month + "-01T00:00:00", "UTC")
for (i=0; i<ciclos; i++)
{
map=core.getObjectInfo(object_info)
date = core.getDate()
core.output(date + ",Az,Alt," + map["azimuth-geometric"] + "," + map["altitude-geometric"] + ",dkm," + map["distance-km"])
core.setDate("+"+minutos_medida+" minutes", "UTC")
core.wait(0.1);
}
core.saveOutputAs(output_fname)
core.debug("fin")
Regards
minutos_medida = 20
--
You received this message because you are subscribed to the Google Groups "Stellarium" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stellarium+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/stellarium/ce16b6da-8531-446c-9f76-df9a899d4b21n%40googlegroups.com.