Welcome guest, is this your first visit? Click the "Create Account" button now to join.
Page 124 of 124 FirstFirst ... 2474114122123124
Results 1,231 to 1,233 of 1233
  1. #1231
    SUPER MODERATOR Skin IGO NextGen LUNA by Pongo (DISCUSSION)
    Skin IGO NextGen LUNA by Pongo (DISCUSSION)Skin IGO NextGen LUNA by Pongo (DISCUSSION)Skin IGO NextGen LUNA by Pongo (DISCUSSION)Skin IGO NextGen LUNA by Pongo (DISCUSSION)Skin IGO NextGen LUNA by Pongo (DISCUSSION)
    Andrey Form's Avatar
    Join Date
    Oct 2019
    Location
    Belarus
    Posts
    3,023
    Rep Power
    2562

    Default

    If you're using Lockito for route tracking, adding new coordinates to the map may cause incorrect notifications, especially for average speed. If you want to test average speed, all data must be in speedcam.txt; only then will the test be accurate. Regarding section closing, using OSC solves all problems. You don't need to have all the data; just code 4 is sufficient.

    [Only registered and activated users can see links. ]
    gps5

    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]


    ŠAF_2020-26

  2.    Advertissements


  3. #1232
    Member
    Join Date
    Jul 2017
    Location
    France
    Posts
    15
    Rep Power
    0

    Default

    OK. I finally finish the reverse engineering of the speedcam plugin, and I can explain what is happening :


    The speedcam icon visibility is triggered by PropLayer.ShowSpeedCam (speedcam_mods.ui)
    PropLayer.ShowSpeedCam is linked to MODEL.lua.Speedcam_FirstClick.

    MODEL.lua.Speedcam_FirstClick is changed by sc_ResetFirstSpeedcamClick() in speedcam.lua.
    sc_ResetFirstSpeedcamClick() is called by sc_ResetFirstSpeedcamClick_new()
    sc_ResetFirstSpeedcamClick_new() is called on events when speedcam starts and speedcam ends.

    By pressing on speedcam icon on cockpit to mute it, function sc_SpeedcamClick() in speedcam.lua is called.
    sc_SpeedcamClick() is calling twice, with a delay, the function sc_ToggleSpeedcamSound(). Twice with a delay, because it's acting like off/on actions.
    In sc_ToggleSpeedcamSound() the current speedcam id is saved in the local data gSkippedSpeedcamID of speedcam.lua.


    So, when the speedcam "A" has been muted previously, if this speedcam "A" raises again, the speedcam icon in cockpit will not be displayed again. This is voluntary done and I don't understand the reason, because notification, alarm, approach sound, overspeed of this speedcam will work.
    And important to notice : when this speedcam "A" will be "on back" phase, the speedcam icon will be displayed !! It has no sense to display it now and not before.

    Could be that this code is a rest of an old part of code when the functionnality was completed. Or if PONGO can explain why this code is always existing, I'm curious to know.


    In case of an average speedcam : When doing the manual stop of the average speedcam alert, the speedcam id is always 0.
    This is because MODEL.navigation.curr_speedcam.id() is only known at section begin and end positions. Outside of the speedcam position, id is 0. So, id 0 is saved in gSkippedSpeedcamID.

    On the next average speedcam zone, the beginning of the speedcam is detected and the icon is displayed at this moment because MODEL.navigation.curr_speedcam.id() exists and is different than gSkippedSpeedcamID = 0.
    But few meters later, when the speedcam is on back, MODEL.navigation.curr_speedcam.id() is 0 again, and now is equal to gSkippedSpeedcamID. Then, the speedcam icon disappears, even if the average zone is always correctly detected and sounded.

    On speedcam end position, if the end of the section is correctly detected, function sc_ToggleSpeedcamSound() is called twice by function sc_SetLastSpeedcamSpeedLimit(). Because we are at a speedcam position, MODEL.navigation.curr_speedcam.id() is valid and is saved in gSkippedSpeedcamID

    This is explaining why the icon of speedcam section will appear again in the next section if the section end is correctly detected, and why not if the section end is not detected.


    I would propose to apply the following changes in speedcam.lua to delete this weird reaction. It's just deleting some few parts of the code.


    Spoiler: +

    ../..
    gFirstSpeedcamClick = true
    --gSkippedSpeedcamID = ""

    function sc_ToggleSpeedcamSound()
    if gFirstSpeedcamClick and not MODEL.navigation.curr_speedcam.skipped() then
    gFirstSpeedcamClick = false
    if MODEL.navigation.curr_speedcam.speed_warning_sound_active() then
    MODEL.navigation.curr_speedcam.speed_warning_sound_active = false
    elseif MODEL.warning["speedcam_soundtype_" .. MODEL.navigation.curr_speedcam.category()]() == 0 then
    MODEL.navigation.curr_speedcam.skipped = true
    end
    --gSkippedSpeedcamID = MODEL.navigation.curr_speedcam.id()
    else
    MODEL.navigation.curr_speedcam.speed_warning_sound_active = false
    MODEL.navigation.curr_speedcam.skipped = true
    MODEL.lua.Speedcam_FirstClick = false
    gFirstSpeedcamClick = true
    end
    end

    function sc_ResetFirstSpeedcamClick()
    --if MODEL.navigation.curr_speedcam.id() == gSkippedSpeedcamID then
    --MODEL.lua.Speedcam_FirstClick = false
    --else
    gFirstSpeedcamClick = true
    MODEL.lua.Speedcam_FirstClick = true
    --end
    end
    ../..


    I also made some other corrections in speedcam.lua :

    - Avoid the speedcam icon in cockpit blinking when an average speedcam section is starting
    - Detecting the average speedcam end, even if the speed of the end point is not 5km/h (it works with 5 or without).

    If you are interresting of this changes, please let me know.

    I'm also working on the case of speedcam without speed. Problem is, especially in town, that the speed at the beginning of the alarm can be different than the speed at the speedcam position. It's bad to announce "50 km/h" to the driver if 10m later, it's 30km/h. I think it's better to announce a speedcam without speed information in that case.
    Last edited by Andrey Form; Today at 08:47 AM. Reason: Merging two messages into one

  4. #1233
    SUPER MODERATOR Skin IGO NextGen LUNA by Pongo (DISCUSSION)
    Skin IGO NextGen LUNA by Pongo (DISCUSSION)Skin IGO NextGen LUNA by Pongo (DISCUSSION)Skin IGO NextGen LUNA by Pongo (DISCUSSION)Skin IGO NextGen LUNA by Pongo (DISCUSSION)Skin IGO NextGen LUNA by Pongo (DISCUSSION)
    Andrey Form's Avatar
    Join Date
    Oct 2019
    Location
    Belarus
    Posts
    3,023
    Rep Power
    2562

    Default

    Everything you described is a scenario for alerting dangerous points on the map. The interaction of all types of alerts on a single stretch of road. This scenario has been created and refined since 2019. All project participants and interested parties have contributed their suggestions. Currently, you have two options, as Maestro Pongo is a member of the GPSPOWER forum. You can write to him personally in private messages to share your findings. Alternatively, you can publish the mod PPNDV.

    Currently, the alert scenario from Pongo Igo Luna is based on the alert distance. It is the distance in plugin.ini that determines the priority of alerts of one type or another. Thus, important alerts are displayed first, even if they are further away on the route map. This ensures that all types of alerts are displayed in a timely manner. This is not the default behavior of Igo. The only requirement is to follow the recommendations from Pongo, including speedcam.txt. It is important to close the section with a speed of 5 km/h.
    Last edited by Andrey Form; Today at 06:05 AM.
    gps5

    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]


    ŠAF_2020-26

 

 

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •