Meade LX200 commands Sr and Sd have extra space and wrong degree character
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Stellarium |
Fix Released
|
High
|
Peter |
Bug Description
This was found from experiments with a telescope emulator supporting the Meade LX-200 protocol, using the slew command (CMD+0) from within Stellarium 0.12.4 on the Mac.
The current behaviour does not match the documented protocol,
http://
http://
This was confirmed by reading https:/
bool Lx200CommandSet
{
if (end-p < 13) return false;
// set object ra:
*p++ = ':';
*p++ = 'S';
*p++ = 'r';
*p++ = ' '; // REMOVE THIS?
int x = ra;
p += 8;
p[-1] = '0' + (x % 10); x /= 10;
p[-2] = '0' + (x % 6); x /= 6;
p[-3] = ':';
p[-4] = '0' + (x % 10); x /= 10;
p[-5] = '0' + (x % 6); x /= 6;
p[-6] = ':';
p[-7] = '0' + (x % 10); x /= 10;
p[-8] = '0' + x;
*p++ = '#';
has_been_
return true;
}
i.e. This sends ":Sr HH:MM:SS#" with a space after the "Sr" before the first digit. The protocol specifies sending ":SrHH:MM.T#" or ":SrHH:MM:SS#" with no space after the "Sr".
bool Lx200CommandSet
{
if (end-p < 13)
return false;
// set object dec:
*p++ = ':';
*p++ = 'S';
*p++ = 'd';
*p++ = ' '; // REMOVE THIS?
int x = dec;
if (x < 0)
{
*p++ = '-';
x = -x;
}
else
{
*p++ = '+';
}
p += 8;
p[-1] = '0' + (x % 10); x /= 10;
p[-2] = '0' + (x % 6); x /= 6;
p[-3] = ':';
p[-4] = '0' + (x % 10); x /= 10;
p[-5] = '0' + (x % 6); x /= 6;
p[-6] = 223; // degree symbol <-- SHOULD BE '*' INSTEAD, i.e. chr(42)
p[-7] = '0' + (x % 10); x /= 10;
p[-8] = '0' + x;
*p++ = '#';
has_been_
return true;
}
i.e. This sends ":Sd sDD?MM:SS#" with a space after the "Sd" before the first digit, where ? represents chr(223).
The protocol specifies sending ":SdsDD*MM#" or ":SdsDD*MM:SS#" where the second "s" means the sign, plus or minus. Rather than a degree symbol, it should be asterisk, chr(42).
This should be a three line fix - the hard part will be testing with a few real telescopes claiming to support the Meade LX-200 protocol.
Related branches
Changed in stellarium: | |
assignee: | nobody → Bogdan Marinov (daggerstab) |
importance: | Undecided → High |
Changed in stellarium: | |
status: | Fix Committed → Fix Released |
Diff: http:// bazaar. launchpad. net/~stellarium /stellarium/ trunk/revision/ 6529