- move dandroid_sc in base package
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@7603 30fe4595-0a0c-4342-8851-515496e4dcbd
This commit is contained in:
parent
835c0cf17e
commit
9527adbe26
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- This program is free software; you can redistribute it and/or modify -->
|
||||
<!-- it under the terms of the GNU General Public License as published by -->
|
||||
<!-- the Free Software Foundation; either version 2 of the License, or -->
|
||||
<!-- (at your option) any later version. -->
|
||||
|
||||
<!DOCTYPE params SYSTEM "params.dtd">
|
||||
|
||||
<params name="">
|
||||
|
||||
<section name="private">
|
||||
<attnum name="brakeforcefactor" val="0.95"/>
|
||||
<attnum name="brakeforcemin" val="0.25"/>
|
||||
<attnum name="bumpspeedfactor" val="3.0"/>
|
||||
<attnum name="muscale" val="1.00"/>
|
||||
<attnum name="brakescale" val="2.02"/>
|
||||
<attnum name="fuelpermeter" val="0.0007"/>
|
||||
<attnum name="fuelweightfactor" val="1.0"/>
|
||||
<attnum name="pitdamage" val="5000"/>
|
||||
<attnum name="pitentrymargin" val="70.0"/>
|
||||
<attnum name="pitentryspeed" val="25.0"/>
|
||||
<attnum name="pitexitspeed" val="25.0"/>
|
||||
<attnum name="targetfactor" val="0.3"/>
|
||||
<attnum name="targetwalldist" val="0.0"/>
|
||||
<attnum name="tractioncontrol" val="1"/>
|
||||
<!-- Race line ClothoidPath -->
|
||||
<attnum name="maxleft" val="10.0"/>
|
||||
<attnum name="maxright" val="10.0"/>
|
||||
<attnum name="margininside" val="1.2"/>
|
||||
<attnum name="marginoutside" val="1.8"/>
|
||||
<attnum name="clothoidfactor" val="1.0052"/>
|
||||
<attnum name="seglen" val="4.0"/>
|
||||
</section>
|
||||
|
||||
</params>
|
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- This program is free software; you can redistribute it and/or modify -->
|
||||
<!-- it under the terms of the GNU General Public License as published by -->
|
||||
<!-- the Free Software Foundation; either version 2 of the License, or -->
|
||||
<!-- (at your option) any later version. -->
|
||||
|
||||
<!DOCTYPE params SYSTEM "params.dtd">
|
||||
|
||||
<params name="">
|
||||
|
||||
<section name="private">
|
||||
<attnum name="brakeforcefactor" val="0.95"/>
|
||||
<attnum name="brakeforcemin" val="0.25"/>
|
||||
<attnum name="bumpspeedfactor" val="3.0"/>
|
||||
<attnum name="muscale" val="1.00"/>
|
||||
<attnum name="brakescale" val="2.02"/>
|
||||
<attnum name="fuelpermeter" val="0.0007"/>
|
||||
<attnum name="fuelweightfactor" val="1.0"/>
|
||||
<attnum name="pitdamage" val="5000"/>
|
||||
<attnum name="pitentrymargin" val="70.0"/>
|
||||
<attnum name="pitentryspeed" val="25.0"/>
|
||||
<attnum name="pitexitspeed" val="25.0"/>
|
||||
<attnum name="targetfactor" val="0.3"/>
|
||||
<attnum name="targetwalldist" val="0.0"/>
|
||||
<attnum name="tractioncontrol" val="1"/>
|
||||
<!-- Race line ClothoidPath -->
|
||||
<attnum name="maxleft" val="10.0"/>
|
||||
<attnum name="maxright" val="10.0"/>
|
||||
<attnum name="margininside" val="1.2"/>
|
||||
<attnum name="marginoutside" val="1.8"/>
|
||||
<attnum name="clothoidfactor" val="1.0052"/>
|
||||
<attnum name="seglen" val="4.0"/>
|
||||
</section>
|
||||
|
||||
</params>
|
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- This program is free software; you can redistribute it and/or modify -->
|
||||
<!-- it under the terms of the GNU General Public License as published by -->
|
||||
<!-- the Free Software Foundation; either version 2 of the License, or -->
|
||||
<!-- (at your option) any later version. -->
|
||||
|
||||
<!DOCTYPE params SYSTEM "params.dtd">
|
||||
|
||||
<params name="">
|
||||
|
||||
<section name="private">
|
||||
<attnum name="brakeforcefactor" val="0.95"/>
|
||||
<attnum name="brakeforcemin" val="0.25"/>
|
||||
<attnum name="bumpspeedfactor" val="3.0"/>
|
||||
<attnum name="muscale" val="1.00"/>
|
||||
<attnum name="brakescale" val="2.02"/>
|
||||
<attnum name="fuelpermeter" val="0.0007"/>
|
||||
<attnum name="fuelweightfactor" val="1.0"/>
|
||||
<attnum name="pitdamage" val="5000"/>
|
||||
<attnum name="pitentrymargin" val="70.0"/>
|
||||
<attnum name="pitentryspeed" val="25.0"/>
|
||||
<attnum name="pitexitspeed" val="25.0"/>
|
||||
<attnum name="targetfactor" val="0.3"/>
|
||||
<attnum name="targetwalldist" val="0.0"/>
|
||||
<attnum name="tractioncontrol" val="1"/>
|
||||
<!-- Race line ClothoidPath -->
|
||||
<attnum name="maxleft" val="10.0"/>
|
||||
<attnum name="maxright" val="10.0"/>
|
||||
<attnum name="margininside" val="1.2"/>
|
||||
<attnum name="marginoutside" val="1.8"/>
|
||||
<attnum name="clothoidfactor" val="1.0052"/>
|
||||
<attnum name="seglen" val="4.0"/>
|
||||
</section>
|
||||
|
||||
</params>
|
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- This program is free software; you can redistribute it and/or modify -->
|
||||
<!-- it under the terms of the GNU General Public License as published by -->
|
||||
<!-- the Free Software Foundation; either version 2 of the License, or -->
|
||||
<!-- (at your option) any later version. -->
|
||||
|
||||
<!DOCTYPE params SYSTEM "params.dtd">
|
||||
|
||||
<params name="">
|
||||
|
||||
<section name="private">
|
||||
<attnum name="brakeforcefactor" val="0.95"/>
|
||||
<attnum name="brakeforcemin" val="0.25"/>
|
||||
<attnum name="bumpspeedfactor" val="3.0"/>
|
||||
<attnum name="muscale" val="1.00"/>
|
||||
<attnum name="brakescale" val="2.02"/>
|
||||
<attnum name="fuelpermeter" val="0.0007"/>
|
||||
<attnum name="fuelweightfactor" val="1.0"/>
|
||||
<attnum name="pitdamage" val="5000"/>
|
||||
<attnum name="pitentrymargin" val="70.0"/>
|
||||
<attnum name="pitentryspeed" val="25.0"/>
|
||||
<attnum name="pitexitspeed" val="25.0"/>
|
||||
<attnum name="targetfactor" val="0.3"/>
|
||||
<attnum name="targetwalldist" val="0.0"/>
|
||||
<attnum name="tractioncontrol" val="1"/>
|
||||
<!-- Race line ClothoidPath -->
|
||||
<attnum name="maxleft" val="10.0"/>
|
||||
<attnum name="maxright" val="10.0"/>
|
||||
<attnum name="margininside" val="1.2"/>
|
||||
<attnum name="marginoutside" val="1.8"/>
|
||||
<attnum name="clothoidfactor" val="1.0052"/>
|
||||
<attnum name="seglen" val="4.0"/>
|
||||
</section>
|
||||
|
||||
</params>
|
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- This program is free software; you can redistribute it and/or modify -->
|
||||
<!-- it under the terms of the GNU General Public License as published by -->
|
||||
<!-- the Free Software Foundation; either version 2 of the License, or -->
|
||||
<!-- (at your option) any later version. -->
|
||||
|
||||
<!DOCTYPE params SYSTEM "params.dtd">
|
||||
|
||||
<params name="">
|
||||
|
||||
<section name="private">
|
||||
<attnum name="brakeforcefactor" val="0.95"/>
|
||||
<attnum name="brakeforcemin" val="0.25"/>
|
||||
<attnum name="bumpspeedfactor" val="3.0"/>
|
||||
<attnum name="muscale" val="0.97"/>
|
||||
<attnum name="brakescale" val="1.87"/>
|
||||
<attnum name="fuelpermeter" val="0.0007"/>
|
||||
<attnum name="fuelweightfactor" val="1.0"/>
|
||||
<attnum name="pitdamage" val="5000"/>
|
||||
<attnum name="pitentrymargin" val="70.0"/>
|
||||
<attnum name="pitentryspeed" val="25.0"/>
|
||||
<attnum name="pitexitspeed" val="25.0"/>
|
||||
<attnum name="targetfactor" val="0.3"/>
|
||||
<attnum name="targetwalldist" val="0.0"/>
|
||||
<attnum name="tractioncontrol" val="1"/>
|
||||
<!-- Race line ClothoidPath -->
|
||||
<attnum name="maxleft" val="9.5"/>
|
||||
<attnum name="maxright" val="9.5"/>
|
||||
<attnum name="margininside" val="0.7"/>
|
||||
<attnum name="marginoutside" val="1.3"/>
|
||||
<attnum name="clothoidfactor" val="1.0052"/>
|
||||
<attnum name="seglen" val="4.0"/>
|
||||
</section>
|
||||
|
||||
</params>
|
|
@ -0,0 +1,39 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- This program is free software; you can redistribute it and/or modify -->
|
||||
<!-- it under the terms of the GNU General Public License as published by -->
|
||||
<!-- the Free Software Foundation; either version 2 of the License, or -->
|
||||
<!-- (at your option) any later version. -->
|
||||
|
||||
<!DOCTYPE params SYSTEM "params.dtd">
|
||||
|
||||
<params name="">
|
||||
<section name="Brake System">
|
||||
<attnum name="front-rear brake repartition" min="0.3" max="0.65" val="0.57"/>
|
||||
<attnum name="max pressure" unit="kPa" min="5000" max="18000" val="17500"/>
|
||||
</section>
|
||||
<section name="private">
|
||||
<attnum name="brakeforcefactor" val="0.95"/>
|
||||
<attnum name="brakeforcemin" val="0.25"/>
|
||||
<attnum name="bumpspeedfactor" val="3.0"/>
|
||||
<attnum name="muscale" val="0.992"/>
|
||||
<attnum name="brakescale" val="2.02"/>
|
||||
<attnum name="fuelpermeter" val="0.0007"/>
|
||||
<attnum name="fuelweightfactor" val="1.0"/>
|
||||
<attnum name="pitdamage" val="5000"/>
|
||||
<attnum name="pitentrymargin" val="70.0"/>
|
||||
<attnum name="pitentryspeed" val="25.0"/>
|
||||
<attnum name="pitexitspeed" val="25.0"/>
|
||||
<attnum name="targetfactor" val="0.3"/>
|
||||
<attnum name="targetwalldist" val="0.0"/>
|
||||
<attnum name="tractioncontrol" val="1"/>
|
||||
<!-- Race line ClothoidPath -->
|
||||
<attnum name="maxleft" val="10.0"/>
|
||||
<attnum name="maxright" val="10.0"/>
|
||||
<attnum name="margininside" val="1.1"/>
|
||||
<attnum name="marginoutside" val="1.5"/>
|
||||
<attnum name="clothoidfactor" val="1.0052"/>
|
||||
<attnum name="seglen" val="4.0"/>
|
||||
</section>
|
||||
|
||||
</params>
|
|
@ -0,0 +1,39 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- This program is free software; you can redistribute it and/or modify -->
|
||||
<!-- it under the terms of the GNU General Public License as published by -->
|
||||
<!-- the Free Software Foundation; either version 2 of the License, or -->
|
||||
<!-- (at your option) any later version. -->
|
||||
|
||||
<!DOCTYPE params SYSTEM "params.dtd">
|
||||
|
||||
<params name="">
|
||||
<section name="Brake System">
|
||||
<attnum name="front-rear brake repartition" min="0.3" max="0.65" val="0.57"/>
|
||||
<attnum name="max pressure" unit="kPa" min="5000" max="18000" val="17500"/>
|
||||
</section>
|
||||
<section name="private">
|
||||
<attnum name="brakeforcefactor" val="0.95"/>
|
||||
<attnum name="brakeforcemin" val="0.25"/>
|
||||
<attnum name="bumpspeedfactor" val="3.0"/>
|
||||
<attnum name="muscale" val="0.992"/>
|
||||
<attnum name="brakescale" val="2.02"/>
|
||||
<attnum name="fuelpermeter" val="0.0007"/>
|
||||
<attnum name="fuelweightfactor" val="1.0"/>
|
||||
<attnum name="pitdamage" val="5000"/>
|
||||
<attnum name="pitentrymargin" val="70.0"/>
|
||||
<attnum name="pitentryspeed" val="25.0"/>
|
||||
<attnum name="pitexitspeed" val="25.0"/>
|
||||
<attnum name="targetfactor" val="0.3"/>
|
||||
<attnum name="targetwalldist" val="0.0"/>
|
||||
<attnum name="tractioncontrol" val="1"/>
|
||||
<!-- Race line ClothoidPath -->
|
||||
<attnum name="maxleft" val="10.0"/>
|
||||
<attnum name="maxright" val="10.0"/>
|
||||
<attnum name="margininside" val="1.1"/>
|
||||
<attnum name="marginoutside" val="1.7"/>
|
||||
<attnum name="clothoidfactor" val="1.0052"/>
|
||||
<attnum name="seglen" val="4.0"/>
|
||||
</section>
|
||||
|
||||
</params>
|
|
@ -0,0 +1,39 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- This program is free software; you can redistribute it and/or modify -->
|
||||
<!-- it under the terms of the GNU General Public License as published by -->
|
||||
<!-- the Free Software Foundation; either version 2 of the License, or -->
|
||||
<!-- (at your option) any later version. -->
|
||||
|
||||
<!DOCTYPE params SYSTEM "params.dtd">
|
||||
|
||||
<params name="">
|
||||
<section name="Brake System">
|
||||
<attnum name="front-rear brake repartition" min="0.3" max="0.65" val="0.57"/>
|
||||
<attnum name="max pressure" unit="kPa" min="5000" max="18000" val="17500"/>
|
||||
</section>
|
||||
<section name="private">
|
||||
<attnum name="brakeforcefactor" val="0.95"/>
|
||||
<attnum name="brakeforcemin" val="0.25"/>
|
||||
<attnum name="bumpspeedfactor" val="3.0"/>
|
||||
<attnum name="muscale" val="1.06"/>
|
||||
<attnum name="brakescale" val="2.10"/>
|
||||
<attnum name="fuelpermeter" val="0.0007"/>
|
||||
<attnum name="fuelweightfactor" val="1.0"/>
|
||||
<attnum name="pitdamage" val="5000"/>
|
||||
<attnum name="pitentrymargin" val="70.0"/>
|
||||
<attnum name="pitentryspeed" val="25.0"/>
|
||||
<attnum name="pitexitspeed" val="25.0"/>
|
||||
<attnum name="targetfactor" val="0.3"/>
|
||||
<attnum name="targetwalldist" val="0.0"/>
|
||||
<attnum name="tractioncontrol" val="1"/>
|
||||
<!-- Race line ClothoidPath -->
|
||||
<attnum name="maxleft" val="10.0"/>
|
||||
<attnum name="maxright" val="10.0"/>
|
||||
<attnum name="margininside" val="1.1"/>
|
||||
<attnum name="marginoutside" val="1.7"/>
|
||||
<attnum name="clothoidfactor" val="1.0052"/>
|
||||
<attnum name="seglen" val="4.0"/>
|
||||
</section>
|
||||
|
||||
</params>
|
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- This program is free software; you can redistribute it and/or modify -->
|
||||
<!-- it under the terms of the GNU General Public License as published by -->
|
||||
<!-- the Free Software Foundation; either version 2 of the License, or -->
|
||||
<!-- (at your option) any later version. -->
|
||||
|
||||
<!DOCTYPE params SYSTEM "params.dtd">
|
||||
|
||||
<params name="sc-cavallo-360">
|
||||
<section name="Brake System">
|
||||
<attnum name="front-rear brake repartition" min="0.3" max="0.65" val="0.51"/>
|
||||
<attnum name="max pressure" unit="kPa" min="5000" max="18000" val="18000"/>
|
||||
</section>
|
||||
|
||||
<section name="private">
|
||||
<attnum name="brakeforcefactor" val="0.95"/>
|
||||
<attnum name="brakeforcemin" val="0.25"/>
|
||||
<attnum name="bumpspeedfactor" val="3.0"/>
|
||||
<attnum name="muscale" val="0.99"/>
|
||||
<attnum name="brakescale" val="2.10"/>
|
||||
<attnum name="fuelpermeter" val="0.0007"/>
|
||||
<attnum name="fuelweightfactor" val="1.0"/>
|
||||
<attnum name="pitdamage" val="5000"/>
|
||||
<attnum name="pitentrymargin" val="70.0"/>
|
||||
<attnum name="pitentryspeed" val="25.0"/>
|
||||
<attnum name="pitexitspeed" val="25.0"/>
|
||||
<attnum name="targetfactor" val="0.3"/>
|
||||
<attnum name="targetwalldist" val="0.0"/>
|
||||
<attnum name="tractioncontrol" val="1"/>
|
||||
<!-- Race line ClothoidPath -->
|
||||
<attnum name="maxleft" val="10.0"/>
|
||||
<attnum name="maxright" val="10.0"/>
|
||||
<attnum name="margininside" val="1.2"/>
|
||||
<attnum name="marginoutside" val="1.8"/>
|
||||
<attnum name="clothoidfactor" val="1.0052"/>
|
||||
<attnum name="seglen" val="4.0"/>
|
||||
</section>
|
||||
|
||||
</params>
|
|
@ -79,6 +79,7 @@ data/config/raceman/singleevent-endurance.xml
|
|||
data/drivers/CMakeLists.txt
|
||||
data/drivers/human
|
||||
data/drivers/networkhuman
|
||||
data/drivers/dandroid_sc
|
||||
data/drivers/usr_sc
|
||||
data/drivers/shadow_sc
|
||||
data/drivers/simplix
|
||||
|
|
|
@ -28,7 +28,6 @@ data/drivers/dandroid_ls1
|
|||
data/drivers/dandroid_ls2
|
||||
data/drivers/dandroid_mpa1
|
||||
data/drivers/dandroid_rs
|
||||
data/drivers/dandroid_sc
|
||||
data/drivers/dandroid_srw
|
||||
data/drivers/dandroid_trb1
|
||||
data/drivers/dandroid_67GP
|
||||
|
|
|
@ -143,6 +143,9 @@ Section "!Base System" SEC01
|
|||
SetOutPath "$INSTDIR\lib\drivers\networkhuman"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\networkhuman\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\dandroid_sc"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\dandroid_sc\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\simplix_sc"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\simplix_sc\*.*"
|
||||
|
||||
|
@ -159,6 +162,9 @@ Section "!Base System" SEC01
|
|||
SetOutPath "$INSTDIR\data\drivers\networkhuman"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\data\drivers\networkhuman\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\dandroid_sc"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\data\drivers\dandroid_sc\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\simplix_sc"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\data\drivers\simplix_sc\*.*"
|
||||
|
||||
|
|
|
@ -128,9 +128,6 @@ Section -Drivers
|
|||
SetOutPath "$INSTDIR\lib\drivers\dandroid_rs"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\dandroid_rs\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\dandroid_sc"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\dandroid_sc\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\dandroid_srw"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\dandroid_srw\*.*"
|
||||
|
||||
|
@ -183,9 +180,6 @@ Section -Drivers
|
|||
SetOutPath "$INSTDIR\data\drivers\dandroid_rs"
|
||||
File /r "${BUILD_INST_DIR}\data\drivers\dandroid_rs\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\dandroid_sc"
|
||||
File /r "${BUILD_INST_DIR}\data\drivers\dandroid_sc\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\dandroid_srw"
|
||||
File /r "${BUILD_INST_DIR}\data\drivers\dandroid_srw\*.*"
|
||||
|
||||
|
|
|
@ -19,43 +19,45 @@
|
|||
|
||||
#include "spline.h"
|
||||
|
||||
|
||||
Spline::Spline()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void Spline::newSpline(int dim, SplinePoint* spl)
|
||||
{
|
||||
mSpl = spl;
|
||||
mDim = dim;
|
||||
mSpl = spl;
|
||||
mDim = dim;
|
||||
}
|
||||
|
||||
|
||||
double Spline::evaluate(double z)
|
||||
{
|
||||
int i, a, b;
|
||||
double t, a0, a1, a2, a3, h;
|
||||
int i, a, b;
|
||||
double t, a0, a1, a2, a3, h;
|
||||
|
||||
a = 0; b = mDim-1;
|
||||
a = 0; b = mDim-1;
|
||||
|
||||
do {
|
||||
i = (a + b) / 2;
|
||||
if (mSpl[i].x <= z) {
|
||||
a = i;
|
||||
} else {
|
||||
b = i;
|
||||
}
|
||||
} while ((a + 1) != b);
|
||||
do
|
||||
{
|
||||
i = (a + b) / 2;
|
||||
|
||||
i = a;
|
||||
h = mSpl[i+1].x - mSpl[i].x;
|
||||
t = (z-mSpl[i].x) / h;
|
||||
a0 = mSpl[i].y;
|
||||
a1 = mSpl[i+1].y - a0;
|
||||
a2 = a1 - h*mSpl[i].s;
|
||||
a3 = h * mSpl[i+1].s - a1;
|
||||
a3 -= a2;
|
||||
return a0 + (a1 + (a2 + a3*t) * (t-1))*t;
|
||||
if (mSpl[i].x <= z)
|
||||
{
|
||||
a = i;
|
||||
}
|
||||
else
|
||||
{
|
||||
b = i;
|
||||
}
|
||||
} while ((a + 1) != b);
|
||||
|
||||
i = a;
|
||||
h = mSpl[i+1].x - mSpl[i].x;
|
||||
t = (z-mSpl[i].x) / h;
|
||||
a0 = mSpl[i].y;
|
||||
a1 = mSpl[i+1].y - a0;
|
||||
a2 = a1 - h*mSpl[i].s;
|
||||
a3 = h * mSpl[i+1].s - a1;
|
||||
a3 -= a2;
|
||||
|
||||
return a0 + (a1 + (a2 + a3*t) * (t-1))*t;
|
||||
}
|
||||
|
||||
|
|
|
@ -19,22 +19,23 @@
|
|||
#ifndef _SPLINE_H_
|
||||
#define _SPLINE_H_
|
||||
|
||||
class SplinePoint {
|
||||
public:
|
||||
class SplinePoint
|
||||
{
|
||||
public:
|
||||
double x; /* x coordinate */
|
||||
double y; /* y coordinate */
|
||||
double s; /* slope */
|
||||
};
|
||||
|
||||
|
||||
class Spline {
|
||||
public:
|
||||
class Spline
|
||||
{
|
||||
public:
|
||||
Spline();
|
||||
|
||||
|
||||
void newSpline(int dim, SplinePoint* spl);
|
||||
double evaluate(double z);
|
||||
|
||||
private:
|
||||
private:
|
||||
SplinePoint* mSpl;
|
||||
int mDim;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue