Compare commits

...

14 Commits

Author SHA1 Message Date
3550951b11 更新 README.md 2023-08-24 13:46:54 +08:00
8065c7c67e update readme 2022-07-24 21:59:31 +08:00
89ffad3228 change version to v1.2.1 2022-07-24 21:58:42 +08:00
bfa7e52879 add calculated gs and reported gs 2022-07-24 21:54:39 +08:00
dda58ee6ce rename item id 2022-07-24 21:45:26 +08:00
7126a5e350 update readme 2022-07-11 11:59:11 +08:00
bcb9982dc1 update readme 2022-07-10 21:50:29 +08:00
d347ed5f3b change version to 1.1.1 2022-07-10 21:39:17 +08:00
f67fed9e09 change cfl algorithm 2022-07-10 21:38:44 +08:00
364fd43810 change GS source 2022-07-10 21:30:04 +08:00
30cff7ce18 remove force rvsm 2022-07-10 21:24:58 +08:00
aa4f0aa56e change copyright 2022-07-10 21:24:15 +08:00
25efc38e9c change author name 2022-05-12 16:43:17 +08:00
3ab3066718 change license to v3.0 only 2022-05-11 13:51:09 +08:00
4 changed files with 50 additions and 46 deletions

@ -1,6 +1,6 @@
# TinyEurocat
An simple EuroScope plug-in to simulate THALES Eurocat TAG items
A simple EuroScope plug-in to simulate THALES Eurocat TAG items
<hr>
@ -16,9 +16,9 @@ Open OTHER SETS -> TAG Editor, and manually replace default altitude, cleared al
## Features
- Current altitude, Cleared altitude and current speed in metric
- show nohing when cleared altitude is not assigned instead of 0 or crz altitude
- show nohing when cleared altitude is 0
## Changlog
## Change Log
### v1.0.1
@ -31,3 +31,14 @@ Open OTHER SETS -> TAG Editor, and manually replace default altitude, cleared al
- fix cleared alt to adapt china rvsm
- check if cleared alt is valid to rvsm
- remove cleared alt when equals final alt
## v1.1.1
- change license and copyright holder
- remove force rvsm
- change ``GS`` source
- change ``CFL`` algorithm
## v1.2.1
- add both ``Reported GS`` and ``Calculated GS``

@ -6,13 +6,14 @@
TinyEurocat::TinyEurocat(void) : CPlugIn ( COMPATIBILITY_CODE,
"TinyEurocat",
"1.0.2",
"Future Sim",
"GNU GPL v3.0 +" )
"1.2.1",
"Future Sim Studio",
"Copr. 2022 Future Sim Studio" )
{
RegisterTagItemType("Metric / Current Altitude", TAG_ITEM_MET_CURR_ALT);
RegisterTagItemType("Metric / Cleared Altitude", TAG_ITEM_MET_ASS_ALT);
RegisterTagItemType("Metric / Current Speed", TAG_ITEM_MET_CURR_SPD);
RegisterTagItemType("Metric / Current Altitude", ITEM_MET_AFL);
RegisterTagItemType("Metric / Cleared Altitude", ITEM_MET_CFL);
RegisterTagItemType("Metric / Current Speed (Reported)", ITEM_MET_GS_R);
RegisterTagItemType("Metric / Current Speed (Calculated)", ITEM_MET_GS_C);
}
void TinyEurocat::OnGetTagItem( CFlightPlan FlightPlan,
@ -24,30 +25,15 @@ void TinyEurocat::OnGetTagItem( CFlightPlan FlightPlan,
COLORREF *pRGB,
double *pFontSize )
{
int maalt, mcalt, mcspd;
switch (ItemCode)
{
char tmpstr[15];
case TAG_ITEM_MET_ASS_ALT:
maalt = FlightPlan.GetClearedAltitude() * 0.3048;
maalt /= 100;
if (maalt > 0 && maalt != int(FlightPlan.GetFinalAltitude() * 0.3048) / 100 && maalt <= 149)
int maalt, mcalt, mcspd;
char tmpstr[15];
case ITEM_MET_CFL:
maalt = FlightPlan.GetClearedAltitude() * 0.3048 / 10;
if (maalt > 0)
{
if (maalt <= 84)
{
if (maalt % 3 == 1)
maalt -= 1;
else if (maalt % 3 == 2)
maalt += 1;
}
else if (maalt <= 125)
{
if ((maalt + 1) % 3 == 1)
maalt -= 1;
else if ((maalt + 1) % 3 == 2)
maalt += 1;
}
itoa(maalt * 10, tmpstr, 10);
itoa(maalt, tmpstr, 10);
sprintf(sItemString, "%04s", tmpstr);
}
else
@ -55,13 +41,18 @@ void TinyEurocat::OnGetTagItem( CFlightPlan FlightPlan,
strcpy(sItemString, " ");
}
break;
case TAG_ITEM_MET_CURR_ALT:
mcalt = RadarTarget.GetPosition().GetPressureAltitude() * 0.3048;
mcalt /= 10;
case ITEM_MET_AFL:
mcalt = RadarTarget.GetPosition().GetPressureAltitude() * 0.3048 / 10;
itoa(mcalt, tmpstr, 10);
sprintf(sItemString, "%04s", tmpstr);
break;
case TAG_ITEM_MET_CURR_SPD:
case ITEM_MET_GS_R:
mcspd = RadarTarget.GetPosition().GetReportedGS() * 1.852;
mcspd /= 10;
itoa(mcspd, tmpstr, 10);
sprintf(sItemString, "%03s", tmpstr);
break;
case ITEM_MET_GS_C:
mcspd = RadarTarget.GetGS() * 1.852;
mcspd /= 10;
itoa(mcspd, tmpstr, 10);

@ -3,9 +3,10 @@
using namespace EuroScopePlugIn;
const int TAG_ITEM_MET_CURR_ALT = 1;
const int TAG_ITEM_MET_ASS_ALT = 2;
const int TAG_ITEM_MET_CURR_SPD = 3;
const int ITEM_MET_AFL = 1; // AFL in metric
const int ITEM_MET_CFL = 2; // CFL in metric
const int ITEM_MET_GS_R = 3; // Reported GS in metric
const int ITEM_MET_GS_C = 4; // Calculated GS in metric
class TinyEurocat : public CPlugIn
{
@ -13,13 +14,13 @@ class TinyEurocat : public CPlugIn
TinyEurocat(void);
~TinyEurocat(void);
void OnGetTagItem( CFlightPlan FlightPlan,
CRadarTarget RadarTarget,
int ItemCode,
int TagData,
char sItemString [ 16 ],
int *pColorCode,
COLORREF *pRGB,
double *pFontSize );
CRadarTarget RadarTarget,
int ItemCode,
int TagData,
char sItemString [ 16 ],
int *pColorCode,
COLORREF *pRGB,
double *pFontSize );
};

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