Click here to Skip to main content
15,906,574 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
QuestionCan Managed C++ Class Library DLLs be pirated? Pin
earlgraham18-Oct-06 6:54
earlgraham18-Oct-06 6:54 
AnswerRe: Can Managed C++ Class Library DLLs be pirated? Pin
Christian Graus18-Oct-06 7:13
protectorChristian Graus18-Oct-06 7:13 
GeneralRe: Can Managed C++ Class Library DLLs be pirated? Pin
earlgraham18-Oct-06 7:58
earlgraham18-Oct-06 7:58 
GeneralRe: Can Managed C++ Class Library DLLs be pirated? Pin
Christian Graus18-Oct-06 8:03
protectorChristian Graus18-Oct-06 8:03 
QuestionInterop help! - No symbols loaded Pin
orion450018-Oct-06 4:57
orion450018-Oct-06 4:57 
AnswerRe: Interop help! - No symbols loaded Pin
User 58385218-Oct-06 12:57
User 58385218-Oct-06 12:57 
GeneralRe: Interop help! - No symbols loaded Pin
orion450019-Oct-06 9:08
orion450019-Oct-06 9:08 
QuestionHELP WITH MY 4TH ORDER RUNGE-KUTTA ALGORITHM Pin
sahoong18-Oct-06 3:51
sahoong18-Oct-06 3:51 
The codes that I have written so far is below:

// Simulation of the Dynamics of a 2-Link Pan-Tilt Robotic Manipulator
/* This programme calculates the Velocity, Acceleration and the angles of inclination
of the two links of the Spherical Pointing Motor, which is essentially a Two-Link Robotic
Manipulator*/


//#include <basis.h>
//#include <assert.h>
//#include <string.h>
//#include <iostream.h>
//#include <iomanip.h>
//#include <fstream.h>

// Precompiler Directives

#include <math.h>
#include <stdlib.h>


// Constants Declaration

#define n (int) 2
#define m1 (float) 0.05
#define m2 (float) 0.03
#define r1 (float) 0.04
#define r2 (float) 0.06
#define ra (float) 0.04
#define rb (float) 0.06
#define l (float) 0.05
#define d (float) 0.02
#define acc_due_gravity (float) 9.81

class AngVel1
{
public:
};

class AngAccln1
{
public:
};

class AngVel2
{
public:
};

class AngAccln2
{
public:
}

/*
n = Number of Links = 2
m1 = Mass of the First Link (The Annulus)
m2 = Mass of the Second Link
r1 = Inner Radius of Link 1 (The Annulus)
r2 = Outer Radius of Link 1 (The Annulus)
ra = Outer Radius of the Annulus
rb = Inner Radius of the Annulus
l = Half the Lenght of Link 1
d = Displacement from the Centre of Mass
g = Acceleration due to gravity = 9.81
t = time in seconds
*/


// Declaration of variables (Robot Parameters)

float t;




// Prototypes

float TorqueVal(float t);
double Runge_Kutta ();

double AngVel1 (double om1){

return om1;
}

