Open 303055 opened 5 years ago
Because you have not sent your patches yet :-)
I'll try to do it ^^ But I'm not a coding pro: p
it is enough that I modify this file? https://github.com/Stellarium/stellarium/blob/master/plugins/TelescopeControl/src/Lx200/Lx200Command.cpp
thx
I think you should extend the protocol for all instruments. The original developer of the telescope plugin has unfortunately left the project, and I don't know who could test your development.
Maybe somebody else can answer this?
Ah, if anyone can show me, I want to :) I saw for example:
bool Lx200CommandGetRa::writeCommandToBuffer(char &p, char end) { if (end-p < 5) return false;
// get RA:
*p++ = '#';
*p++ = ':';
*p++ = 'G';
*p++ = 'R';
*p++ = '#';
has_been_written_to_buffer = true;
return true;
}
int Lx200CommandGetRa::readAnswerFromBuffer(const char &buff, const char end) { if (buff < end && *buff=='#') buff++; // ignore silly byte
if (end-buff < 8)
return 0;
bool long_format = true;
int ra;
const char *p = buff;
ra = ((*p++) - '0');
ra *= 10;
ra += ((*p++) - '0');
if (*p++ != ':')
{
#ifdef DEBUG4
*log_file << Now()
<< "Lx200CommandGetRa::readAnswerFromBuffer: "
"error: ':' expected"
<< endl;
#endif
return -1;
}
ra *= 6; ra += ((*p++) - '0');
ra *= 10; ra += ((*p++) - '0');
switch (*p++)
{
case ':':
ra *= 6; ra += ((*p++) - '0');
ra *= 10; ra += ((*p++) - '0');
if (end-buff < 9)
return 0;
break;
case '.':
ra *= 10; ra += ((*p++) - '0');
ra *= 6;
long_format = false;
break;
default:
*log_file << Now()
<< "Lx200CommandGetRa::readAnswerFromBuffer: "
"error: '.' or ':' expected"
<< endl;
return -1;
}
if (*p++ != '#')
{
*log_file << Now()
<< "Lx200CommandGetRa::readAnswerFromBuffer: "
"error: '#' expected"
<< endl;
return -1;
}
#ifdef DEBUG4
*log_file << Now()
<< "Lx200CommandGetRa::readAnswerFromBuffer: "
<< "RA = "
<< qSetPadChar('0')
<< qSetFieldWidth(2) << (ra/3600)
<< qSetFieldWidth(0) << ':'
<< qSetFieldWidth(2) << ((ra/60)%60)
<< qSetFieldWidth(0) << ':'
<< qSetFieldWidth(2) << (ra%60)
<< qSetFieldWidth(0) << qSetPadChar(' ')
<< endl;
#endif
buff = p;
server.longFormatUsedReceived(long_format);
server.raReceived((unsigned int)floor(ra * (4294967296.0/86400.0)));
return 1;
}
void Lx200CommandGetRa::print(QTextStream &o) const { o << "Lx200CommandGetRa"; }
I can copy it and replace in GA? and change the code after?
bool Lx200CommandGetRa::writeCommandToBuffer(char &p, char end) { if (end-p < 5) return false;
// get RA:
*p++ = '#';
*p++ = ':';
*p++ = 'G';
*p++ = 'A';
*p++ = '#';
has_been_written_to_buffer = true;
return true;
.....
thx
303055 Hello! Could You tell me did You make it (the plugin ehacement) and is it working or not i need it in the same purpose as you im building arduino scope and i would be very gratefull if i could skip the math.
It seems some extensions to the telescope control protocols could be implemented for and by somebody with alt-azimuthal telescopes like Dobsons modified with Arduino-based control devices. Now, who wants to do sferixx's homework and develop support for some reference DIY kit?
This is a good task for the community to participate in the contribution into Stellarium. Who wants to help us?
Hi! Very new to this codebase (actually just cloned the repo today) but I'd like to try to tackle this issue if that's ok. It might take some time.
Sure, go ahead. You will only have to extend the TelescopeControl plugin. If possible, all telescope models will have to support the protocol. I cannot test any, though.
Hi guys,
I tried then search on the telescope plugins the commands: GA # and: GZ # for the altitude coordinates and Azimuth of an object, but they do not seem present. I use a telescope Dobson type, and have to do the math to pass in equatorial and vice versa is counter productive knowing that stellarium calculates..
Why are these orders not present?
thx :)