¡Hola! Somos el equipo del simulador Soyuz TMA, programa que simula el vuelo orbital de la nave Soyuz y la Estación Espacial Internacional, encuentro y atraque de la nave espacial con la ISS, así como desacoplamiento y descenso. Todo esto se simula tanto en el modo automático (es decir, bajo el control del equipo de a bordo del Motion Control System) como en el modo de vuelo manual, que son idénticos en su composición algorítmica y lógica a los utilizados a bordo de la nave espacial Soyuz TMA.
Hemos desarrollado un software llamado "Modelado y Control" en el entorno C ++ Builder 6. ¿Por qué exactamente en él, y no en VS? Este es nuestro primer proyecto y antes ninguno de nosotros tenía experiencia en programación, y más aún en construcción de simuladores, así que por “Pen tests” se eligió el entorno más simple, pero al mismo tiempo se desarrolla el código para que pueda integrarse rápidamente en otro entorno (Qt, VS).
En primer lugar, decidimos desarrollar los formularios de la ventana principal para depurar el funcionamiento de los algoritmos de software: un registro de registro de eventos, así como formatos que simulan el equipo a bordo con el que interactúa el cosmonauta durante el programa de vuelo.
- " ". , , . , . , , , , . .
:
:
(Jxx, Jyy, Jzz, Jxy, Jyz, Jzx) - . , .
( ).
.
:
.
J2000.
:
( ).
(, , ).
(Wx, Wy, Wz).
:
( ).
.
.
.
.
:
, -, , , , .
- , . , TSaveDialog TOpenDialog. ini (TIniFile), . .
( , ) .
, .
//
struct{
//// ////
TDateTime nu_day; // 2 /
//// ////
double vec_j2000_mks[3]; // 8 .. J2000 (X, Y, Z)
double vel_j2000_mks[3]; // 11 .. J2000 (X, Y, Z)
double Q_mks[4]; // 14 0 1 2
double w_j2000_mks[3]; // 18 J2000 (Wx Wy Wz)
double vec_mks_PC[3]; // 21 .. (X, Y, Z)
double m_mk; // 24
double mi_mks[3][3]; // 25 (Jxx, Jxy, Jxz...)
//// ////
double vec_j2000_tk[3]; // 34 .. J2000 (X, Y, Z)
double vel_j2000_tk[3]; // 37 .. J2000 (X, Y, Z) 0 1 2 3
double Q_tk[4]; // 40 J2000 (Qs, Qx, Qy, Qz)
double w_j2000_tk[3]; // 44 J2000 (Wx Wy Wz)
double vec_tk_TPK[3]; // 47 .. / (X, Y, Z)
double m_tk; // 50
double mi_tk[3][3]; // 51 (Jxx, Jxy, Jxz...)
//// M I S C ////
double vec_solar[3]; // 60 J2000 J2000 (ex, ey, ez)
unsigned long r_st_mks; // 63
unsigned long n_su_4_dk; // 64 , (, )
unsigned long nu_otor_switch_styk_dk; // 65 № , ( )
double tk_top_zap; // 66 ( +)
double mks_top_zap; // 67 ( +)
unsigned long pr_doking; // 68
unsigned long nr_sudn; // 69
} NU_temp;
//
static bool USO_Booled[20][16]; // ( _ .. 3.7)
(. . - ISBN 5-7038-2178-9), ( SoyCOM) , .
SGP4, ( TLE - ).
() UI , "" -
"-16". ().
, .
: () 15- ( + / -), "" - . . :
/ ( 16- ).
( ).
.
/ .
, , .
, - , "" ( 246), (1-1) ( , () ). 20.
C++ Builder 6 Visual Studio (, MFC + OpenGL ) (***_form.cpp) , /. :
, ON, brvi_on = true;
void __fastcall TIrBrForm::brvi_on_btnClick(TObject *Sender)
{
brvi_on=true; //
Panel1->Color=clLime; //
}
- , , , , . . - , №228
|
|
|
|
14 |
|
15 |
|
17 |
|
18 |
"0" |
30 |
"1" |
31 |
|
|
|
|
24 |
|
25 |
|
27 |
|
28 |
|
04 |
|
05 |
TPanel, Caption. - . "1":
void __fastcall TIrBrForm::brvi_btn_1Click(TObject *Sender)
{
if(brvi_on){
USO_BitType[16][3] = 0111;
if(i1->Caption=="")
i1->Caption="1";
else if(i2->Caption=="")
i2->Caption="1";
else if(i3->Caption=="")
i3->Caption="1";
else if(i4->Caption=="")
i4->Caption="1";
else if(i5->Caption=="")
i5->Caption="1";
else if(i6->Caption=="")
i6->Caption="1";
else if(i7->Caption=="")
i7->Caption="1";
else if(i8->Caption=="")
i8->Caption="1";
else if(i9->Caption=="")
i9->Caption="1";
else if(i10->Caption=="")
i10->Caption="1";
else if(i11->Caption=="")
i11->Caption="1";
else if(i12->Caption=="")
i12->Caption="1";
else if(i13->Caption=="")
i13->Caption="1";
else if(i14->Caption=="")
i14->Caption="1";
else {}
}
}
, for, . . , "", , "".
, :
void __fastcall TIrBrForm::isp_btnClick(TObject *Sender)
{
if(brvi_on) { //
if(i1->Caption==""&&i2->Caption==""){ // ,
i1->Caption=="A"; //
i2->Caption=="A";
JPS(3,is_irvi,is_operator,"",""); //
} else { // ( 1 2 )
AnsiString brvi_msg = i1->Caption+i2->Caption+i3->Caption+i4->Caption+ //
i5->Caption+i6->Caption+i7->Caption+i8->Caption+i9->Caption+i10->Caption+
i11->Caption+i12->Caption+i13->Caption+i14->Caption+i15->Caption;
JPS(1,is_operator,is_irvi,brvi_msg,"");
Timer1->Enabled=true; //
//
i1->Caption="";
i2->Caption="";
i3->Caption="";
i4->Caption="";
i5->Caption="";
i6->Caption="";
i7->Caption="";
i8->Caption="";
i9->Caption="";
i10->Caption="";
i11->Caption="";
i12->Caption="";
i13->Caption="";
i14->Caption="";
i15->Caption="";
irvi_string = brvi_msg; //
ChekIrvi(irvi_string); }} else //
JPS(3,is_miu,is_operator,cmd_brvi_error,""); //
}
, AnsiString irvi_string. ChekIrvi :
void ChekIrvi (AnsiString irvi_str){
if(irvi_str.IsEmpty())JPS(3,is_miu,is_operator," !",""); else {
irvi_type.mode = StrToInt(irvi_str.SubString(1,2)); // ""
switch (irvi_type.mode) { //
case 00: /* - 1 - 4 */ break;
case 04: /* 10- */ break;
case 05: /* 8- */ break;
case 10: /* */ break; // Arg addr RUS AUS data?
case 11: /* 1- */ break;
case 12: /* 2- */ break;
case 14: /* 10- */ // 14,
if((irvi_str.SubString(3,5)).IsEmpty())JPS(3,is_miu,is_operator," !",""); else {
irvi_type.addr = StrToInt(irvi_str.SubString(3,5)); //
if(CorrectAddr(irvi_type.addr)) { // , ,
if((irvi_str.SubString(8,7)).IsEmpty())JPS(3,is_miu,is_operator," !",""); else {
irvi_type.value = StrToInt(irvi_str.SubString(8,7)); //
ArgonMemoryType[irvi_type.addr] = irvi_type.value; //
SetItvi(irvi_type.mode,irvi_type.addr,ArgonMemoryType[irvi_type.addr], irvi_type.z ); //
JPS(4,is_argon,is_irvi," "+ // ( )
IntToStr(irvi_type.value)+" "+IntToStr(irvi_type.addr),"");}}
else { // ,
irvi_err = true;
JPS(3,is_argon,is_operator,arg_addr_error,""); } } // 16
break;
case 15: /* 8- */ break;
case 17: /* 10- */ break;
case 18: /* 8- */
// irvi_type.addr = StrToInt(irvi_str.SubString(3,5)); //
// if(CorrectAddr(irvi_type.addr)) { // , ,
//irvi_type.value = StrToInt(irvi_str.SubString(8,7)); //
// ArgonMemoryType[irvi_type.addr] = irvi_type.value; //
//SetItvi(irvi_type.mode,(irvi_type.addr)+1,ArgonMemoryType[irvi_type.addr], irvi_type.z ); //
//mode18act=true;
break;
case 21: /* 1- */ break;
case 22: /* 2- */ break;
case 24: /* 10- */ // 24,
irvi_type.addr = StrToInt(irvi_str.SubString(3,5)); //
if(CorrectAddr(irvi_type.addr)) { // , ,
SetItvi(irvi_type.mode,irvi_type.addr,ArgonMemoryType[irvi_type.addr], irvi_type.z ); } //
else { // ,
irvi_err = true;
JPS(3,is_argon,is_operator,arg_addr_error,""); } // 16
break;
case 25: /* 8- */ break;
case 27: /* 10- */ break;
case 28: /* 8- */break;
case 30: /* - */
irvi_type.addr = StrToInt(irvi_str.SubString(3,5)); //
if(CorrectAddr(irvi_type.addr)) { // , ,
irvi_type.value = StrToInt(irvi_str.SubString(8,7)); //
mode_30(irvi_type.addr,irvi_type.value); } //
else { // ,
irvi_err = true;
JPS(3,is_argon,is_operator,arg_addr_error,""); } // 16
break;
case 31: /* - */
irvi_type.addr = StrToInt(irvi_str.SubString(3,5)); //
if(CorrectAddr(irvi_type.addr)) { // , ,
irvi_type.value = StrToInt(irvi_str.SubString(8,7)); //
mode_31(irvi_type.addr,irvi_type.value); } //
else { // ,
irvi_err = true;
JPS(3,is_argon,is_operator,arg_addr_error,""); } // 16
break;
case 40: /* */ break;
case 41: /* */ break;
case 42: /* */ break;
case 43: /* */ break;
case 44: /* */ break;
case 45: /* */ break;
case 46: /* */ break;
case 48: /* */
break;
default: irvi_err = true; // ( )
JPS(3,is_argon,is_irvi,"",""); //
JPS(3,is_miu,is_operator," !","");
irvi_type.addr = StrToInt(irvi_str.SubString(3,5));
irvi_type.value = StrToInt(irvi_str.SubString(8,7));
break;
} } }
/ , . , :
(, , .) .
"-16", " 16", :
( ), ( , .. 2 - UDP), , (.. 2 3) . . TLabel , .
( ) ( ).
, , - . "-" . - , , . :
, , - №219 ( № 5.19, № 5.1)
.. . , . - () , (), , . , , "", "7". , , "" .
, , :
, - , , () . , 11 " 4" 15 " 15" 13 " 8".
.
static bool KSP_Booled[16][9];
, , true, . 7 " " KSP_Booled[0][6]=true;
, KSP_Booled[0][6]=1 , , , " ", :
// , 7
...
if (KSP_Let[0]){ //
KSP_Booled[0][6]=true; // 7 -
JPS(1,is_operator,is_miu,is_ksp,"7"); } else //
...
// uso_model.cpp USO_work
...
if(KSP_Booled[0][6]) { // A 7
KSP_Booled[0][6] = false;
// 95
USO_Booled[0][3]=true;
kdu_sdd = false;
}
...
// -
...
if(USO_Booled[0][3]){ // KSP A7
A7_LABEL->Color=clLime;
A7_LABEL->Font->Color=clBlack; } else {
A7_LABEL->Color=clGreen;
A7_LABEL->Font->Color=clYellow; }
...
Por lo tanto, implementamos la lógica estándar de trabajar con la PCB y USO, por supuesto, si hay personas aquí que estén versadas en la USO de la nave espacial Soyuz que hayan encontrado un error en nuestra interpretación de la lógica de trabajo con la PCB, corríjannos, porque no tenemos materiales sobre USO y construimos esta lógica estudiando el trabajo de los modelos InPU y el manual para trabajar con el sistema Neptune-ME.
Creo que esta es mucha información para una publicación, así que describiré el resto de formatos en la próxima publicación.