double AngAccln1 (double t, double om1, double tetha1, double tetha2){
t = 0.1;
return (tau1 - 2*m2(r2*r2/4 -h2*h2/3 -d*d) * om1*om2*sintetha2*costetha2 - m2*g*d*costetha1*costetha2)/
om1*(m1(ra*ra + rb*rb)/4 + m1(h1*h1)/3 + m2((r2*r2)(1+sinsqtetha2)/4 + m2*h2*h2*cossqtetha2/3 + m2*d*d*cossqtetha2);
}

double AngVel2 (double om2){
return om2;
}

double AngAccln2 (double t, double om1, double om2, double tetha1, double tetha2){
t=0.4;
return (tau2 + (m2(r2*r2/4 -h2*h2/3 -d*d)*om1*om1*sintetha2*costetha2) - m2*g*d*sintetha1*sintetha2)/
om2*m2(r2*r2/4 + h2*h2/3 + d*d;

double RK(double y){
double k1,k2,k3,k4;
k1=h*fn(y);
k2=h*fn(y+(k1/2.0));
k3=h*fn(y+(k2/2.0));
k4=h*fn(y+k3);
return y+(k1/6.0)+(k2/3.0)+(k3/3.0)+(k4/6.0);
}

// The Main Routine

int main()
{



// Torque Function
float TorqueVal1(float t)
{
t = 0.1;
return t;

}

// Runge-Kutta Function

double RK(double y){
double k1,k2,k3,k4;
k1=h*fn(y);
k2=h*fn(y+(k1/2.0));
k3=h*fn(y+(k2/2.0));
k4=h*fn(y+k3);
return y+(k1/6.0)+(k2/3.0)+(k3/3.0)+(k4/6.0);
}

double RK(double l){
double v1,v2,v3,v4;
v1=h*fn(l);
v2=h*fn(l+(k1/2.0));
v3=h*fn(l+(k2/2.0));
v4=h*fn(l+k3);
return l+(v1/6.0)+(v2/3.0)+(v3/3.0)+(v4/6.0);
}




}


i am attempting to simulate the dynamics of a 2-link pan-tilt robot. Two second order ODE were generated. As a requirement of the Runge-Kutta, each of the two second-order ODE was converted to 2 first order ODE thereby making four equations in all.

I was not using a class before and I just started packing the four equation into classes.

For further explanation or clarification, please, mail me to olaskg@yahoo.ie.

Thank you.

skg

AnswerRe: HELP WITH MY 4TH ORDER RUNGE-KUTTA ALGORITHM Pin
Christian Graus18-Oct-06 4:01
protectorChristian Graus18-Oct-06 4:01 
QuestionImporting functions from Fortran [modified] Pin
Epi18-Oct-06 0:33
Epi18-Oct-06 0:33 
QuestionHardware drive serial encryptor/decryptor Pin
Cyclone0217-Oct-06 2:15
Cyclone0217-Oct-06 2:15 
AnswerRe: Hardware drive serial encryptor/decryptor Pin
Christian Graus17-Oct-06 7:18
protectorChristian Graus17-Oct-06 7:18 
QuestionRTC issue Pin
Cristi B17-Oct-06 0:01
Cristi B17-Oct-06 0:01 
AnswerRe: RTC issue Pin
Christian Graus17-Oct-06 7:18
protectorChristian Graus17-Oct-06 7:18 
AnswerRe: RTC issue Pin
Cristi B17-Oct-06 20:33
Cristi B17-Oct-06 20:33 
GeneralRe: RTC issue Pin
Christian Graus17-Oct-06 22:50
protectorChristian Graus17-Oct-06 22:50 
AnswerRe: RTC issue Pin
Cristi B17-Oct-06 23:52
Cristi B17-Oct-06 23:52 
Questionconsole app: methods autocompletion (get method name from string parameter of invoker)[modified] Pin
n-j16-Oct-06 23:45
n-j16-Oct-06 23:45 
QuestionA strange problem Pin
minihotto16-Oct-06 23:41
minihotto16-Oct-06 23:41 
AnswerRe: A strange problem Pin
Christian Graus17-Oct-06 7:20
protectorChristian Graus17-Oct-06 7:20 
Questionexecuting a member function in a separate thread Pin
singersinger15-Oct-06 23:40
singersinger15-Oct-06 23:40 
AnswerRe: executing a member function in a separate thread Pin
Christian Graus17-Oct-06 7:21
protectorChristian Graus17-Oct-06 7:21 
QuestionHow to get pixel value using WinForm Pin
uusheikh15-Oct-06 21:12
uusheikh15-Oct-06 21:12 
AnswerRe: How to get pixel value using WinForm Pin
Christian Graus17-Oct-06 7:22
protectorChristian Graus17-Oct-06 7:22 
GeneralRe: How to get pixel value using WinForm Pin
uusheikh17-Oct-06 23:03
uusheikh17-Oct-06 23:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.