ВНИМАНИЕ! На форуме начался конкурс - астрофотография месяца НОЯБРЬ!
0 Пользователей и 1 Гость просматривают эту тему.
Будет ли это кому-нибудь интересно?
Цитата: argrento от 10 Янв 2012 [21:20:24]Будет ли это кому-нибудь интересно?Мне будет интересно. Один зритель уже есть .
ISS (ZARYA) 1 25544U 98067A 11291.93104194 .00026332 00000-0 31169-3 0 26612 25544 51.6409 257.8008 0015904 344.0404 56.7375 15.60926300740236
static const int TLE0_SAT_NAME_START = 0; static const int TLE0_SAT_NAME_LENGTH = 24;static const int TLE1_SAT_NUMBER_START = 2; static const int TLE1_SAT_NUMBER_LENGTH = 5;static const int TLE1_SAT_CLASSIFICATION_START = 7; static const int TLE1_SAT_CLASSIFICATION_LENGTH = 1;static const int TLE1_SAT_DESIGNATOR_YEAR_START = 9; static const int TLE1_SAT_DESIGNATOR_YEAR_LENGTH = 2;static const int TLE1_SAT_DESIGNATOR_LNUMBER_START = 11; static const int TLE1_SAT_DESIGNATOR_LNUMBER_LENGTH = 3;static const int TLE1_SAT_DESIGNATOR_LPIECE_START = 14; static const int TLE1_SAT_DESIGNATOR_LPIECE_LENGTH = 3;static const int TLE1_SAT_EPOCH_YEAR_START = 18; static const int TLE1_SAT_EPOCH_YEAR_LENGTH = 2;static const int TLE1_SAT_EPOCH_START = 20; static const int TLE1_SAT_EPOCH_LENGTH = 12;static const int TLE1_SAT_MM1DERIVATIVE_START = 33; static const int TLE1_SAT_MM1DERIVATIVE_LENGTH = 10;static const int TLE1_SAT_MM2DERIVATIVE_START = 44; static const int TLE1_SAT_MM2DERIVATIVE_LENGTH = 8;static const int TLE1_SAT_BSTAR_START = 53; static const int TLE1_SAT_BSTAR_LENGTH = 8;static const int TLE1_SAT_EPHEM_TYPE_START = 62; static const int TLE1_SAT_EPHEM_TYPE_LENGTH = 1;static const int TLE1_SAT_ELEMENT_NUMBER_START = 64; static const int TLE1_SAT_ELEMENT_NUMBER_LENGTH = 4;static const int TLE1_SAT_CHECKSUM_START = 68; static const int TLE1_SAT_CHECKSUM_LENGTH = 1;static const int TLE2_SAT_NUMBER_START = 2; static const int TLE2_SAT_NUMBER_LENGTH = 5;static const int TLE2_SAT_INCLINATION_START = 8; static const int TLE2_SAT_INCLINATION_LENGTH = 8;static const int TLE2_SAT_ASCENSION_START = 17; static const int TLE2_SAT_ASCENSION_LENGTH = 8;static const int TLE2_SAT_ECCENTRICITY_START = 26; static const int TLE2_SAT_ECCENTRICITY_LENGTH = 7;static const int TLE2_SAT_PERIGEE_ARG_START = 34; static const int TLE2_SAT_PERIGEE_ARG_LENGTH = 8;static const int TLE2_SAT_MEAN_ANOMALY_START = 43; static const int TLE2_SAT_MEAN_ANOMALY_LENGTH = 8;static const int TLE2_SAT_MEAN_MOTION_START = 52; static const int TLE2_SAT_MEAN_MOTION_LENGTH = 11;static const int TLE2_SAT_REVOLUTION_NUMBER_START = 63; static const int TLE2_SAT_REVOLUTION_NUMBER_LENGTH = 5;
QString *SatelliteName;qint16 SatelliteNumber;QChar SatelliteClassification;qint16 SatelliteDesignatorYear;qint16 SatelliteDesignatorLNumber;QString *SatelliteDesignatorLPiece;qint16 SatelliteEpochYear;double SatelliteEpoch;QString* SatelliteEpochStr;QString* SatelliteFullEpochString;double SatelliteMM1Derivative;double SatelliteMM2Derivative;QString* SatelliteMM2DerivativeStr;double SatelliteBSTAR;QString* SatelliteBSTARStr;double SatelliteInclination;double SatelliteRightAscension;double SatelliteEccentricity;double SatellitePerigeeArgument;double SatelliteMeanAnomaly;double SatelliteMeanMotion;double SatelliteRevolutionNumber;
int CreateSatelliteRecord(QString*, QString*, QString*);QString* GetSatelliteName(void);qint16 GetSatelliteNumber(void);QChar GetSatelliteClasification(void);qint16 GetSatelliteDesignatorYear(void);qint16 GetSatelliteDesignatorLNumber(void);QString* GetSatelliteDesignatorLPiece(void);qint16 GetSatelliteEpochYear(void);double GetSatelliteEpoch(void);QString* GetSatelliteFullEpochString(void);double GetSatelliteMM1Derivative(void);double GetSatelliteMM2Derivative(void);double GetSatelliteBSTAR(void);double GetSatelliteInclination(void);double GetSatelliteRightAscension(void);double GetSatelliteEccentricity(void);double GetSatellitePerigeeArgument(void);double GetSatelliteMeanAnomaly(void);double GetSatelliteMeanMotion(void);double GetSatelliteRevolutionNumber(void);
int TLE::CreateSatelliteRecord(QString* TLELine0, QString* TLELine1, QString* TLELine2){ SatelliteName->append(TLELine0->mid(TLE0_SAT_NAME_START, TLE0_SAT_NAME_LENGTH)); SatelliteNumber = TLELine1->mid(TLE1_SAT_NUMBER_START, TLE1_SAT_NUMBER_LENGTH).toUInt(); SatelliteClassification = TLELine1->at(TLE1_SAT_CLASSIFICATION_START); SatelliteDesignatorYear = TLELine1->mid(TLE1_SAT_DESIGNATOR_YEAR_START, TLE1_SAT_DESIGNATOR_YEAR_LENGTH).toUInt(); SatelliteDesignatorLNumber = TLELine1->mid(TLE1_SAT_DESIGNATOR_LNUMBER_START, TLE1_SAT_DESIGNATOR_LNUMBER_LENGTH).toUInt(); SatelliteDesignatorLPiece->append(TLELine1->mid(TLE1_SAT_DESIGNATOR_LPIECE_START, TLE1_SAT_DESIGNATOR_LPIECE_LENGTH)); SatelliteEpochYear = TLELine1->mid(TLE1_SAT_EPOCH_YEAR_START, TLE1_SAT_EPOCH_YEAR_LENGTH).toUInt(); SatelliteEpochStr->append(TLELine1->mid(TLE1_SAT_EPOCH_START, TLE1_SAT_EPOCH_LENGTH)); SatelliteFullEpochString->append(TLELine1->mid(TLE1_SAT_EPOCH_YEAR_START, TLE1_SAT_EPOCH_YEAR_LENGTH + TLE1_SAT_EPOCH_LENGTH)); SatelliteMM1Derivative = TLELine1->mid(TLE1_SAT_MM1DERIVATIVE_START, TLE1_SAT_MM1DERIVATIVE_LENGTH).toDouble(); SatelliteMM2DerivativeStr->append(TLELine1->mid(TLE1_SAT_MM2DERIVATIVE_START, TLE1_SAT_MM2DERIVATIVE_LENGTH)); SatelliteBSTARStr->append(TLELine1->mid(TLE1_SAT_BSTAR_START, TLE1_SAT_BSTAR_LENGTH)); SatelliteInclination = TLELine2->mid(TLE2_SAT_INCLINATION_START, TLE2_SAT_INCLINATION_LENGTH).toDouble(); SatelliteRightAscension = TLELine2->mid(TLE2_SAT_ASCENSION_START, TLE2_SAT_ASCENSION_LENGTH).toDouble(); SatelliteEccentricity = TLELine2->mid(TLE2_SAT_ECCENTRICITY_START, TLE2_SAT_ECCENTRICITY_LENGTH).toDouble(); SatellitePerigeeArgument = TLELine2->mid(TLE2_SAT_PERIGEE_ARG_START, TLE2_SAT_PERIGEE_ARG_LENGTH).toDouble(); SatelliteMeanAnomaly = TLELine2->mid(TLE2_SAT_MEAN_ANOMALY_START, TLE2_SAT_MEAN_ANOMALY_LENGTH).toDouble(); SatelliteMeanMotion = TLELine2->mid(TLE2_SAT_MEAN_MOTION_START, TLE2_SAT_MEAN_MOTION_LENGTH).toDouble(); SatelliteRevolutionNumber = TLELine2->mid(TLE2_SAT_REVOLUTION_NUMBER_START, TLE2_SAT_REVOLUTION_NUMBER_LENGTH).toDouble(); return 0;}
QString* TLE::GetSatelliteName(){ return SatelliteName;}qint16 TLE::GetSatelliteNumber(){ return SatelliteNumber;}QChar TLE::GetSatelliteClasification(){ return SatelliteClassification;}qint16 TLE::GetSatelliteDesignatorYear(){ return SatelliteDesignatorYear;}qint16 TLE::GetSatelliteDesignatorLNumber(){ return SatelliteDesignatorLNumber;}QString* TLE::GetSatelliteDesignatorLPiece(){ return SatelliteDesignatorLPiece;}qint16 TLE::GetSatelliteEpochYear(){ return SatelliteEpochYear;}double TLE::GetSatelliteEpoch(){ SatelliteEpoch = SatelliteEpochStr->toDouble(); return SatelliteEpoch;}QString* TLE::GetSatelliteFullEpochString(){ return SatelliteFullEpochString;}double TLE::GetSatelliteMM1Derivative(){ return SatelliteMM1Derivative;}double TLE::GetSatelliteMM2Derivative(){ SatelliteMM2Derivative = SatelliteMM2DerivativeStr->split('-').at(0).toDouble(); SatelliteMM2Derivative *= qPow(10, -SatelliteMM2DerivativeStr->split('-').at(1).toDouble()); return SatelliteMM2Derivative;}double TLE::GetSatelliteBSTAR(){ SatelliteBSTAR = ("0." + SatelliteBSTARStr->split('-').at(0)).toDouble(); SatelliteBSTAR *= qPow(10, -SatelliteBSTARStr->split('-').at(1).toDouble()); return SatelliteBSTAR;}double TLE::GetSatelliteInclination(){ return SatelliteInclination;}double TLE::GetSatelliteRightAscension(){ return SatelliteRightAscension;}double TLE::GetSatelliteEccentricity(){ return SatelliteEccentricity;}double TLE::GetSatellitePerigeeArgument(){ return SatellitePerigeeArgument;}double TLE::GetSatelliteMeanAnomaly(){ return SatelliteMeanAnomaly;}double TLE::GetSatelliteMeanMotion(){ return SatelliteMeanMotion;}double TLE::GetSatelliteRevolutionNumber(){ return SatelliteRevolutionNumber;}
double TLE::GetSatelliteBSTAR(){ SatelliteBSTAR = SatelliteBSTAR = ("0." + SatelliteBSTARStr->split('-').at(0)).toDouble(); SatelliteBSTAR *= qPow(10, -SatelliteBSTARStr->split('-').at(1).toDouble()); return SatelliteBSTAR;}
struct ParserRecord;typedef int (TLE::*ParserMethod)(QString* data);struct ParserRecord{ size_t LineIndex; size_t Offset; size_t Length; ParserMethod Parser};ParserRecord parserRecords[] = {{0, 0, 24, &TLE::ParseName},{1, 2, 5, &TLE::ParseNumber},{1, 7, 1, &TLE::ParseClassification},// и так далее{0,0,0,NULL} // фиктивная запись окончания массива}int TLE::CreateSatelliteRecord(QString* TLELine0, QString* TLELine1, QString* TLELine2){ QString* lines[] = {TLELine0, TLELine1, TLELine2}; for (ParserRecord* record = parserRecords; record->Length != 0; ++record) { int result = (this->*(record->Parser))(lines[record->LineIndex]->substr(record->Offset, record->Length)); // вот и весь разбор if (result != 0) return result; }}
Я так понимаю, что использование Qt Creator автоматически подразумевает, что конечную программу можно будет скомпилировать и под Linux?
А репертуар можно заказывать? Если бы написанная программа могла ещё телескопом через ASCOM управлять, гоняясь за спутниками
Нужно сразу отрезать фронт (рисовалку/gui) от всей математики.
Как быть с QString, QChar итп, если у меня нет Qt и никогда не будет?