Changed the names of the begin and end parameters for scripted orbits

and rotations to beginDate and endDate. end is a Lua reserved word and
thus unusable as a variable name.
ver1_5_1
Chris Laurel 2008-01-20 21:31:30 +00:00
parent 2f1016737d
commit a27ae8bdb9
2 changed files with 11 additions and 11 deletions

View File

@ -49,9 +49,9 @@ ScriptedOrbit::~ScriptedOrbit()
* period - A number giving the period of the orbit. If not present,
* the orbit is assumed to be aperiodic. The orbital period is only
* used for drawing the orbit path.
* begin, end - optional values that specify the time span over which
* the orbit is valid. If not given, the orbit is assumed to be useable
* at any time. The orbit is invalid if end < begin.
* beginDate, endDate - optional values that specify the time span over
* which the orbit is valid. If not given, the orbit is assumed to be
* useable at any time. The orbit is invalid if end < begin.
* position(time) - The position function takes a time value as input
* (TDB Julian day) and returns three values which are the x, y, and
* z coordinates. Units for the position are kilometers.
@ -177,8 +177,8 @@ ScriptedOrbit::initialize(const std::string& moduleName,
// Get the rest of the orbit parameters; they are all optional.
period = SafeGetLuaNumber(luaState, -1, "period", 0.0);
validRangeBegin = SafeGetLuaNumber(luaState, -1, "begin", 0.0);
validRangeEnd = SafeGetLuaNumber(luaState, -1, "end", 0.0);
validRangeBegin = SafeGetLuaNumber(luaState, -1, "beginDate", 0.0);
validRangeEnd = SafeGetLuaNumber(luaState, -1, "endDate", 0.0);
// Pop the orbit object off the stack
lua_pop(luaState, 1);

View File

@ -49,10 +49,10 @@ ScriptedRotation::~ScriptedRotation()
*
* period - A number giving the period of the rotation. If not present,
* the rotation is assumed to be aperiodic.
* begin, end - optional values that specify the time span over which
* the rotation model is valid. If not given, the rotation model is
* assumed to be valid over all time. The rotation model is invalid if
* end < begin.
* beginDate, endDate - optional values that specify the time span over
* which the rotation model is valid. If not given, the rotation model
* is assumed to be valid over all time. The rotation model is invalid
* if end < begin.
* orientation(time) - The orientation function takes a time value as
* input (TDB Julian day) and returns three values which are the the
* quaternion (w, x, y, z).
@ -137,8 +137,8 @@ ScriptedRotation::initialize(const std::string& moduleName,
// Get the rest of the rotation parameters; they are all optional.
period = SafeGetLuaNumber(luaState, -1, "period", 0.0);
validRangeBegin = SafeGetLuaNumber(luaState, -1, "begin", 0.0);
validRangeEnd = SafeGetLuaNumber(luaState, -1, "end", 0.0);
validRangeBegin = SafeGetLuaNumber(luaState, -1, "beginDate", 0.0);
validRangeEnd = SafeGetLuaNumber(luaState, -1, "endDate", 0.0);
// Pop the rotations object off the stack
lua_pop(luaState, 1);