OrbitHangar
Addon Comments
- Joined
- Apr 9, 2008
- Messages
- 3,832
- Reaction score
- 18
- Points
- 0
Author: gattispilot
LER for 2016. So now explore the Lunar Surface
updated crab steering and slowed the straighten wheels. Changed view key from G to V
DOWNLOAD
msl rover bodies disappear fix it for me and upload it to orbithanger?
it would be grateful if you do this
Post the problems in the D3d9 thread,so they can be made aware,and hopefully fix the problems.Just for info, me also I had some problem with shadows in kourou-ELS area :
- without D3D9 no problem, the shadows are on the ground.
- with D3D9 the shadows are... too high!... (they are 1 to 2 meters above the ground...)
I do not know why....
void eva2016::MoveAround(){
memset(&vs2, 0, sizeof(vs2));
vs2.version = 2;
GetStatusEx(&vs2);
if (leftmove == 0)TURN_proc = 0;
if (rightmove == 0)TURN_proc = 0;
if (leftmove == 1)TURN_proc = .25;
if (rightmove == 1)TURN_proc = .75;
double sinTurn = sin(2 * PI * TURN_proc);
double cosTurn = cos(2 * PI * TURN_proc);
//change heading
sprintf(oapiDebugString(), "hdchange %6.6f surfhd %2.2f rudderchange %d ", d_hdg, vs2.surf_hdg, i3);
if (i3 < 0){//LEFT TURN
d_hdg = d_hdg + .00001;//rate of steering change of heading
vs2.surf_hdg -= d_hdg;
//sprintf(oapiDebugString(), "turn %d SURFHDG %2.2f", i3, vs2.surf_hdg);
}
if (i3 > 0){//RIGHT TURN
d_hdg = d_hdg + .00001;//rate of steering change of heading
vs2.surf_hdg += d_hdg;
//sprintf(oapiDebugString(), "turn %d SURFHDG %2.2f", i3, vs2.surf_hdg);
if (vs2.surf_hdg>2 * PI){ vs2.surf_hdg -= 2 * PI; }
}
if (i3 == 0){// no change of heading
d_hdg = 0;
}
if (FORWARDgear == 1)//MOVING FORWARD
{
if (i3 < 0){//LEFT TURN
d_hdg = d_hdg + .00001;//rate of steering change of heading
vs2.surf_hdg -= d_hdg;
//sprintf(oapiDebugString(), "turn %d SURFHDG %2.2f", i3, vs2.surf_hdg);
}
if (i3 > 0){//RIGHT TURN
d_hdg = d_hdg + .00001;//rate of steering change of heading
vs2.surf_hdg += d_hdg;
//sprintf(oapiDebugString(), "turn %d SURFHDG %2.2f", i3, vs2.surf_hdg);
if (vs2.surf_hdg>2 * PI){ vs2.surf_hdg -= 2 * PI; }
}
if (i3 == 0){// no change of heading
d_hdg = 0;
}
sprintf(oapiDebugString(), "hdchange1 %6.6f surfhd %2.2f rudderchange %d ", d_hdg, vs2.surf_hdg, i3);
//sprintf(oapiDebugString(), "roll %6.6f pitchs %2.2f pitchs %d ", d_hdg, vs2.surf_hdg,i3);
if (TURN_proc == 0){//wheels are straight so move with heading
d_lat = (targetSpeed*oapiGetSimStep()*cos(vs2.surf_hdg) / each_deg);
d_lng = (targetSpeed*oapiGetSimStep()*sin(vs2.surf_hdg) / each_deg);
}
else {//wheels are not straight so move no matter the heading
d_lat = (targetSpeed*oapiGetSimStep()*(cosTurn) / each_deg);
d_lng = (targetSpeed*oapiGetSimStep()*(sinTurn) / each_deg);
}
//sprintf(oapiDebugString(), "turn %2.2f cos %2.2f sin %2.2f lat %2.2f lng %2.2f", TURN_proc, cosTurn, sinTurn, d_lat, d_lng);
vs2.surf_lat += d_lat*RAD;
vs2.surf_lng += d_lng*RAD;
}
if (REVERSEgear == 1)
{
if (TURN_proc == 0){//wheels are straight so move with heading
d_lat = (targetSpeed*oapiGetSimStep()*cos(vs2.surf_hdg) / each_deg);
d_lng = (targetSpeed*oapiGetSimStep()*sin(vs2.surf_hdg) / each_deg);
}
else {//wheels are not straight so move no matter the heading
d_lat = (targetSpeed*oapiGetSimStep()*(cosTurn*-1) / each_deg);
d_lng = (targetSpeed*oapiGetSimStep()*(sinTurn*-1) / each_deg);
}
//sprintf(oapiDebugString(), "turn %2.2f cos %2.2f sin %2.2f lat %2.2f lng %2.2f", TURN_proc, cosTurn, sinTurn, d_lat, d_lng);
vs2.surf_lat -= d_lat*RAD;
vs2.surf_lng -= d_lng*RAD;
}
//movesideways
if ((leftmove == 1) || (rightmove == 1)){
{
d_lat = (targetSpeed*oapiGetSimStep()*cosTurn / each_deg);
d_lng = (targetSpeed*oapiGetSimStep()*sinTurn / each_deg);
}
vs2.surf_lat -= d_lat*RAD;
vs2.surf_lng -= d_lng*RAD;
}
lng = vs2.surf_lng;
lat = vs2.surf_lat;
hdg = vs2.surf_hdg;