Compare commits

..

No commits in common. "master" and "v1.1.1" have entirely different histories.

4 changed files with 23 additions and 36 deletions

@ -1,6 +1,6 @@
# TinyEurocat # TinyEurocat
A simple EuroScope plug-in to simulate THALES Eurocat TAG items An simple EuroScope plug-in to simulate THALES Eurocat TAG items
<hr> <hr>
@ -18,7 +18,7 @@ Open OTHER SETS -> TAG Editor, and manually replace default altitude, cleared al
- Current altitude, Cleared altitude and current speed in metric - Current altitude, Cleared altitude and current speed in metric
- show nohing when cleared altitude is 0 - show nohing when cleared altitude is 0
## Change Log ## Changlog
### v1.0.1 ### v1.0.1
@ -38,7 +38,3 @@ Open OTHER SETS -> TAG Editor, and manually replace default altitude, cleared al
- remove force rvsm - remove force rvsm
- change ``GS`` source - change ``GS`` source
- change ``CFL`` algorithm - change ``CFL`` algorithm
## v1.2.1
- add both ``Reported GS`` and ``Calculated GS``

@ -6,14 +6,13 @@
TinyEurocat::TinyEurocat(void) : CPlugIn ( COMPATIBILITY_CODE, TinyEurocat::TinyEurocat(void) : CPlugIn ( COMPATIBILITY_CODE,
"TinyEurocat", "TinyEurocat",
"1.2.1", "1.1.1",
"Future Sim Studio", "Future Sim Studio",
"Copr. 2022 Future Sim Studio" ) "Copr. 2022 Future Sim Studio" )
{ {
RegisterTagItemType("Metric / Current Altitude", ITEM_MET_AFL); RegisterTagItemType("Metric / Current Altitude", TAG_ITEM_MET_CURR_ALT);
RegisterTagItemType("Metric / Cleared Altitude", ITEM_MET_CFL); RegisterTagItemType("Metric / Cleared Altitude", TAG_ITEM_MET_ASS_ALT);
RegisterTagItemType("Metric / Current Speed (Reported)", ITEM_MET_GS_R); RegisterTagItemType("Metric / Current Speed", TAG_ITEM_MET_CURR_SPD);
RegisterTagItemType("Metric / Current Speed (Calculated)", ITEM_MET_GS_C);
} }
void TinyEurocat::OnGetTagItem( CFlightPlan FlightPlan, void TinyEurocat::OnGetTagItem( CFlightPlan FlightPlan,
@ -25,11 +24,11 @@ void TinyEurocat::OnGetTagItem( CFlightPlan FlightPlan,
COLORREF *pRGB, COLORREF *pRGB,
double *pFontSize ) double *pFontSize )
{ {
int maalt, mcalt, mcspd;
switch (ItemCode) switch (ItemCode)
{ {
int maalt, mcalt, mcspd;
char tmpstr[15]; char tmpstr[15];
case ITEM_MET_CFL: case TAG_ITEM_MET_ASS_ALT:
maalt = FlightPlan.GetClearedAltitude() * 0.3048 / 10; maalt = FlightPlan.GetClearedAltitude() * 0.3048 / 10;
if (maalt > 0) if (maalt > 0)
{ {
@ -41,23 +40,17 @@ void TinyEurocat::OnGetTagItem( CFlightPlan FlightPlan,
strcpy(sItemString, " "); strcpy(sItemString, " ");
} }
break; break;
case ITEM_MET_AFL: case TAG_ITEM_MET_CURR_ALT:
mcalt = RadarTarget.GetPosition().GetPressureAltitude() * 0.3048 / 10; mcalt = RadarTarget.GetPosition().GetPressureAltitude() * 0.3048 / 10;
itoa(mcalt, tmpstr, 10); itoa(mcalt, tmpstr, 10);
sprintf(sItemString, "%04s", tmpstr); sprintf(sItemString, "%04s", tmpstr);
break; break;
case ITEM_MET_GS_R: case TAG_ITEM_MET_CURR_SPD:
mcspd = RadarTarget.GetPosition().GetReportedGS() * 1.852; mcspd = RadarTarget.GetPosition().GetReportedGS() * 1.852;
mcspd /= 10; mcspd /= 10;
itoa(mcspd, tmpstr, 10); itoa(mcspd, tmpstr, 10);
sprintf(sItemString, "%03s", tmpstr); sprintf(sItemString, "%03s", tmpstr);
break; break;
case ITEM_MET_GS_C:
mcspd = RadarTarget.GetGS() * 1.852;
mcspd /= 10;
itoa(mcspd, tmpstr, 10);
sprintf(sItemString, "%03s", tmpstr);
break;
} }
} }

@ -3,10 +3,9 @@
using namespace EuroScopePlugIn; using namespace EuroScopePlugIn;
const int ITEM_MET_AFL = 1; // AFL in metric const int TAG_ITEM_MET_CURR_ALT = 1;
const int ITEM_MET_CFL = 2; // CFL in metric const int TAG_ITEM_MET_ASS_ALT = 2;
const int ITEM_MET_GS_R = 3; // Reported GS in metric const int TAG_ITEM_MET_CURR_SPD = 3;
const int ITEM_MET_GS_C = 4; // Calculated GS in metric
class TinyEurocat : public CPlugIn class TinyEurocat : public CPlugIn
{ {

@ -14,7 +14,6 @@
<ProjectGuid>{E1145C92-0713-4553-85D3-1D20417C2989}</ProjectGuid> <ProjectGuid>{E1145C92-0713-4553-85D3-1D20417C2989}</ProjectGuid>
<RootNamespace>TinyEurocat</RootNamespace> <RootNamespace>TinyEurocat</RootNamespace>
<Keyword>MFCDLLProj</Keyword> <Keyword>MFCDLLProj</Keyword>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">