53f09ff6a5
""" - ground properties (e.g. feel bumpiness and the reduced friction of grass or go swimming with the beaver) - initial load for yasim gears (to get rid of the jitter the beaver has on ground) - glider/winch/aerotow (do winch start with YASim glider or do aerotow over the net) I will place a how-to on the wiki soon, here very short: use the sgs233y (or the bocian if you have AJ (up ot now) non-GPL bocian) winch start: Ctrl-w for placing the winch, hold w to winch, press Shift-w to release the tow aerotow: Place the glider within 60m to a MP-aircraft, press Ctrl-t to tow to this aircraft. If the MP-aircraft is the J3 and the patch is installed on both sides, the J3 feels the forces, too. The J3-pilot has to taxi very slow up to the moment, the glider starts moving. Increase the throttle gently. Don't lift the J3 early, wait for the glider being lifted, lift gently. """
60 lines
1.2 KiB
C++
60 lines
1.2 KiB
C++
#include "Glue.hpp"
|
|
|
|
#include <simgear/scene/material/mat.hxx>
|
|
#include "Ground.hpp"
|
|
namespace yasim {
|
|
|
|
Ground::Ground()
|
|
{
|
|
}
|
|
|
|
Ground::~Ground()
|
|
{
|
|
}
|
|
|
|
void Ground::getGroundPlane(const double pos[3],
|
|
double plane[4], float vel[3])
|
|
{
|
|
// ground. Calculate a cartesian coordinate for the ground under
|
|
// us, find the (geodetic) up vector normal to the ground, then
|
|
// use that to find the final (radius) term of the plane equation.
|
|
float up[3];
|
|
Glue::geodUp((double*)pos, up);
|
|
int i;
|
|
for(i=0; i<3; i++) plane[i] = up[i];
|
|
plane[3] = plane[0]*pos[0] + plane[1]*pos[1] + plane[2]*pos[2];
|
|
|
|
vel[0] = 0.0;
|
|
vel[1] = 0.0;
|
|
vel[2] = 0.0;
|
|
}
|
|
|
|
void Ground::getGroundPlane(const double pos[3],
|
|
double plane[4], float vel[3],
|
|
int *type, const SGMaterial **material)
|
|
{
|
|
getGroundPlane(pos,plane,vel);
|
|
}
|
|
|
|
bool Ground::caughtWire(const double pos[4][3])
|
|
{
|
|
return false;
|
|
}
|
|
|
|
bool Ground::getWire(double end[2][3], float vel[2][3])
|
|
{
|
|
return false;
|
|
}
|
|
|
|
void Ground::releaseWire(void)
|
|
{
|
|
}
|
|
|
|
float Ground::getCatapult(const double pos[3], double end[2][3],
|
|
float vel[2][3])
|
|
{
|
|
return 1e10;
|
|
}
|
|
|
|
}; // namespace yasim
|
|
|